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

Is it possible to add attributes to "instrumentation scope"? #4473

Closed
tigrannajaryan opened this issue May 17, 2022 · 3 comments
Closed

Is it possible to add attributes to "instrumentation scope"? #4473

tigrannajaryan opened this issue May 17, 2022 · 3 comments
Labels
Feature Request Suggest an idea for this project

Comments

@tigrannajaryan
Copy link
Member

This OTEP proposed to add attributes to instrumentation scope.

This issue is a question for the maintainers of this repo: are we able to do this in a non-breaking manner and without significant performance impact?

@tigrannajaryan tigrannajaryan added the Feature Request Suggest an idea for this project label May 17, 2022
@jack-berg
Copy link
Member

Yes, I believe so. @anuraaga / @jkwatson I imagine scope attributes would be settable on MeterBuilder / TracerBuilder / LogEmitterBuilder via a new method setAttributes(Attributes). Attributes will default to empty. When ComponentRegistry#get is called to obtain a meter / tracer / logemitter, it will have to evaluate InstrumentationScopeInfo equality with attributes, in addition to the scope name, version, and schema URL.

In most cases attributes will be empty and the addition of attributes to InstrumentationScopeInfo will have minimal performance impact. In cases where attributes are not empty, performance will dictated by the performance of Attributes.equals() which I understand is reasonably good.

@jkwatson
Copy link
Contributor

Yep. The builders are the place to add it to the API, for sure. In the SDK, we'll need to add some sort of creational method for InstrumentationScopeInfo, but I'm sure we can cook something up for that.

@tigrannajaryan
Copy link
Member Author

Thanks, @jack-berg @jkwatson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Suggest an idea for this project
Projects
None yet
Development

No branches or pull requests

3 participants