Add support for user defined OTEL resource attributes#36
Add support for user defined OTEL resource attributes#36clly wants to merge 2 commits intoweaveworks-experiments:mainfrom
Conversation
This will add support for pulling in opentelemetry's default attributes It adds sdk information, service.name and discrete key/value entries as specified on the environment and local host information such as the hostname and instance.
|
Thanks for the PR. Can you describe how those attributes are useful for Kspan? It generates spans that claim to come from many different components such as kubectl, scheduler, controller-manager, so I wonder if it would be confusing that they all have the same host information. |
|
Sorry about that. One of the default attributes is also anything that exists in the OTEL_RESOURCE_ATTRIBUTES environment variable. This change pulls that in as well as all the SDK and local host/runtime environment information |
|
It is possible to only pull in the environment variable attributes instead of everything. If that's preferred let me know and I can change it |
|
Yes, might be safer to start just with the env-vars. |
|
I've updated the PR to only pull in resources from the environment |
This will add support for pulling in opentelemetry's default attributes
It adds sdk information, service.name and discrete key/value entries as
specified on the environment and local host information such as the
hostname and instance.