mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 02:48:45 +08:00
fix: can't generate traceID when use noop exporter (#33191)
relate: https://github.com/milvus-io/milvus/issues/33190 Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
This commit is contained in:
parent
89ad3eb0ca
commit
f8929cc36a
@ -29,7 +29,6 @@ import (
|
||||
"go.opentelemetry.io/otel/sdk/resource"
|
||||
sdk "go.opentelemetry.io/otel/sdk/trace"
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/milvus-io/milvus/pkg/log"
|
||||
@ -63,11 +62,6 @@ func CloseTracerProvider(ctx context.Context) error {
|
||||
}
|
||||
|
||||
func SetTracerProvider(exp sdk.SpanExporter, traceIDRatio float64) {
|
||||
if exp == nil {
|
||||
otel.SetTracerProvider(trace.NewNoopTracerProvider())
|
||||
return
|
||||
}
|
||||
|
||||
tp := sdk.NewTracerProvider(
|
||||
sdk.WithBatcher(exp),
|
||||
sdk.WithResource(resource.NewWithAttributes(
|
||||
|
Loading…
Reference in New Issue
Block a user