opentelemetry-collector-contrib icon indicating copy to clipboard operation
opentelemetry-collector-contrib copied to clipboard

[metricstransformprocessor] Support `count` aggregation type for `aggregate_labels` action

Open musaprg opened this issue 2 years ago • 12 comments

Component(s)

processor/metricstransform

Is your feature request related to a problem? Please describe.

I'd like to substitute aggregation by metricstransformprocessor for some of our recording rules. It's performing very well, however, it currently doesn't support counting aggregated metrics up by specified label_set, which is our blocker. It would be useful for users to support aggregation_type count in metricstransformprocessor.

Describe the solution you'd like

I haven't looked into the code base yet, but a simple implementation would be returning the number of data points (dps.Len()) at a specific time.

We could configure aggregation with the count type as:

    "metricstransform":
        "transforms":
        - "action": "insert"
          "include": "kube_pod_info"
          "match_type": "strict"
          "new_name": "cluster_namespace:pod:count"
          "operations":
          - "action": "aggregate_labels"
            "aggregation_type": "count"
            "label_set":
            - "namespace"

Describe alternatives you've considered

I don't have any other alternatives for now.

Additional context

No response

musaprg avatar Aug 07 '23 11:08 musaprg

Pinging code owners:

  • metricstransformprocessor: @dmitryax
  • processor/metricstransform: @dmitryax

See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] avatar Aug 07 '23 11:08 github-actions[bot]

/label processor/metricstransform

I'm ready to prepare a PR after the triage.

musaprg avatar Aug 07 '23 11:08 musaprg

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

  • processor/metricstransform: @dmitryax
  • needs: Github issue template generation code needs this to generate the corresponding labels.

See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] avatar Oct 09 '23 03:10 github-actions[bot]

Hi @musaprg, feel free to submit a PR

dmitryax avatar Oct 09 '23 04:10 dmitryax

@dmitryax OK, thanks! Let me try preparing a PR. BTW I saw the needs-triage label was still there, but is this PR accepted or going to be considered after the PR submission?

musaprg avatar Oct 12 '23 03:10 musaprg

I removed needs triage based on @dmitryax's comment. Thanks for your help @musaprg!

crobert-1 avatar Oct 12 '23 19:10 crobert-1

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

  • processor/metricstransform: @dmitryax

See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] avatar Dec 12 '23 03:12 github-actions[bot]

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

  • processor/metricstransform: @dmitryax

See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] avatar Feb 12 '24 03:02 github-actions[bot]

@musaprg Do you still plan on submitting a PR for this enhancement?

crobert-1 avatar Feb 26 '24 16:02 crobert-1

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

  • processor/metricstransform: @dmitryax

See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] avatar Apr 29 '24 03:04 github-actions[bot]

Implemented here: https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32935

lopes-felipe avatar May 07 '24 22:05 lopes-felipe

Hey @crobert-1 and @dmitryax, would you mind taking a look at that PR? :)

lopes-felipe avatar May 21 '24 18:05 lopes-felipe

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

  • processor/metricstransform: @dmitryax

See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] avatar Jul 22 '24 03:07 github-actions[bot]

This feature seems to be now landed by https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/33442, so let me close this issue. Thanks @lopes-felipe!

musaprg avatar Jul 30 '24 09:07 musaprg