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 tests for malformed selectors in readers #4350

Merged
merged 9 commits into from
Jul 25, 2023

Conversation

MadVikingGod
Copy link
Contributor

This adds tests for unusual ways that users may configure Reader's AggregationSelector and TemporalitySelector.

This fixes two errors:

  1. If the ManualReader's AggregationSelector ever returns nil the reader would panic.
  2. If a Pipeline's Reader's AggregationSelector returns nil or DefaultAggreation it wouldn't correctly fall back to the appropriate Aggregation for the InstrumentKind.

Resloves #3665

@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Merging #4350 (8ee9cd7) into main (c1a644a) will decrease coverage by 0.1%.
The diff coverage is 100.0%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #4350     +/-   ##
=======================================
- Coverage   83.4%   83.4%   -0.1%     
=======================================
  Files        184     184             
  Lines      14376   14383      +7     
=======================================
+ Hits       12003   12006      +3     
- Misses      2145    2149      +4     
  Partials     228     228             
Files Changed Coverage Δ
sdk/metric/reader.go 100.0% <ø> (ø)
sdk/metric/manual_reader.go 76.8% <100.0%> (+0.5%) ⬆️
sdk/metric/pipeline.go 90.7% <100.0%> (-1.1%) ⬇️

sdk/metric/meter_test.go Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@pellared pellared merged commit d423bd4 into open-telemetry:main Jul 25, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

6 participants