You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-12-16 00:11:27 +02:00
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>
9 lines
471 B
Go
9 lines
471 B
Go
// Copyright The OpenTelemetry Authors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Package internal provides internal functionality for the sdk/trace package.
|
|
package internal // import "go.opentelemetry.io/otel/sdk/trace/internal"
|
|
|
|
//go:generate gotmpl --body=../../../internal/shared/x/x.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/otel/sdk/trace\" }" --out=x/x.go
|
|
//go:generate gotmpl --body=../../../internal/shared/x/x_test.go.tmpl "--data={}" --out=x/x_test.go
|