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

[Discussion] Enable the ability to filter attributes for use with third party libraries #3123

Closed
wildefires opened this issue Aug 29, 2022 · 3 comments
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Milestone

Comments

@wildefires
Copy link
Contributor

Problem Statement

I'm attempting to use the otelredis package to trace our redis connections with OTel. There's a security issue with this in the general case where it probably shouldn't set a specific attribute so long as it has sensitive information.

I'd like to be able to apply some sort of filterer to the Tracer and/or Span to prevent this attribute from ever being saved. In the general case, this could be used to prevent the accidental addition of other sensitive attributes, e.g. password by the end users.

I attempted to implement this in my service with the existing code with a wrapper around the Tracer Provider, Tracer, and Span, but was unable to figure out a clever way to do this, aside from overriding the AddAtributes call (especially because the SpanStartOption interface requires an unexported func on the struct, so I couldn't create my own StartSpanOption-compliant struct)

For this specific issue I've put up a PR on the third party library, but there's chance that this would be impossible/more difficult with other third party libraries.

Proposed Solution

TBD pending discussion - maybe an AttributeFilter exported interface that can hook in at attribute creation / span export time?

@wildefires wildefires added the enhancement New feature or request label Aug 29, 2022
@MrAlias
Copy link
Contributor

MrAlias commented Aug 29, 2022

Please take a look at this discussion

@MrAlias MrAlias added the duplicate This issue or pull request already exists label Aug 29, 2022
@wildefires
Copy link
Contributor Author

Please take a look at this discussion

Perfect, thank you!

@MrAlias
Copy link
Contributor

MrAlias commented Aug 29, 2022

Please take a look at this discussion

Perfect, thank you!

👍

@MrAlias MrAlias closed this as completed Aug 29, 2022
@pellared pellared added this to the untracked milestone Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants