-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uploadTrace by grpc has something wrong #4728
Comments
From the description I do not see any proof that something is wrong with the exporter. However, I personally suggest creating an issue in https://github.com/grafana/tempo. If there is a bug in our exporter, their maintainers should be able to locate the problem. |
I have run into the same issue when going from Something funky seem to be going on... The tracing setup code used is as following (with the func Initialize() error {
if !config.GetTracingEnabled() {
return nil
}
insecure := config.GetTracingInsecureTransport()
var tpo trace.TracerProviderOption
switch config.GetTracingTransport() {
case "grpc":
opts := []otlptracegrpc.Option{
otlptracegrpc.WithEndpoint(config.GetTracingEndpoint()),
}
if insecure {
opts = append(opts, otlptracegrpc.WithInsecure())
}
exp, err := otlptracegrpc.New(context.Background(), opts...)
if err != nil {
return fmt.Errorf("building tracing exporter: %w", err)
}
tpo = trace.WithBatcher(exp)
case "http":
opts := []otlptracehttp.Option{
otlptracehttp.WithEndpoint(config.GetTracingEndpoint()),
}
if insecure {
opts = append(opts, otlptracehttp.WithInsecure())
}
exp, err := otlptracehttp.New(context.Background(), opts...)
if err != nil {
return fmt.Errorf("building tracing exporter: %w", err)
}
tpo = trace.WithBatcher(exp)
default:
return fmt.Errorf("invalid tracing transport: %s", config.GetTracingTransport())
}
r, _ := resource.Merge(
resource.Default(),
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceName("GoToSocial"),
),
)
tp := trace.NewTracerProvider(
tpo,
trace.WithResource(r),
)
otel.SetTracerProvider(tp)
propagator := propagation.NewCompositeTextMapPropagator(
propagation.TraceContext{},
propagation.Baggage{},
)
otel.SetTextMapPropagator(propagator)
log.Hook(func(ctx context.Context, kvs []kv.Field) []kv.Field {
span := oteltrace.SpanFromContext(ctx)
if span != nil && span.SpanContext().HasTraceID() {
return append(kvs, kv.Field{K: "traceID", V: span.SpanContext().TraceID().String()})
}
return kvs
})
return nil
} OpenTelemetry libraries used:
Go version used is |
You miss error handling for My guess is that you have forgotten to bump the We are perfectly aware that this issue is annoying. Already tracked under: #2341 |
Ah! That was the problem, thank you. |
Description
I send the trace to tempo, the code works without any error, but I can't find the trace in tempo.
Environment
Steps To Reproduce
I set tp with code below
when I use v1.14.0
It works well, It sends message without error and I can find the trace in tempo which I send.
But when I use v1.21.0,
It still sends message without any error but I can't find it in tempo.
And tempo dose not have any error log.
the difference about two version mod is the picture below
So perhaps It has something about the package?
The text was updated successfully, but these errors were encountered: