We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3a6286 commit 23032a0Copy full SHA for 23032a0
otel/noop.go
@@ -0,0 +1,37 @@
1
+package otel
2
+
3
+import (
4
+ "context"
5
6
+ "github.com/ydb-platform/ydb-go-sdk/v3/trace"
7
+)
8
9
+var (
10
+ _ Config = noopConfig{}
11
+ _ Span = noopSpan{}
12
13
14
+type (
15
+ noopConfig struct{}
16
+ noopSpan struct{}
17
18
19
+func (noopSpan) TraceID() string {
20
+ return ""
21
+}
22
23
+func (n noopSpan) Msg(string, ...KeyValue) {}
24
25
+func (n noopSpan) End(...KeyValue) {}
26
27
+func (noopConfig) Details() trace.Details {
28
+ return 0
29
30
31
+func (noopConfig) SpanFromContext(context.Context) Span {
32
+ return noopSpan{}
33
34
35
+func (noopConfig) Start(ctx context.Context, _ string, _ ...KeyValue) (context.Context, Span) {
36
+ return ctx, noopSpan{}
37
0 commit comments