Document missing event.ingested field on OTel-native data streams - #660
Open
jamesagarside wants to merge 1 commit into
Open
Document missing event.ingested field on OTel-native data streams#660jamesagarside wants to merge 1 commit into
jamesagarside wants to merge 1 commit into
Conversation
Contributor
Elastic Docs AI PR menuCheck the box to run an AI review for this pull request.
Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this documents
event.ingestedis not populated on OTel-native data streams (logs-*.otel-*,metrics-*.otel-*), and I couldn't find this stated anywhere in the docs. It surfaces as a confusing partial failure in Elastic Security prebuilt detection rules that useevent.ingestedas their timestamp override.This adds a section to the data streams comparison page covering:
event.ingestedis set by.fleet_final_pipeline-1, which Fleet attaches asindex.final_pipelineonly to the data streams it manages.logs-otel@templateandmetrics-otel@templatecompose nofinal_pipeline, so nothing sets the field.partial failurewithThe following indices are missing the timestamp override field "event.ingested". The rule still runs and falls back to@timestamp, but loses the ingest-lag protection the override provides.logs@customingest pipeline extension point, writing toattributes.event.ingestedwithfield_access_pattern: flexible.logs@customdoes not apply to wired Streams, where the only route is acopy_fromprocessing step on a child stream, plus an explicit field declaration.I also note that
metrics-otel@templatecomposesmetrics@tsdb-settingsand has nodefault_pipeline, so there is no equivalent hook for OTel metrics data streams.Basis
This is based on behaviour I observed and verified first-hand on an Elastic Cloud Serverless Security project, Elasticsearch/Kibana 9.6. I've deliberately not claimed scope beyond that. I cross-checked the mechanism against the template and pipeline definitions in
elastic/elasticsearchmain:logs@default-pipeline.json— two processors: set@timestamp, then thelogs@customhook. Noevent.ingested.logs@settings.json— setsindex.default_pipelineonly, nofinal_pipeline.logs-otel@template.yaml/metrics-otel@template.yaml—composed_oflists, neither pulling in afinal_pipeline.ecs@mappings.json—ecs_datedynamic template matches*.ingested, hence no explicit mapping needed on classic OTel log data streams.On the workaround, I confirmed on the live cluster that after applying it the detection rule returned to
succeededacross multiple executions, that the field is queryable under the bare nameevent.ingestedand reported as such by_field_caps, and thatfield_access_pattern: flexibleis required to write the dotted path into theattributespassthrough object. For wired streams I confirmed that Streamlang'ssetrejects Mustache syntax invalue, thatmanual_ingest_pipelineis rejected in wired streams, and that_field_capsstayed empty until the field was declared on the stream.Related public issue, linked in the page: elastic/elasticsearch#100324.
Notes for reviewers
event.ingested.logs@customworkaround is something Elastic wants to recommend versus just documenting the gap.