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

Ability to use action:extract on metrics labels/attributes values. #4568

Closed
cbackstrom80 opened this issue Dec 17, 2021 · 5 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@cbackstrom80
Copy link

cbackstrom80 commented Dec 17, 2021

We need the ability to be able to extract on "Metrics" attributes/label values similar to that available to spans in the attributes processor.

Non Working Example:

resource/storeid: attributes: - key: "keyname" action: extract pattern: ^(?P<siteid>[A-Z][0-9]+)-[A-Z0-9]+$$

Describe the solution you'd like
We would like to be able to have a processor create a new key with a modified value from another key/label/attribute.

Describe alternatives you've considered
We have tried metrics transform processor but can only use regex functionality on pattern match.

Additional context
Some of the blockers might also be due the fact that we are trying to work with "Data Point Attributes" coming from collected.

     -> Unit:
     -> DataType: Gauge
 NumberDataPoints #0
 Data point attributes:
      -> user_domain_name: STRING(default)
    -> region_name: STRING(region)
     -> project_domain_name: STRING(default)
    -> system.type: STRING(openstack)
    -> dsname: STRING(value)
     -> status: STRING(enabled)
     -> hypervisor_hostname: STRING(hostname)
    -> plugin: STRING(openstack)
    -> project_name: STRING(S7675)
     -> project_id: STRING(347dafc5aca04c20bcbc4eeb0118ce53)
    -> state: STRING(up)
     -> hypervisor_type: STRING(QEMU)
      -> id: STRING(241)
      -> host_ip: STRING(123.123.123.123)
@jpkrohling jpkrohling added the enhancement New feature or request label Dec 20, 2021
@bogdandrutu
Copy link
Member

bogdandrutu commented Jan 7, 2022

@anuraaga your transform processor will support this correct?

@aunshc
Copy link
Contributor

aunshc commented Jan 19, 2022

@anuraaga @bogdandrutu is this the design document #4444 being referred to for the implementation of the transform processor that will support the above use case?

@anuraaga
Copy link
Contributor

Sorry for delayed response - yes that's the design doc and this will be supported once adding metrics support to it.

@bogdandrutu
Copy link
Member

I believe that this is supported by the transform processor.
/cc @TylerHelmuth if more work is needed, please open an issue in contrib

@TylerHelmuth
Copy link
Member

The processor is ready to have this functionality added, but there isn't a function yet that can do this exact request. Attributes can be set on Data Points, but there is not any pattern matching yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants