Skip to content

chore(metrics): fix metric reader types and tests#4938

Open
anuraaga wants to merge 3 commits intoopen-telemetry:mainfrom
anuraaga:metrics-reader-types
Open

chore(metrics): fix metric reader types and tests#4938
anuraaga wants to merge 3 commits intoopen-telemetry:mainfrom
anuraaga:metrics-reader-types

Conversation

@anuraaga
Copy link
Contributor

Description

While implementing metric reader metrics, I ran into some issues with the test because currently the tests seem incorrect, along with some of the type annotations. The metric pipeline uses MetricsData but certain types and mocks were using list[Metric]. This corrects the types and aligns tests with them - tests previously passed due to duck typing despite not really being valid usage

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Unit tests

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@anuraaga anuraaga requested a review from a team as a code owner February 27, 2026 07:04
@xrmx xrmx moved this to Ready for review in @xrmx's Python PR digest Feb 27, 2026
@xrmx
Copy link
Contributor

xrmx commented Feb 27, 2026

@anuraaga please add a changelog entry, it's good to have trace of typing change even if it is for internal interfaces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

2 participants