OTel
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Service tags for OpenTelemetry services

lukegoyer
Observer

I have a few services ingesting metrics and traces with OpenTelemetry.  Is there a way I can add tags to those services based on their  OTel resource attributes?  I can see the attributes on the spans, but don't see them under the service's properties and tags.

I'm interested in using the service.version, deployment.environment, and other attributes that define ownership.

2 REPLIES 2

rgarzon1
Champion

Hi lukegoyer

i tried what you are pointing and its correct i cant see them either when i try to get them in tags

so in a short answer could be in this moment its not posible to set the spans attributes in auto tags.

 

you can try set them this using the entityid

  • entityselector, entityid, and next set for the entity the tags that you need (version, deployment) but this would be a long and tedious work. 

when i was triyng to give you a answer i notice that maybe you can use the release aproach for define that. 
because you are trying to achieve this 

https://www.dynatrace.com/support/help/manage/ownership/best-practices 

and one of the options its with tags

one way could be that you can create a nomenclature name for the services monitored by otel

  • <environment>-<owner>-<technology>-<name
  • OTEL_RESOURCE_ATTRIBUTES="service.name=<environment>-<owner>-<technology>-<name>,service.version=1.0.1"

and next use this in the entityselector for tagging

or in other way you can create a logic with custom api tag and set the tags manually with a single call

 

but i was not able to doit with spans attributes of OTel.

 

Regards

8 years architecting Dynatrace and observability solutions for 90+ clients across 4 countries. Fueled by coffee and curiosity.

issam
Observer
It has been almost three years since this limitation was discussed. Is there any supported workaround today, other than encoding metadata in the service.name ?

Featured Posts