Skip to content
Snippets Groups Projects
Commit b1672785 authored by ale's avatar ale
Browse files

Add hostname to default tracing tags

parent 063ac003
No related branches found
No related tags found
No related merge requests found
Pipeline #43827 passed
......@@ -77,11 +77,13 @@ func getServiceName() string {
}
func defaultResource(serviceName string) *resource.Resource {
hostname, _ := os.Hostname()
r, _ := resource.Merge(
resource.Default(),
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String(serviceName),
semconv.HostNameKey.String(hostname),
),
)
return r
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment