Skip to content

Resource detectors: add runtime attributes #160

@agagniere

Description

@agagniere

The host, os, and process resource detectors (opt-in via OTEL_EXPERIMENTAL_RESOURCE_DETECTORS) will only populate attributes known at comptime once #159 merges. The following attributes require runtime OS calls and are not yet implemented.

Reference: Python SDK detectors

host detector

  • host.namestd.posix.gethostname / GetComputerNameEx on Windows

os detector

  • os.version — kernel/release version string (uname -r / RtlGetVersion on Windows)

process detector

  • process.pidstd.posix.getpid
  • process.parent_pidstd.posix.getppid
  • process.executable.name — argv[0] basename
  • process.executable.path — argv[0] directory
  • process.command — argv[0]
  • process.command_line — full command line joined
  • process.command_args — argv as a list (repeated string attribute)
  • process.owner — username of the process owner

These all require collecting values at provider initialization time rather than comptime, so they need a different code path from the current comptime-only approach in src/sdk/resource.zig.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions