Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logs: ObservedTimestamp field is not set #3549

Closed
tigrannajaryan opened this issue Nov 22, 2023 · 2 comments · Fixed by #3565
Closed

Logs: ObservedTimestamp field is not set #3549

tigrannajaryan opened this issue Nov 22, 2023 · 2 comments · Fixed by #3565
Labels
bug Something isn't working logging

Comments

@tigrannajaryan
Copy link
Member

Describe your environment
Mac OS X
Python 3.9.6

Steps to reproduce
Run Getting Started, metrics example.

What is the expected behavior?
ObservedTimestamp value set equal to Timestamp as required by the spec.

What is the actual behavior?
ObservedTimestamp value is set to 1970-01-01 00:00:00 +0000 UTC.

Collector output:

LogRecord #1
ObservedTimestamp: 1970-01-01 00:00:00 +0000 UTC
Timestamp: 2023-11-22 17:26:29.306744064 +0000 UTC
SeverityText: INFO
SeverityNumber: Info(9)
Body: Str(Press CTRL+C to quit)
Attributes:
     -> otelSpanID: Str(0)
     -> otelTraceID: Str(0)
     -> otelTraceSampled: Bool(false)
     -> otelServiceName: Str(dice-server)
Trace ID:
Span ID:
Flags: 0

Additional context
Part of review open-telemetry/community#1751

@imadmoussa1
Copy link

I am still getting ObservedTimestamp: 1970-01-01 00:00:00 +0000 UTC in python logger I am using these versions :

opentelemetry-api = "1.23.0"
opentelemetry-sdk = "1.23.0"
opentelemetry-exporter-otlp = "1.23.0"
opentelemetry-instrumentation-httpx = "0.44b0"
opentelemetry-instrumentation-logging = "0.44b0"

and checked I have the changes of this PR in the installed package, am I missing something else to set the value of ObservedTimestamp ?

Thank you

@pmcollins
Copy link
Member

I believe these changes ended up in a later release. It works now (just checked).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working logging
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants