Skip to content

Commit

Permalink
Use ctx instead of context.Background at jtracer new resource
Browse files Browse the repository at this point in the history
Signed-off-by: James Ryans <[email protected]>
  • Loading branch information
james-ryans committed Oct 19, 2023
1 parent f697f47 commit 5e6363a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/jtracer/jtracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func initOTEL(ctx context.Context, svc string) (*sdktrace.TracerProvider, error)
bsp := sdktrace.NewBatchSpanProcessor(traceExporter)

res, err := resource.New(
context.Background(),
ctx,
resource.WithSchemaURL(semconv.SchemaURL),
resource.WithAttributes(semconv.ServiceNameKey.String(svc)),
resource.WithTelemetrySDK(),
Expand Down

0 comments on commit 5e6363a

Please sign in to comment.