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 #33442

Closed
lopes-felipe opened this issue Jun 9, 2024 · 2 comments
Labels
enhancement New feature or request needs triage New item requiring triage processor/metricstransform Metrics Transform processor

Comments

@lopes-felipe
Copy link
Member

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

This is purely a duplication of this issue, in order to draw attention to the proposed solution. Feel free to close this once we manage to move forward with the original one.

@lopes-felipe lopes-felipe added enhancement New feature or request needs triage New item requiring triage labels Jun 9, 2024
@github-actions github-actions bot added the processor/metricstransform Metrics Transform processor label Jun 9, 2024
Copy link
Contributor

github-actions bot commented Jun 9, 2024

Pinging code owners:

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

@lopes-felipe
Copy link
Member Author

PR merged. Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage New item requiring triage processor/metricstransform Metrics Transform processor
Projects
None yet
Development

No branches or pull requests

1 participant