chore: sdk/log/internal/x - generate x package from x component template - #7389
Merged
dmathieu merged 5 commits intoSep 22, 2025
Merged
Conversation
nikhilmantri0902
requested review from
MrAlias,
XSAM,
dashpole,
dmathieu,
flc1125 and
pellared
as code owners
September 19, 2025 22:04
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7389 +/- ##
=====================================
Coverage 85.5% 85.5%
=====================================
Files 274 275 +1
Lines 24614 24614
=====================================
+ Hits 21047 21048 +1
+ Misses 3188 3187 -1
Partials 379 379
🚀 New features to boost your workflow:
|
Member
|
Please fix the lint; we can run local checks with |
Contributor
Author
|
@flc1125 I have made the changes and fixed the lint. |
flc1125
approved these changes
Sep 20, 2025
yumosx
reviewed
Sep 20, 2025
dmathieu
approved these changes
Sep 22, 2025
Contributor
Author
|
Can we merge this @flc1125 ? |
MrAlias
added a commit
that referenced
this pull request
Sep 27, 2025
(#7411) Fix #7385 ### Summary This PR adds code generation for the `sdk/trace/internal/x` package using the shared x component template. It mirrors the implementation in `sdk/log/internal/x` (#7389) for the trace SDK. ### Changes - Added `gen.go` to run `go:generate` for `x.go` and `x_test.go`. - Generated `x/x.go` and `x/x_test.go` using the shared template. - Added `feature.go` with the `Observability` experimental feature flag for the trace SDK, following the pattern used in the log SDK. ### Verification - `go generate ./...` successfully generates the files. - Unit tests in `x_test.go` pass. ### References - Log implementation for reference: #7389 - Trace issue: #7385 Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
nikhilmantri0902
added a commit
to nikhilmantri0902/opentelemetry-go
that referenced
this pull request
Oct 12, 2025
- Add sdk/internal/gen.go with gotmpl directives to generate x/x.go and x/x_test.go - Refactor sdk/internal/x/x.go to generic Feature[T] with multi-key support and Keys() - Move Resource feature into sdk/internal/x/features.go (case-insensitive true enables) - Add tests: generic feature tests in x_test.go and Resource tests in features_test.go - Aligns with sdk/log/internal/x pattern introduced in PR open-telemetry#7389 Internal note: replaces Key() with Keys() for internal Feature API. Build and lints pass
dmathieu
added a commit
that referenced
this pull request
Oct 16, 2025
Closes #7384 - Add sdk/internal/gen.go with gotmpl directives to generate x/x.go and x/x_test.go - Refactor sdk/internal/x/x.go to generic Feature[T] with multi-key support and Keys() - Move Resource feature into sdk/internal/x/features.go (case-insensitive true enables) - Add tests: generic feature tests in x_test.go and Resource tests in features_test.go - Aligns with sdk/log/internal/x pattern introduced in PR #7389 Internal note: replaces Key() with Keys() for internal Feature API. Build and lints pass --------- Co-authored-by: Damien Mathieu <42@dmathieu.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7382
Idea from #7361
Ref: #7361
Components that need to be processed: sdk/log/internal/x