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

[metricstransformprocessor] Support count aggregation type for aggregate_labels action #24978

Open
musaprg opened this issue Aug 7, 2023 · 12 comments
Assignees
Labels
enhancement New feature or request processor/metricstransform Metrics Transform processor

Comments

@musaprg
Copy link
Contributor

musaprg commented Aug 7, 2023

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 musaprg added enhancement New feature or request needs triage New item requiring triage labels Aug 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

Pinging code owners:

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

@musaprg
Copy link
Contributor Author

musaprg commented Aug 7, 2023

/label processor/metricstransform

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

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.

@dmitryax
Copy link
Member

dmitryax commented Oct 9, 2023

Hi @musaprg, feel free to submit a PR

@musaprg
Copy link
Contributor Author

musaprg commented Oct 12, 2023

@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?

@crobert-1 crobert-1 removed the needs triage New item requiring triage label Oct 12, 2023
@crobert-1
Copy link
Member

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

Copy link
Contributor

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:

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

@github-actions github-actions bot added the Stale label Dec 12, 2023
@crobert-1 crobert-1 removed the Stale label Dec 12, 2023
Copy link
Contributor

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:

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

@github-actions github-actions bot added the Stale label Feb 12, 2024
@crobert-1 crobert-1 removed the Stale label Feb 26, 2024
@crobert-1
Copy link
Member

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

Copy link
Contributor

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:

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

@lopes-felipe
Copy link
Contributor

Implemented here:
#32935

@github-actions github-actions bot removed the Stale label May 8, 2024
@lopes-felipe
Copy link
Contributor

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

dmitryax pushed a commit that referenced this issue Jun 17, 2024
t00mas pushed a commit to t00mas/opentelemetry-collector-contrib that referenced this issue Jun 18, 2024
cparkins pushed a commit to AmadeusITGroup/opentelemetry-collector-contrib that referenced this issue Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request processor/metricstransform Metrics Transform processor
Projects
None yet
Development

No branches or pull requests

4 participants