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

Add Support for Multiple Attributes #136

Closed
Mrod1598 opened this issue Nov 23, 2021 · 1 comment · Fixed by #137
Closed

Add Support for Multiple Attributes #136

Mrod1598 opened this issue Nov 23, 2021 · 1 comment · Fixed by #137

Comments

@Mrod1598
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Add Ability to pass in multiple Attributes into one otel.instrument() call.

Describe the solution you'd like
What I propose is adding additional signatures to otel.instrument that support attributes in the format of Map<String, Map<String,String>> where the strings represent <Attribute, <LabelKey, LabelValue>>

Example:
currently what is required to collect this metric

otel.instrument(beantomcatconnectors, "tomcat.threads.idle", "description", "1",
    ["proto_handler" : { mbean -> mbean.name().getKeyProperty("name") }],
    "currentThreadCount", otel.&doubleValueObserver)
otel.instrument(beantomcatconnectors, "tomcat.threads.busy", "description", "1", 
    ["proto_handler" : { mbean -> mbean.name().getKeyProperty("name") }],
    "currentThreadsBusy", otel.&doubleValueObserver)

What it would like with the proposed solution

otel.instrument(beantomcatconnectors, "tomcat.threads", "description", "1",
    ["proto_handler" : { mbean -> mbean.name().getKeyProperty("name") }],
    ["currentThreadCount": ["Thread Type": "current"],
    "currentThreadsBusy": ["Thread Type": "busy"]], 
    otel.&doubleValueObserver)
@mateuszrzeszutek mateuszrzeszutek linked a pull request Nov 29, 2021 that will close this issue
@rmfitzpatrick
Copy link
Contributor

@Mrod1598 I can see the use of this feature and think it can be helpful. Wouldn't we want the attributes to map to label functions to keep with the current convention? Otherwise we seem to be limiting the capabilities out of the gate imo.

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