-
Notifications
You must be signed in to change notification settings - Fork 26
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
Is there a way to close request traces export in provider? #30
Comments
cc @rogerogers |
Based on your description, I think you can use NoopExporter. package main
import (
"context"
"github.com/hertz-contrib/obs-opentelemetry/provider"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
"go.opentelemetry.io/otel/sdk/trace/tracetest"
)
func main() {
traceExporter := tracetest.NewNoopExporter()
p := provider.NewOpenTelemetryProvider(
provider.WithSdkTracerProvider(sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sdktrace.NewSimpleSpanProcessor(traceExporter)))),
provider.WithEnableMetrics(false),
)
defer p.Shutdown(context.Background())
} Just curious, if you don't care about uploading, maybe I can understand why you need a trace ID, but what is the purpose of the span ID? |
will span_id depend on uploading? in our case, we will output the trace_id and span_id through log, there will be another program to deal the log. Actually I am not understanding what upload does? Is it collect the data and show it, like grafana? |
Link tracking roughly determines link sequence based on SpanId and ParentSpanId. If there is only SpanId, it seems to have no meaning. |
Can work with https://www.volcengine.com/docs/6431/158278 |
fix[logging/zap]:Modify span status judgment
I read the following website to use hertz with opentelemetry:
https://www.cloudwego.io/zh/docs/hertz/tutorials/observability/open-telemetry/
when I run the demo below in my local:
https://github.com/cloudwego/hertz-examples/blob/main/opentelemetry/hertz/server/main.go
Each time I request the server, I found there will always be a error like below:
2023/11/30 10:43:58 traces export: context deadline exceeded: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:4317: connect: connection refused"
In my case, I just need a trace_id and span_id to generate, but not care about whether request traces export in provider, so is there a way to close it?
The text was updated successfully, but these errors were encountered: