Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(otelgorm): added optional db key to skip tracing #120

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

WilliamDeKeyzer
Copy link

@WilliamDeKeyzer WilliamDeKeyzer commented Feb 28, 2024

Sometimes there are database operations ongoing that are continuously ongoing and are completely irrelevant for tracing UIs. You just don't want useless traces to be present in this case, as it generates a lot of noise.

With the custom key (which is exported from this lib) you can now set it in the relevant parts of your own codebase.
db.Set(otelgorm.EnabledTraceDatabaseKey, false)

This will make sure the next queries towards this db object will not start new traces.

Do not forget to un-set this db key is other clals happen on this db object and you do want to trace those.
db.Set(otelgorm.EnabledTraceDatabaseKey, true)

@WilliamDeKeyzer WilliamDeKeyzer changed the title added optional db key to skip tracing fix: added optional db key to skip tracing Feb 28, 2024
@WilliamDeKeyzer WilliamDeKeyzer changed the title fix: added optional db key to skip tracing fix(otelgorm): added optional db key to skip tracing Feb 28, 2024
otelgorm/README.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants