Skip to content

Commit 872f482

Browse files
committed
add docs
1 parent d248262 commit 872f482

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

+29
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,35 @@ The priority for setting resource attributes is as follows (first found wins):
794794
This priority is applied for each resource attribute separately, so it is possible to set some attributes via
795795
annotations and others via labels.
796796

797+
### How resource attributes are calculated from the pod's metadata
798+
799+
The following resource attributes are calculated from the pod's metadata.
800+
801+
#### How service.name is calculated
802+
803+
Choose the first value found:
804+
805+
- `k8s.depleyment.name`
806+
- `k8s.replicaset.name`
807+
- `k8s.statefulset.name`
808+
- `k8s.daemonset.name`
809+
- `k8s.cronjob.name`
810+
- `k8s.job.name`
811+
- `k8s.pod.name`
812+
- `k8s.container.name`
813+
814+
#### How service.version is calculated
815+
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+
819+
#### How service.instance.id is calculated
820+
821+
Create a unique identifier for the application running in the container.
822+
The identifier is created by concatenating the following values:
823+
824+
`<k8s.namespace.name>.<k8s.pod.name>.<k8s.container.name>`
825+
797826
## Contributing and Developing
798827

799828
Please see [CONTRIBUTING.md](CONTRIBUTING.md).

0 commit comments

Comments
 (0)