Skip to content

Commit

Permalink
add release version to user-agent and Auto attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
robbkidd committed Apr 24, 2023
1 parent 669b2bc commit d04b0f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/opentelemetry/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ const (
)

var (
// releaseVersion = ??? // TODO: reference version of the build to include in outward comms
releaseVersion = "v0.1.0-alpha" // TODO: reference something instead of hard-coding
// start of this autoinstrumentation's exporter User-Agent header, e.g. ""OTel-Go-Auto-Instrumentation/1.2.3"
baseUserAgent = fmt.Sprintf("OTel-Go-Auto-Instrumentation") // TODO: include the releaseVersion
baseUserAgent = fmt.Sprintf("OTel-Go-Auto-Instrumentation/%s", releaseVersion)
// Information about the runtime environment for inclusion in User-Agent
runtimeInfo = fmt.Sprintf("%s (%s/%s)", strings.Replace(runtime.Version(), "go", "go/", 1), runtime.GOOS, runtime.GOARCH)
// The default User-Agent when no additions have been given
Expand Down Expand Up @@ -104,7 +104,7 @@ func NewController() (*Controller, error) {
resource.WithAttributes(
semconv.ServiceNameKey.String(serviceName),
semconv.TelemetrySDKLanguageGo,
// TODO: semconv.TelemetryAutoVersionKey.String(releaseVersion),
semconv.TelemetryAutoVersionKey.String(releaseVersion),
),
)
if err != nil {
Expand Down

0 comments on commit d04b0f8

Please sign in to comment.