Support for resource injection (#3383)
Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
This commit is contained in:
10
core/trace/resource.go
Normal file
10
core/trace/resource.go
Normal file
@@ -0,0 +1,10 @@
|
||||
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...)
|
||||
}
|
||||
Reference in New Issue
Block a user