-
Notifications
You must be signed in to change notification settings - Fork 529
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
Make ecs.version a constant_keyword field #9208
Conversation
3cabd0c
to
573c83b
Compare
3dce14d
to
79e33a2
Compare
📚 Go benchmark reportDiff with the
report generated with https://pkg.go.dev/golang.org/x/perf/cmd/benchstat |
Instead of adding `ecs.version` as a field in every document written by APM Server, make it a constant_keyword field and set its version in the data stream mappings. The data stream's ingest pipeline is responsible for upgrading documents to the expected format, so it follows that the integration package (ingest pipeline, mappings) should define the ECS version. We're currently pinning to a recent commit of ECS due to our reliance on the unreleased `device.*` fields. When they are released, we should update to the released version.
79e33a2
to
cad1dfa
Compare
This pull request is now in conflicts. Could you fix it @axw? 🙏
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM!
@axw checking to see if I fully grasp the intended upgrade flow here: The apm package sets the ecs version, whenever the package gets upgraded, the templates get created and data streams are rolled over; therefore the ecs version is set on package upgrade. If there are still older apm-server instances sending to ES, there are no conflicts expected, as ecs related changes are expected to be backwards compatible and follow the stack versioning. Correct?
Right. Hypothetically if there were a breaking change in ECS, then we would update our ingest pipelines to "upgrade" the docs coming from older APM Servers so they conform to the |
This pull request is now in conflicts. Could you fix it @axw? 🙏
|
…ored * upstream/main: smoke: Remove usage of artifacts API (elastic#9233) Update to elastic/beats@77e4e30df6e2 (elastic#9227) Enable synthetic source for metrics data streams (elastic#9215) testing/rally: add force-merge operation (elastic#9226) Make ecs.version a constant_keyword field (elastic#9208)
Package apm - 8.6.0-preview-1670294014 containing this change is available at https://epr.elastic.co/search?package=apm |
Motivation/summary
Instead of adding
ecs.version
as a field in every document written by APM Server, make it a constant_keyword field and set its version in the data stream mappings. This means thatecs.version
will not be available in_source
, and will only be available through the Elasticsearch fields API. Nothing usesecs.version
yet, so it doesn't matter in practice.The data stream's ingest pipeline is responsible for upgrading documents to the expected format, so it follows that the integration package (ingest pipeline, mappings) should define the ECS version. Given that nothing currently relies on
ecs.version
, the pipelines now simply drop anyecs.version
field defined in the incoming document, in favour of theconstant_keyword
value.We're currently pinning to a recent commit of ECS due to our reliance on the unreleased
device.*
fields. When they are released, we should update to the released version.Checklist
apmpackage
have been made)- [ ] Documentation has been updatedHow to test these changes
ecs.version
setRelated issues
Closes #9043