Skip to content

Commit

Permalink
fix: small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
iamKunalGupta committed May 21, 2024
1 parent 76f948a commit 60c2ebc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions flow/cmd/worker_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
6 changes: 2 additions & 4 deletions flow/instrumentation/common/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 60c2ebc

Please sign in to comment.