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

Include milliseconds in DataDog timestamp format [Refs #152] #202

Merged
merged 6 commits into from
Dec 5, 2023

Conversation

ladenedge
Copy link
Contributor

What does this PR do?

  • Include milliseconds in the DataDog timestamp (ie. @timestamp)
  • Add a unit test for both the new millisecond format and the OTel timestamp

Motivation

My logs have no milliseconds!

image

Notes

Per StackOverflow, Go does not seem to have a millisecond format string built in. And per #152, DataDog does not support nanoseconds. So instead I've just included a manual format string with the usual millisecond precision for logs.

All tests pass for me.

C:\Source\opentelemetry-mapping-go\pkg\otlp\logs>go test
PASS
ok      github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs       0.419s

@ladenedge ladenedge requested a review from a team as a code owner November 20, 2023 20:20
@ladenedge ladenedge requested a review from liustanley November 20, 2023 20:20
@ladenedge
Copy link
Contributor Author

Sorry, didn't notice the changelog step. Hopefully I did that correctly. Thanks for your patience!

Copy link
Contributor

@liustanley liustanley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for submitting this PR! Feel free to merge it yourself and we'll include it in the next releases for the Datadog Agent and OTel Collector

@ladenedge
Copy link
Contributor Author

ladenedge commented Dec 5, 2023

Feel free to merge it yourself and we'll include it in the next releases for the Datadog Agent and OTel Collector

Sorry, I must be misunderstanding. Surely I don't have access to merge PRs?

image

What am I missing? (Or did you mean merge it in my local copy so I can make use of it immediately?)

@liustanley
Copy link
Contributor

Feel free to merge it yourself and we'll include it in the next releases for the Datadog Agent and OTel Collector

Sorry, I must be misunderstanding. Surely I don't have access to merge PRs?

image

What am I missing? (Or did you mean merge it in my local copy so I can make use of it immediately?)

Sorry I didn't realize you don't have permissions, I'll merge for you

@liustanley liustanley merged commit 97610b4 into DataDog:main Dec 5, 2023
6 checks passed
mx-psi added a commit to open-telemetry/opentelemetry-collector-contrib that referenced this pull request Dec 13, 2023
**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->

Bump opentelemetry-mapping-go modules to v0.9.0. This includes:

- DataDog/opentelemetry-mapping-go/pull/218 and
DataDog/opentelemetry-mapping-go/pull/220
- DataDog/opentelemetry-mapping-go/pull/219
- DataDog/opentelemetry-mapping-go/pull/213
- DataDog/opentelemetry-mapping-go/pull/202
cparkins pushed a commit to AmadeusITGroup/opentelemetry-collector-contrib that referenced this pull request Jan 10, 2024
…9785)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->

Bump opentelemetry-mapping-go modules to v0.9.0. This includes:

- DataDog/opentelemetry-mapping-go/pull/218 and
DataDog/opentelemetry-mapping-go/pull/220
- DataDog/opentelemetry-mapping-go/pull/219
- DataDog/opentelemetry-mapping-go/pull/213
- DataDog/opentelemetry-mapping-go/pull/202
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants