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

feat(redisotel): Update redis otel with option to not set raw command as an attribute #2194

Closed
wants to merge 2 commits into from

Conversation

wildefires
Copy link

@wildefires wildefires commented Aug 26, 2022

Adds an option to not set the db.statement attribute, closes #2195

@wildefires wildefires changed the title WIP Update redis otel with option to not set raw command as an attribute feat(redisotel): Update redis otel with option to not set raw command as an attribute Aug 26, 2022
@wildefires
Copy link
Author

Updated the PR title to match the commitlint spec (I think) - if someone can show me how to kick it off again that'd be great 🙃

@@ -136,3 +142,10 @@ func WithAttributes(attrs ...attribute.KeyValue) Option {
cfg.attrs = append(cfg.attrs, attrs...)
})
}

// WithIgnoreRawCmd tells the tracing hook not to log raw redis commands.
func WithIgnoreRawCmd() Option {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rename this to WithDBStatement(true/false) so it can be more easily enabled/disabled - https://uptrace.dev/blog/posts/go-functional-options-named-args.html#bool-options

@vmihailenco
Copy link
Collaborator

@Cull-Methi aside from the option name this looks pretty good. Could you update the name?

@vmihailenco vmihailenco closed this Oct 4, 2022
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.

Redisotel should allow an option to not set the raw cmd as an attribute on spans
2 participants