File tree 1 file changed +9
-6
lines changed
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -802,6 +802,8 @@ The following resource attributes are calculated from the pod's metadata.
802
802
803
803
Choose the first value found :
804
804
805
+ - ` pod.annotation[resource.opentelemetry.io/service.name]`
806
+ - ` if (config[useLabelsForResourceAttributes]) pod.label[app.kubernetes.io/name]`
805
807
- ` k8s.depleyment.name`
806
808
- ` k8s.replicaset.name`
807
809
- ` k8s.statefulset.name`
@@ -813,15 +815,16 @@ Choose the first value found:
813
815
814
816
# ### How service.version is calculated
815
817
816
- Take the tag from the docker image name of the container.
817
- If the tag contains a `/`, the tag is ignored (this can happen if the image name contains a port number).
818
+ - ` pod.annotation[resource.opentelemetry.io/service.version]`
819
+ - ` if (cfg[useLabelsForResourceAttributes]) pod.label[app.kubernetes.io/version]`
820
+ - ` if (contains(container.image.tags[0], '/') == false) contains(container.image.tags[0]
818
821
819
- # ### How service.instance.id is calculated
822
+ #### How ` service.instance.id` is calculated
820
823
821
- Create a unique identifier for the application running in the container.
822
- The identifier is created by concatenating the following values :
823
824
824
- ` <k8s.namespace.name>.<k8s.pod.name>.<k8s.container.name>`
825
+ - ` pod.annotation[resource.opentelemetry.io/service.instance.id]`
826
+ - ` if (config[useLabelsForResourceAttributes]) pod.label[app.kubernetes.io/instance]`
827
+ - ` concat([k8s.namespace.name, k8s.pod.name, k8s.container.name], '.')`
825
828
826
829
# # Contributing and Developing
827
830
You can’t perform that action at this time.
0 commit comments