go-zero/core/trace/resource.go
唐小鸭 e20ccdd011
Support for resource injection (#3383)
Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
2023-10-23 13:22:16 +00:00

11 lines
284 B
Go

package trace
import "go.opentelemetry.io/otel/attribute"
var attrResources = make([]attribute.KeyValue, 0)
// AddResources add more resources in addition to configured trace name.
func AddResources(attrs ...attribute.KeyValue) {
attrResources = append(attrResources, attrs...)
}