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>
Add the `x` package to handle experimental feature flagging within the
go.opentelemetry.io/otel/sdk module. Currently this only supports
enabling experimental resource semantic conventions.
Resolve#5436
cc @pyohannes
---------
Co-authored-by: Sam Xie <sam@samxie.me>