Skip to content

docs: add missing tests for getting started examples #4662

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sginji
Copy link

@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
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
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 🤔

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.

Test our docs
2 participants