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

Add combine action #1506

Merged

Conversation

james-bebbington
Copy link
Member

@james-bebbington james-bebbington commented Nov 6, 2020

Description:

Add a "combine" action to the Metrics Transform processor:

  • Validates that all metrics to be combined have the same type, unit, and labelset
  • Re-uses the existing data point aggregation functions to merge data points from different metrics
  • Automatically appends labels extracted from the regexp filter to data points

See README & added test cases for more details.

Resolves #1088

@james-bebbington james-bebbington requested a review from a team November 6, 2020 08:06
@codecov
Copy link

codecov bot commented Nov 6, 2020

Codecov Report

Merging #1506 (7f4a58a) into master (aa83481) will increase coverage by 0.00%.
The diff coverage is 98.88%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1506   +/-   ##
=======================================
  Coverage   88.71%   88.71%           
=======================================
  Files         346      347    +1     
  Lines       16934    16997   +63     
=======================================
+ Hits        15023    15079   +56     
- Misses       1443     1450    +7     
  Partials      468      468           
Flag Coverage Δ
integration 70.80% <ø> (-0.08%) ⬇️
unit 87.37% <98.88%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...stransformprocessor/metrics_transform_processor.go 99.14% <98.00%> (-0.86%) ⬇️
processor/metricstransformprocessor/config.go 100.00% <100.00%> (ø)
...metricstransformprocessor/datapoint_aggregation.go 100.00% <100.00%> (ø)
processor/metricstransformprocessor/factory.go 98.79% <100.00%> (+0.02%) ⬆️
...sformprocessor/operation_aggregate_label_values.go 100.00% <100.00%> (ø)
...cstransformprocessor/operation_aggregate_labels.go 100.00% <100.00%> (ø)
receiver/prometheusexecreceiver/receiver.go 85.83% <0.00%> (-2.50%) ⬇️
...eiver/awsxrayreceiver/internal/udppoller/poller.go 97.67% <0.00%> (-2.33%) ⬇️
receiver/carbonreceiver/transport/tcp_server.go 65.34% <0.00%> (-1.00%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa83481...7f4a58a. Read the comment docs.

@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Nov 14, 2020
@nilebox nilebox self-assigned this Nov 16, 2020
}

groupedTimeseries := mtp.groupTimeseries(allTimeseries, len(combinedMetric.MetricDescriptor.LabelKeys))
aggregatedTimeseries := mtp.mergeTimeseries(groupedTimeseries, transform.AggregationType, combinedMetric.MetricDescriptor.Type)
Copy link
Member

Choose a reason for hiding this comment

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

Do you validate that transform.AggregationType is set correctly? Similar to Action being one of 3 possible "enum" values.

Copy link
Member

Choose a reason for hiding this comment

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

Also, should the function be named combineTimeseries, or action "merge" for consistency?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you validate that transform.AggregationType is set correctly? Similar to Action being one of 3 possible "enum" values.

The way config is validated in this component is a little strange at the moment and there is validation missing for quite a few important cases. For now, I've added the obvious missing validation: on AggregationType & OperationAction.

This component probably needs a future PR to separate config into different types for different actions.

Also, should the function be named combineTimeseries, or action "merge" for consistency?

I think this is okay. One aspect of the "combine" action is merging timeseries. Merging timeseries is also relevant for the aggregating labels & aggregating label values actions.

@bogdandrutu bogdandrutu merged commit 4a81c80 into open-telemetry:master Nov 17, 2020
ljmsc referenced this pull request in ljmsc/opentelemetry-collector-contrib Feb 21, 2022
…jaeger (#1506)

* Bump google.golang.org/api in /exporters/trace/jaeger

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.37.0 to 0.38.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](googleapis/google-api-go-client@v0.37.0...v0.38.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Windows Performance Counters Receiver
4 participants