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

Send timestamp in "dt" field to be accepted by Better Stack #21

Merged
merged 4 commits into from
Nov 26, 2024

Conversation

PetrHeinz
Copy link
Member

I've noticed that timestamp is being sent in _time field while Better Stack expects the data in dt field.

The filed is either set to new Date(Date.now()).toISOString() or new Date().getTime(), both values are accepted as per documentation.

The change is fully backward compatible, as the _time field remains unchanged.

This should make the logs appear in Better Stack with time of the log creation instead of log ingestion.


Also updated the logs endpoint from in.logtail.com to in.logs.betterstack.com.

…nt, removing the "dt" field there, as it doesn't seem to be directly intended for Better Stack ingesting
Copy link
Contributor

@lazandrei19 lazandrei19 left a comment

Choose a reason for hiding this comment

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

Thanks! 🙌

@PetrHeinz PetrHeinz merged commit b96e347 into main Nov 26, 2024
28 checks passed
@PetrHeinz PetrHeinz deleted the ph/dt-timestamp branch November 26, 2024 13:27
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