Open
Description
Is your feature request related to a problem? Please describe.
I see that the service.name
is obtained but I was thinking if it can detect it based on Docker container labels.
Describe the solution you'd like
Assuming we can add docker-java to the instrumentation and you can get
if label "com.docker.swarm.task" exists {
service.namespace= label "com.docker.stack.namespace"
service.name=label "com.docker.swarm.service.name"
}
Describe alternatives you've considered
I guess I can always put it in as an environment variables like this
OTEL_SERVICE_NAME: '{{.Service.Name}}'
OTEL_RESOURCE_ATTRIBUTES: >
service.instance.id={{.Task.Name}},
service.namespace={{index .Service.Labels "com.docker.stack.namespace"}}
Additional context
No response