Skip to content

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Sep 4, 2025

Follow guidelines and move instrumentation into its own type.

@MrAlias MrAlias added this to the v1.39.0 milestone Sep 4, 2025
@MrAlias MrAlias added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Sep 4, 2025
Copy link

codecov bot commented Sep 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.9%. Comparing base (a07b7e6) to head (5416fc5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #7307   +/-   ##
=====================================
  Coverage   82.9%   82.9%           
=====================================
  Files        266     267    +1     
  Lines      24984   24997   +13     
=====================================
+ Hits       20733   20744   +11     
- Misses      3876    3877    +1     
- Partials     375     376    +1     
Files with missing lines Coverage Δ
...out/stdouttrace/internal/observ/instrumentation.go 100.0% <100.0%> (ø)
exporters/stdout/stdouttrace/trace.go 73.8% <100.0%> (-17.7%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MrAlias MrAlias force-pushed the encap-stdouttrace-obs branch from 477479b to 404e2ad Compare September 4, 2025 21:17
@MrAlias MrAlias marked this pull request as ready for review September 4, 2025 21:22
@flc1125 flc1125 requested a review from Copilot September 5, 2025 01:04
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the stdouttrace.Exporter self-observability instrumentation by moving it into an internal package following OpenTelemetry Go project guidelines. The change encapsulates the instrumentation logic into a dedicated type to improve code organization and maintainability.

  • Extracted self-observability logic into a new internal/observ package
  • Created a dedicated Instrumentation type to handle metrics and measurement
  • Removed extensive test cases from the main test file that are now covered by the internal package tests

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
versions.yaml Added version reference configuration for the stdouttrace module
exporters/stdout/stdouttrace/trace_test.go Simplified tests by using the new observ package constants and removed detailed test cases
exporters/stdout/stdouttrace/trace.go Refactored to use the new Instrumentation type from the observ package
exporters/stdout/stdouttrace/internal/version.go Added version constant for the internal package
exporters/stdout/stdouttrace/internal/observ/instrumentation_test.go New comprehensive test suite for the instrumentation functionality
exporters/stdout/stdouttrace/internal/observ/instrumentation.go New package containing the extracted instrumentation logic
.codespellignore Added "observ" to the spell check ignore list

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@MrAlias MrAlias merged commit 9b6585a into open-telemetry:main Sep 9, 2025
30 checks passed
@MrAlias MrAlias deleted the encap-stdouttrace-obs branch September 9, 2025 19:11
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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants