Skip to content

[APM] Make timestamp.us optional and fall back to @timestamp #191046

Description

Today, the APM UI mostly relies on the timestamp.us field to place spans more accurately on the waterfall, and to support traces that take less than a millisecond.

We want to move the @timestamp field to use date_nanos instead of date, so that the additional timestamp.us field becomes redundant.

In the context of supporting OTel-native mappings, we'd like to transition to relying just on @timestamp but use the date_nanos field type for it. As a short-term workaround, we're adding attributes.timestamp.us but would like to remove this APM-specific field. During the transitioning period, we'll have a mix of date_nanos and @timestamp fields as we're waiting for ES|QL to support the date_nanos field type. While we'll likely also want to use date_nanos for data that goes in via APM Server, there's also expected to be a difference where OTel data will use date_nanos for the @timestamp field first.

I'm proposing the following fallback logic:

  • If timestamp.us is missing, fall back to @timestamp, no matter whether it's of type date or date_nanos
  • Optional: If @timestamp is of type date_nanos, prefer @timestamp over timestamp.us
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions