Skip to content

Conversation

sginji
Copy link
Contributor

@sginji sginji commented Jun 30, 2025

Description

Add test_metrics.py and test_otlpcollector.py to validate the metrics_example.py and otlpcollector_example.py scripts.

  • test_metrics.py: Validates all 7 metric types with specific expected values
  • test_otlpcollector.py: Tests OTLP collector example with graceful timeout handling

Fixes #4001

Type of change

Please delete options that are not relevant.

  • [x ] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • [x ] Executed both tests in my environment

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • [x ] No.

Checklist:

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

Add test_metrics.py and test_otlpcollector.py to validate the
metrics_example.py and otlpcollector_example.py scripts.

- test_metrics.py: Validates all 7 metric types with specific expected values
- test_otlpcollector.py: Tests OTLP collector example with graceful timeout handling

Fixes open-telemetry#4001
@sginji sginji requested a review from a team as a code owner June 30, 2025 02:42
Copy link

linux-foundation-easycla bot commented Jun 30, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@xrmx
Copy link
Contributor

xrmx commented Jun 30, 2025

I think the issue was about running examples code in CI and not about writing some new tests

@sginji
Copy link
Contributor Author

sginji commented Jul 4, 2025

I think the issue was about running examples code in CI and not about writing some new tests

My bad! 😄 i'll update!

@sginji
Copy link
Contributor Author

sginji commented Jul 4, 2025

I think the issue was about running examples code in CI and not about writing some new tests

@xrmx - I do see that the existing tests run as part of CI. Example run from another PR that's open: https://github.com/open-telemetry/opentelemetry-python/actions/runs/15904348585/job/44855076756?pr=4659

Is there more to be done to add these tests to the CI pipeline? I see that they are configured here 🤔

@xrmx xrmx moved this to Ready for review in @xrmx's Python PR digest Jul 28, 2025
@sginji
Copy link
Contributor Author

sginji commented Aug 10, 2025

@xrmx just checking in again - can you help clarify the requirements?

@xrmx xrmx added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Aug 18, 2025
@xrmx
Copy link
Contributor

xrmx commented Aug 18, 2025

@sginji please fix the lint errors and setup pre-commit and we should be good to go.

@xrmx xrmx moved this from Ready for review to Reviewed PR that needs fixing in @xrmx's Python PR digest Aug 18, 2025
@sginji sginji force-pushed the sgali/otmpy-docs-test branch from f5442cb to f249def Compare August 27, 2025 07:41
@sginji sginji force-pushed the sgali/otmpy-docs-test branch from 3378d99 to 081bf0a Compare August 27, 2025 07:59
@sginji
Copy link
Contributor Author

sginji commented Aug 27, 2025

@sginji please fix the lint errors and setup pre-commit and we should be good to go.

@xrmx I've fixed lint and setup pre-commit too.

@xrmx xrmx enabled auto-merge (squash) August 28, 2025 10:45
@xrmx xrmx merged commit 6c8e2ab into open-telemetry:main Aug 28, 2025
468 of 469 checks passed
@github-project-automation github-project-automation bot moved this from Reviewed PR that needs fixing to Done in @xrmx's Python PR digest Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Test our docs
2 participants