You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the ObservableGauge (like the docs example) and have my setup exporting by OTLP to an otel collector instance that exports to logging. I noticed the StartTimestamp is zeroed out in every exported metrics message:
Metric #1
Descriptor:
-> Name: my.gauged.value
-> Description:
-> Unit:
-> DataType: Gauge
NumberDataPoints #0
Data point attributes:
-> status: Bool(true)
StartTimestamp: 1970-01-01 00:00:00 +0000 UTC
Timestamp: 2024-01-26 19:33:04.70007188 +0000 UTC
Value: 1
I've seen this with both unreleased SDK installed on my local (1.23.0.dev) and older release (1.20.0), on Python 3.9 in a locally-running Linux docker container.
Steps to reproduce
Describe exactly how to reproduce the error. Include a code sample if applicable.
Set up a docker container to run an instrumented Python script/service like the docs example
Set up a 2nd container to run image: otel/opentelemetry-collector:latest, configured with logging exporter.
Point instrumented container to otelcol, e.g. OTEL_EXPORTER_OTLP_ENDPOINT="http://otel-collector:4318"
Run so instrumented container exports to otelcol, which exports to logs.
What is the expected behavior? StartTimestamp of None.
Originally I thought it should be the time of startup of the instrumented app, but it's not so appropriate for the temporality and aggregation of the ObservableGauge type (proto).
What is the actual behavior? StartTimestamp: 1970-01-01 00:00:00 +0000 UTC, which is a little misleading
Additional context
We chatted about this during Feb 8 2024 sig meeting, and also previously on Slack (thanks Pablo).
There is something called field presence but I don't think this feature is being used here (start time is not marked optional to enable explicit presence)
Describe your environment
I'm using the ObservableGauge (like the docs example) and have my setup exporting by OTLP to an otel collector instance that exports to logging. I noticed the StartTimestamp is zeroed out in every exported metrics message:
I've seen this with both unreleased SDK installed on my local (
1.23.0.dev
) and older release (1.20.0
), on Python 3.9 in a locally-running Linux docker container.Steps to reproduce
Describe exactly how to reproduce the error. Include a code sample if applicable.
image: otel/opentelemetry-collector:latest
, configured withlogging
exporter.OTEL_EXPORTER_OTLP_ENDPOINT="http://otel-collector:4318"
What is the expected behavior?
StartTimestamp
of None.Originally I thought it should be the time of startup of the instrumented app, but it's not so appropriate for the temporality and aggregation of the ObservableGauge type (proto).
What is the actual behavior?
StartTimestamp: 1970-01-01 00:00:00 +0000 UTC
, which is a little misleadingAdditional context
opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/aggregation.py
Line 369 in cc8fd88
The text was updated successfully, but these errors were encountered: