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

How to disable multiple annotations? #10722

Closed
hatharom opened this issue Feb 29, 2024 · 3 comments · Fixed by #10753
Closed

How to disable multiple annotations? #10722

hatharom opened this issue Feb 29, 2024 · 3 comments · Fixed by #10753

Comments

@hatharom
Copy link

hatharom commented Feb 29, 2024

It is more of a question

With this environment variable OTEL_INSTRUMENTATION_OPENTELEMETRY_INSTRUMENTATION_ANNOTATIONS_EXCLUDE_METHODS
how to exclude all methods in a class or package?

The documentation says is must be in a format like
my.package.MyClass1[method1,method2];my.package.MyClass2[method3]

But wildcarding doesnt work.Nor listing only package level.
If I really have to write out all the method names then this envvar pretty useless in case of numerous withspan annotations

@trask trask transferred this issue from open-telemetry/opentelemetry-java Feb 29, 2024
@laurit
Copy link
Contributor

laurit commented Mar 1, 2024

If you don't specify the method name it will exclude all methods in the given class.

@laurit laurit added the needs author feedback Waiting for additional feedback from the author label Mar 1, 2024
@hatharom
Copy link
Author

hatharom commented Mar 1, 2024

If you don't specify the method name it will exclude all methods in the given class.

it doesnt:
my.package.MyClass1[*]
my.package.MyClass1[]
my.package.MyClass1

neither of these work

@github-actions github-actions bot removed the needs author feedback Waiting for additional feedback from the author label Mar 1, 2024
@laurit
Copy link
Contributor

laurit commented Mar 5, 2024

I tested it and indeed you are correct, currently there doesn't seem to be a way to exclude all methods from a class without listing the methods. I'll create a PR to address this.

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 a pull request may close this issue.

2 participants