diff --git a/flow/cmd/worker_common.go b/flow/cmd/worker_common.go index 559803cfc0..6c4914dca1 100644 --- a/flow/cmd/worker_common.go +++ b/flow/cmd/worker_common.go @@ -12,6 +12,7 @@ func GetTemporalClientInterceptors() []interceptor.ClientInterceptor { tracingInterceptor, err := opentelemetry.NewTracingInterceptor(opentelemetry.TracerOptions{}) if err != nil { log.Printf("failed to create tracing interceptor: %v\n", err) + return nil } return []interceptor.ClientInterceptor{tracingInterceptor} } diff --git a/flow/instrumentation/common/resource.go b/flow/instrumentation/common/resource.go index 711b83fba2..517ea0a60e 100644 --- a/flow/instrumentation/common/resource.go +++ b/flow/instrumentation/common/resource.go @@ -5,15 +5,13 @@ import ( "go.opentelemetry.io/otel/semconv/v1.24.0" ) -// NewOtelResource newOtelResource returns a resource describing this application. +// NewOtelResource returns a resource describing this application. func NewOtelResource(otelServiceName string) (*resource.Resource, error) { - r, err := resource.Merge( + return resource.Merge( resource.Default(), resource.NewWithAttributes( semconv.SchemaURL, semconv.ServiceNameKey.String(otelServiceName), ), ) - - return r, err }