OpenTelemetry SDK
    Preparing search index...

    Variable METRIC_CONTAINER_UPTIMEConst Experimental

    METRIC_CONTAINER_UPTIME: "container.uptime" = ...

    The time the container has been running.

    Instrumentations SHOULD use a gauge with type double and measure uptime in seconds as a floating point number with the highest precision available. The actual accuracy would depend on the instrumentation and operating system. In K8s environments, this metric can be derived from Kubelet's stats API and specifically from the ContainerStats.StartTime field, where StartTime represents the container creation time as noted in the Kubelet source. This value resets on every container restart and aligns with ContainerStateRunning.startedAt from the K8s API.

    This metric is experimental and is subject to breaking changes in minor releases of @opentelemetry/semantic-conventions.