/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
cloud/tasks/tracing/attributes.go
41 строка
989 B
Grigoriy Yurgin
[Disk Manager] do not print stacktrace in error in traces, do not print retriable errors above non-retriable errors in logs and traces (#2294)
11 ноя 2024, 13:54
Не верифицирован
11 ноя 2024, 13:54
37ad7b6
Код
Авторство
О чём код?
package tracing import ( "github.com/ydb-platform/nbs/cloud/tasks/errors" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" ) //////////////////////////////////////////////////////////////////////////////// func WithAttributes( attributes ...attribute.KeyValue, ) trace.SpanStartEventOption { return trace.WithAttributes(attributes...) } //////////////////////////////////////////////////////////////////////////////// func AttributeBool(key string, value bool) attribute.KeyValue { return attribute.Bool(key, value) } func AttributeInt(key string, value int) attribute.KeyValue { return attribute.Int(key, value) } func AttributeInt64(key string, value int64) attribute.KeyValue { return attribute.Int64(key, value) } func AttributeString(key string, value string) attribute.KeyValue { return attribute.String(key, value) } func AttributeError(err error) attribute.KeyValue { return attribute.String( "error", errors.ErrorForTracing(err), ) }