Skip to content

fix: Make it clear that we publicly just support timestamp as the log timestamp #19484

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

Merged
merged 3 commits into from
Dec 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/content/docs/logs/ui-data/timestamp-support.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@

Timestamps have many formats without a single standard. They appear at the beginning of the log event in most cases, but can sometimes appear much later in the log, or not at all.

* By default, New Relic assigns the value of the log `timestamp` attribute (a reserved keyword) at the exact time the log is ingested. This is referred to as the ingest time.
* When logs don't have a `timestamp` attribute, New Relic assigns a timestamp at time of ingest.
* Logs in a JSON format contain some attribute that identifies the timestamp, like `timestamp`, `log_timestamp`, `time`, etc.
* If we receive JSON logs with with a supported timestamp format, we override our ingest timestamp with the JSON attribute.
* If a log is sent with a `timestamp` attribute, or if a `timestamp` attribute parsed from it, New Relic uses that timestamp for the log.

Check warning on line 16 in src/content/docs/logs/ui-data/timestamp-support.mdx

View workflow job for this annotation

GitHub Actions / vale-linter

[vale] reported by reviewdog 🐶 [Microsoft.Passive] 'is sent' looks like passive voice. Raw Output: {"message": "[Microsoft.Passive] 'is sent' looks like passive voice.", "location": {"path": "src/content/docs/logs/ui-data/timestamp-support.mdx", "range": {"start": {"line": 16, "column": 12}}}, "severity": "INFO"}
* If a JSON log is sent with a `timestamp` field, New Relic uses that timestamp when extracting JSON fields as attributes, and it takes precedence over any existing `timestamp` attribute.

Check warning on line 17 in src/content/docs/logs/ui-data/timestamp-support.mdx

View workflow job for this annotation

GitHub Actions / vale-linter

[vale] reported by reviewdog 🐶 [Microsoft.Passive] 'is sent' looks like passive voice. Raw Output: {"message": "[Microsoft.Passive] 'is sent' looks like passive voice.", "location": {"path": "src/content/docs/logs/ui-data/timestamp-support.mdx", "range": {"start": {"line": 17, "column": 17}}}, "severity": "INFO"}
* If `timestamp` isn't sent, New Relic uses the log's ingest time as the timestamp.

Most log forwarders pass along timestamp information from the log source, so you may not need to specify the timestamp yourself.

<Callout variant="important">
Some log forwarders use internal timestamp fields, such as`@timestamp` and `@realtime_timestamp`. New Relic recognizes these fields, but they shouldn't be used by customers. To send the log timestamp, please use the `timestamp` attribute.

Check warning on line 23 in src/content/docs/logs/ui-data/timestamp-support.mdx

View workflow job for this annotation

GitHub Actions / vale-linter

[vale] reported by reviewdog 🐶 [Microsoft.Passive] 'be used' looks like passive voice. Raw Output: {"message": "[Microsoft.Passive] 'be used' looks like passive voice.", "location": {"path": "src/content/docs/logs/ui-data/timestamp-support.mdx", "range": {"start": {"line": 23, "column": 153}}}, "severity": "INFO"}
</Callout>

## Supported logs timestamp format [#format]

Expand Down
Loading