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

Fix aggregation.Default to properly return the default one #3967

Merged
merged 4 commits into from Apr 5, 2023

Conversation

dmathieu
Copy link
Member

@dmathieu dmathieu commented Apr 4, 2023

About aggregation.Default{}, the spec says:

The Default Aggregation informs the SDK to use the Instrument Kind (e.g. at View registration OR at first seen measurement) to select an aggregation and configuration parameters.

However, right now, if we use that default in an aggregation selector, we get the following error:

could not create all aggregators: creating aggregator with instrumentKind: 2, aggregation {}: unrecognized aggregation: {}

This fixes that issue, ensuring the default aggregator is properly found, as per the spec (and the aggregation.Default godoc).

@codecov
Copy link

codecov bot commented Apr 4, 2023

Codecov Report

Merging #3967 (97d6084) into main (6b7e207) will increase coverage by 0.0%.
The diff coverage is 100.0%.

❗ Current head 97d6084 differs from pull request most recent head f58dd3a. Consider uploading reports for the commit f58dd3a to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #3967   +/-   ##
=====================================
  Coverage   82.0%   82.0%           
=====================================
  Files        171     171           
  Lines      12951   12955    +4     
=====================================
+ Hits       10627   10635    +8     
+ Misses      2104    2100    -4     
  Partials     220     220           
Impacted Files Coverage Δ
sdk/metric/pipeline.go 89.6% <100.0%> (+0.1%) ⬆️

... and 2 files with indirect coverage changes

@MrAlias MrAlias merged commit 02fa1e2 into open-telemetry:main Apr 5, 2023
21 checks passed
@dmathieu dmathieu deleted the fix-default-aggregation branch April 5, 2023 15:09
@MrAlias MrAlias mentioned this pull request Apr 27, 2023
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.

None yet

5 participants