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

[processor/transform] introduce aggregate_on_attributes function for metrics #33334

Merged
merged 6 commits into from
Jul 29, 2024

Conversation

odubajDT
Copy link
Contributor

@odubajDT odubajDT commented Jun 3, 2024

Link to tracking Issue: #16224

Changes:

  • implemented aggregate_on_attributes function (supporting sum/min/max/mean/median) for Sum, Gauge, Histogram, ExponentialHistogram
  • tests
  • documentation

Depends on #33669

@github-actions github-actions bot added the processor/transform Transform processor label Jun 3, 2024
@odubajDT odubajDT changed the title [processor/transform] introduce aggregate function for metrics [WIP] [processor/transform] introduce aggregate functions for metrics [WIP] Jun 4, 2024
@github-actions github-actions bot added the processor/metricstransform Metrics Transform processor label Jun 6, 2024
@github-actions github-actions bot requested a review from dmitryax June 6, 2024 10:55
@odubajDT odubajDT changed the title [processor/transform] introduce aggregate functions for metrics [WIP] [processor/transform] introduce aggregate functions for metrics Jun 6, 2024
@odubajDT odubajDT force-pushed the feat/16224/aggregate branch 2 times, most recently from 9156fe4 to 2eb79ed Compare June 6, 2024 11:31
@odubajDT odubajDT marked this pull request as ready for review June 6, 2024 12:00
@odubajDT odubajDT requested a review from a team June 6, 2024 12:00
processor/transformprocessor/README.md Outdated Show resolved Hide resolved
processor/transformprocessor/README.md Outdated Show resolved Hide resolved
processor/transformprocessor/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@evan-bradley evan-bradley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this on. I'm still working through it, just a few comments so far.

@odubajDT odubajDT changed the title [processor/transform] introduce aggregate functions for metrics [processor/transform] introduce aggregate_label function for metrics Jun 7, 2024
@odubajDT odubajDT changed the title [processor/transform] introduce aggregate_label function for metrics [processor/transform] introduce aggregate_on_attributes function for metrics Jun 11, 2024
Copy link
Contributor

@evan-bradley evan-bradley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At a high level this looks good to me, I only have one minor note on the documentation. The functionality here is complex, so I will do a deeper dive tomorrow on the aggregation itself.

processor/transformprocessor/README.md Show resolved Hide resolved
@evan-bradley
Copy link
Contributor

@TylerHelmuth I'll comb over the aggregation logic in-depth, but do you agree with the overall design so far?

Copy link
Member

@TylerHelmuth TylerHelmuth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be very cool if metricstransformprocessor and transformprocessor could share a library for all the pdata manipulation parts of the business logic. That would make me feel more confident that the 2 processors are doing equivalent work.

@odubajDT
Copy link
Contributor Author

odubajDT commented Jun 17, 2024

It would be very cool if metricstransformprocessor and transformprocessor could share a library for all the pdata manipulation parts of the business logic. That would make me feel more confident that the 2 processors are doing equivalent work.

Thanks for the reply, where would you prefer to place such a library? Since the logic is currently present in two separate packages. Would you prefer creating a new module for it?

Thank you in advance!

@TylerHelmuth
Copy link
Member

TylerHelmuth commented Jun 17, 2024

@odubajDT somewhere in internal/coreinternals would be good. I think the right approach would be to duplicate what you need and hook up the metricstransformprocessor in 1 PR, and then in this PR use that new code. That will keep things smaller.

Also let me know if you think that the way the metricstransformprocessor is setup will not allow this idea. I am hoping the fact that both processors use pdata makes it possible to share business logic.

odubajDT and others added 6 commits July 29, 2024 13:29
Copy link
Member

@TylerHelmuth TylerHelmuth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evan-bradley the readme updates look correct to me based on my understanding of the metrictransformprocessors functionality, please check

@evan-bradley
Copy link
Contributor

The new readme description is correct based on my understanding as well. Thanks for catching that. I may do some wordsmithing in the future since it's a slightly complex process, but I think what we have is sufficient for now.

@evan-bradley evan-bradley merged commit 1446a03 into open-telemetry:main Jul 29, 2024
154 checks passed
@github-actions github-actions bot added this to the next release milestone Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants