-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[exporter/splunkhec] Use ObservedTimestamp if Timestamp is empty #39221
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
Labels
Comments
Pinging code owners: See Adding Labels via Comments if you do not have permissions to add labels yourself. |
JaredTan95
added a commit
to openinsight-proj/opentelemetry-collector-contrib
that referenced
this issue
Apr 11, 2025
Signed-off-by: Jared Tan <[email protected]> Signed-off-by: Jared Tan <[email protected]>
Yes, we can following elasticsearchexporter did.
|
akshays-19
pushed a commit
to akshays-19/opentelemetry-collector-contrib
that referenced
this issue
Apr 23, 2025
…n-telemetry#39317) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Use ObservedTimestamp if Timestamp is empty, just like elasticsearchexporter did: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/27667313ab8d4219c8c1dbf454bef29637b3022c/exporter/elasticsearchexporter/model.go#L564 <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#39221 <!--Describe what testing was performed and which tests were added.--> #### Testing <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.--> --------- Signed-off-by: Jared Tan <[email protected]> Co-authored-by: Antoine Toulme <[email protected]>
Fiery-Fenix
pushed a commit
to Fiery-Fenix/opentelemetry-collector-contrib
that referenced
this issue
Apr 24, 2025
…n-telemetry#39317) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Use ObservedTimestamp if Timestamp is empty, just like elasticsearchexporter did: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/27667313ab8d4219c8c1dbf454bef29637b3022c/exporter/elasticsearchexporter/model.go#L564 <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#39221 <!--Describe what testing was performed and which tests were added.--> #### Testing <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.--> --------- Signed-off-by: Jared Tan <[email protected]> Co-authored-by: Antoine Toulme <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Component(s)
exporter/splunkhec
Is your feature request related to a problem? Please describe.
Currently the Splunk HEC exporter takes the Timestamp field from each log record. If the timestamp field is not provided on the LogRecord, then this is passing 0 today. According to the OTel Spec, the ObservedTimestamp is recommended to be used when the Timestamp field is not provided: https://opentelemetry.io/docs/specs/otel/logs/data-model/#field-observedtimestamp
Splunk adds the ingestion time as a timestamp, but if the service is interrupted or delayed, this can cause issues trying to queue & re-ingest logs.
Describe the solution you'd like
I'd recommend either passing both the Timestamp and ObservedTimestamp, or add the recommended logic to pass the ObservedTimestamp as the Timestamp if Timestamp is not present.
opentelemetry-collector-contrib/exporter/splunkhecexporter/logdata_to_splunk.go
Line 122 in d1f2818
Describe alternatives you've considered
Can use a transform processor to get around this for now
Additional context
No response
The text was updated successfully, but these errors were encountered: