opentelemetry-java-instrume.../instrumentation/resources/library
jason plumb 264edd98fc
More flexible cgroupv2 container id parsing (and podman support) (#7361)
This is based on a conversation in [opentelemetry-go
#3508](https://github.com/open-telemetry/opentelemetry-go/pull/3508) and
to be more consistent with [the js cgroupv2 parser
impl](f0a93685cf/detectors/node/opentelemetry-resource-detector-container/src/detectors/ContainerDetector.ts (L68)).

Unsurprisingly, podman does not include the word `docker` in the
`mountinfo` file. As a result, the container id parsing would fail from
inside a podman container. This fixes that up to be more compatible.
2022-12-09 17:14:38 -08:00
..
src More flexible cgroupv2 container id parsing (and podman support) (#7361) 2022-12-09 17:14:38 -08:00
README.md Introduce markdown lint check (#7175) 2022-11-16 20:48:42 -08:00
build.gradle.kts Stop relocating :instrumentation:resources:library (#7136) 2022-11-15 22:37:17 +00:00

README.md

OpenTelemetry Resource Providers

This package includes some standard ResourceProviders for filling in attributes related to common environments. Currently, the resources provide the following semantic conventions:

Populated attributes

Container

Provider: io.opentelemetry.instrumentation.resources.ContainerResource

Specification: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/container.md

Implemented attributes:

  • container.id

Host

Provider: io.opentelemetry.instrumentation.resources.HostResource

Specification: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md

Implemented attributes:

  • host.name
  • host.arch

Operating System

Provider: io.opentelemetry.instrumentation.resources.OsResource

Specification: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/resource/semantic_conventions/os.md

Implemented attributes:

  • os.type
  • os.description

Process

Implementation: io.opentelemetry.instrumentation.resources.ProcessResource

Specification: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/resource/semantic_conventions/process.md#process

Implemented attributes:

  • process.pid
  • process.executable.path (note, we assume the java binary is located in the bin subfolder of JAVA_HOME)
  • process.command_line (note this includes all system properties and arguments when running)

Java Runtime

Implementation: io.opentelemetry.instrumentation.resources.ProcessRuntimeResource

Specification: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/resource/semantic_conventions/process.md#process-runtimes

Implemented attributes:

  • process.runtime.name
  • process.runtime.version
  • process.runtime.description

Platforms

This package currently does not run on Android. It has been verified on OpenJDK and should work on other server JVM distributions but if you find any issues please let us know.