Skip to content

Add Support for Multiple Attributes #136

@Mrod1598

Description

@Mrod1598

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions