Set the endpoint URL path to /v1/traces (Usually the default)
5
To authenticate against the collector, make your OpenTelemetry agent authenticate using your federated graph token as a bearer token, by adding the following HTTP header: Authorization: Bearer <your token>
client := otlptracehttp.NewClient( otlptracehttp.WithEndpoint("https://cosmo-otel.wundergraph.com"), otlptracehttp.WithHeaders(map[string]string{ "Authorization": "Bearer <secret>", }),)tp := sdktrace.NewTracerProvider( sdktrace.WithResource(resource.NewSchemaless(semconv.ServiceNameKey.String(otelOpts.ServiceName))), sdktrace.WithSampler( sdktrace.ParentBased( sdktrace.TraceIDRatioBased(c.Sampler), // When the parent span is sampled, the child span will be sampled. ), ),)