Add span attribute owner.id for func SaveMetaRootStruct.
This commit is contained in:
parent
6cc373885c
commit
f588822664
7
save.go
7
save.go
|
@ -13,6 +13,7 @@ import (
|
||||||
"go.opentelemetry.io/otel"
|
"go.opentelemetry.io/otel"
|
||||||
"go.opentelemetry.io/otel/attribute"
|
"go.opentelemetry.io/otel/attribute"
|
||||||
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
|
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
|
||||||
|
"go.opentelemetry.io/otel/trace"
|
||||||
)
|
)
|
||||||
|
|
||||||
const tracerName = "git.bit5.ru/backend/dbmeta"
|
const tracerName = "git.bit5.ru/backend/dbmeta"
|
||||||
|
@ -114,7 +115,11 @@ func SaveMetaRootStruct(
|
||||||
deltaSave bool,
|
deltaSave bool,
|
||||||
) error {
|
) error {
|
||||||
|
|
||||||
ctx, span := tracer.Start(ctx, "SaveMetaRootStruct")
|
spanAttrs := trace.WithAttributes(
|
||||||
|
attribute.Int64("owner.id", int64(ownerId)),
|
||||||
|
)
|
||||||
|
|
||||||
|
ctx, span := tracer.Start(ctx, "SaveMetaRootStruct", spanAttrs)
|
||||||
defer span.End()
|
defer span.End()
|
||||||
|
|
||||||
dataItem := reflect.ValueOf(data)
|
dataItem := reflect.ValueOf(data)
|
||||||
|
|
Loading…
Reference in New Issue