From d04b0f8b69926a0f9b4c6066b7355a6e309e0779 Mon Sep 17 00:00:00 2001 From: Robb Kidd Date: Mon, 24 Apr 2023 23:23:14 +0000 Subject: [PATCH] add release version to user-agent and Auto attribute --- pkg/opentelemetry/controller.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/opentelemetry/controller.go b/pkg/opentelemetry/controller.go index 79935cde9..a16ff23e3 100644 --- a/pkg/opentelemetry/controller.go +++ b/pkg/opentelemetry/controller.go @@ -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 @@ -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 {