From 75fd7fc4e2850c69eac58b8b0b9ad0be3c27b4ab Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 11 May 2020 15:32:41 +0200 Subject: [PATCH] Add build information to OTEL binaries Signed-off-by: Pavol Loffay --- cmd/opentelemetry-collector/cmd/agent/main.go | 7 ++++--- cmd/opentelemetry-collector/cmd/collector/main.go | 7 ++++--- cmd/opentelemetry-collector/cmd/ingester/main.go | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/cmd/opentelemetry-collector/cmd/agent/main.go b/cmd/opentelemetry-collector/cmd/agent/main.go index ac281bcebf8..08cec247a7c 100644 --- a/cmd/opentelemetry-collector/cmd/agent/main.go +++ b/cmd/opentelemetry-collector/cmd/agent/main.go @@ -30,6 +30,7 @@ import ( "github.com/jaegertracing/jaeger/cmd/opentelemetry-collector/app/defaults" "github.com/jaegertracing/jaeger/cmd/opentelemetry-collector/app/processor/resourceprocessor" jconfig "github.com/jaegertracing/jaeger/pkg/config" + "github.com/jaegertracing/jaeger/pkg/version" "github.com/jaegertracing/jaeger/plugin/sampling/strategystore/static" ) @@ -40,12 +41,12 @@ func main() { } } + ver := version.Get() info := service.ApplicationStartInfo{ ExeName: "jaeger-opentelemetry-agent", LongName: "Jaeger OpenTelemetry Agent", - // TODO - //Version: version.Version, - //GitHash: version.GitHash, + Version: ver.GitVersion, + GitHash: ver.GitCommit, } v := viper.New() diff --git a/cmd/opentelemetry-collector/cmd/collector/main.go b/cmd/opentelemetry-collector/cmd/collector/main.go index 9339d672d4b..aea0d0ee75c 100644 --- a/cmd/opentelemetry-collector/cmd/collector/main.go +++ b/cmd/opentelemetry-collector/cmd/collector/main.go @@ -31,6 +31,7 @@ import ( "github.com/jaegertracing/jaeger/cmd/opentelemetry-collector/app/defaults" "github.com/jaegertracing/jaeger/cmd/opentelemetry-collector/app/processor/resourceprocessor" jConfig "github.com/jaegertracing/jaeger/pkg/config" + "github.com/jaegertracing/jaeger/pkg/version" "github.com/jaegertracing/jaeger/plugin/sampling/strategystore/static" "github.com/jaegertracing/jaeger/plugin/storage" ) @@ -42,12 +43,12 @@ func main() { } } + ver := version.Get() info := service.ApplicationStartInfo{ ExeName: "jaeger-opentelemetry-collector", LongName: "Jaeger OpenTelemetry Collector", - // TODO - //Version: version.Version, - //GitHash: version.GitHash, + Version: ver.GitVersion, + GitHash: ver.GitCommit, } v := viper.New() diff --git a/cmd/opentelemetry-collector/cmd/ingester/main.go b/cmd/opentelemetry-collector/cmd/ingester/main.go index 6bd7ba651e0..72cae2e0bc5 100644 --- a/cmd/opentelemetry-collector/cmd/ingester/main.go +++ b/cmd/opentelemetry-collector/cmd/ingester/main.go @@ -29,6 +29,7 @@ import ( "github.com/jaegertracing/jaeger/cmd/opentelemetry-collector/app" "github.com/jaegertracing/jaeger/cmd/opentelemetry-collector/app/defaults" jconfig "github.com/jaegertracing/jaeger/pkg/config" + "github.com/jaegertracing/jaeger/pkg/version" "github.com/jaegertracing/jaeger/plugin/storage" ) @@ -39,12 +40,12 @@ func main() { } } + ver := version.Get() info := service.ApplicationStartInfo{ ExeName: "jaeger-opentelemetry-ingester", LongName: "Jaeger OpenTelemetry Ingester", - // TODO - //Version: version.Version, - //GitHash: version.GitHash, + Version: ver.GitVersion, + GitHash: ver.GitCommit, } v := viper.New()