otel-profiling-agent icon indicating copy to clipboard operation
otel-profiling-agent copied to clipboard

add values of OTEL_SERVICE_NAME and OTEL_RESOURCE_ATTRIBUTES envvars to resource attributes

Open NimrodAvni78 opened this issue 4 months ago • 2 comments

right now the profiler adds every value of environment variables as attributes to the profile, i think it can be beneficial to pay specific attention to these environment variables from the otel spec this can help correlate profiling with other signals based on service.name resource attribute, and add additional metadata usually added like service.version specified in OTEL_RESOURCE_ATTRIBUTES. from the code i see the TraceEventsTree is keyed by containerID, which creates a different resource for each container, does it make sense to replace it with some Resource struct that will contain both containerID and values of these envvars, which can also be expended in the future? let me know what you think, would love to work on it as well :)

NimrodAvni78 avatar Sep 10 '25 06:09 NimrodAvni78