Skip to content

Add tests for malformed selectors in readers#4350

Merged
pellared merged 9 commits into
open-telemetry:mainfrom
MadVikingGod:mvg/agg-selector
Jul 25, 2023
Merged

Add tests for malformed selectors in readers#4350
pellared merged 9 commits into
open-telemetry:mainfrom
MadVikingGod:mvg/agg-selector

Conversation

@MadVikingGod
Copy link
Copy Markdown
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
Copy Markdown

codecov Bot commented Jul 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.4%. Comparing base (c1a644a) to head (8ee9cd7).
Report is 1537 commits behind head on main.

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 with missing lines Coverage Δ
sdk/metric/manual_reader.go 76.8% <100.0%> (+0.5%) ⬆️
sdk/metric/pipeline.go 90.7% <100.0%> (-1.1%) ⬇️
sdk/metric/reader.go 100.0% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MadVikingGod MadVikingGod marked this pull request as ready for review July 21, 2023 20:53
Comment thread sdk/metric/meter_test.go Outdated
Comment thread CHANGELOG.md
Comment thread CHANGELOG.md Outdated
@MrAlias MrAlias added the area:metrics Part of OpenTelemetry Metrics label Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:metrics Part of OpenTelemetry Metrics

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

6 participants