-
Notifications
You must be signed in to change notification settings - Fork 525
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
Drop observer.id
and observer.ephemeral_id
#9412
Conversation
This pull request does not have a backport label. Could you fix it @axw? 🙏
NOTE: |
5c68b7c
to
5968c29
Compare
📚 Go benchmark reportDiff with the
report generated with https://pkg.go.dev/golang.org/x/perf/cmd/benchstat |
Package beater now takes just the UUIDs for `observer.id` and `observer.ephemeral_id`. The `observer.type` field is hard-coded, `observer.version` comes from package version, and `observer.hostname` comes from a call to `os.Hostname()`. We need to recreate `beat.Info` for the libbeat outputs. If at some point we can get rid of those, then we can remove this.
6f98025
to
44f3bef
Compare
We don't use these fields in the UI anywhere, and for debugging we can rely on the hostname to distinguish one APM Server instance from another. The observer.id and observer.ephemeral_id fields suggest that we should care about specific instances, and their continued presence contradicts our intentions for a more modern "cloud native" approach, where APM Server instances may come and go. For now we need to continue persisting a UUID to disk for stack monitoring, as this is used to identify instances of APM Server. In the future we expect to revisit how stack monitoring works, and at that point we should redesign the documents to not enshrine a "pets" mentality. For tail-based sampling we now generate a UUID (for identifying its documents) at process start. The field has been renamed from observer.id to agent.ephemeral_id, the latter of which is an ECS field (observer.id is not).
44f3bef
to
f01864e
Compare
This pull request is now in conflicts. Could you fix it @axw? 🙏
|
processors: | ||
- rename: | ||
field: observer.id | ||
target_field: agent.ephemeral_id |
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.
ECS says:
This id normally changes across restarts, but
agent.id
does not.
I believe semantically observer.id
-> agent.id
would be more correct.
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.
The ID changes on restart now - it's generated at process init.
Tested on with BC5 on ESS that ingestion still works, including having TBS enabled across multiple APM Servers and also ensured Stack Monitoring is still working. |
Package apm - 8.6.0-preview-1670294014 containing this change is available at https://epr.elastic.co/search?package=apm |
Motivation/summary
We don't use these fields in the UI anywhere, and for debugging we can rely on the hostname to distinguish one APM Server instance from another. The
observer.id
andobserver.ephemeral_id
fields suggest that we should care about specific instances (and think of them as long-lived), and their continued presence contradicts our intentions for a more modern, cloud native, approach, where APM Server instances may come and go.For now we need to continue persisting a UUID to disk for stack monitoring, as this is used to identify instances of APM Server. In the future we expect to revisit how stack monitoring works, and at that point we should redesign the documents to not enshrine a "pets" mentality. We may still want to identify individual instances (e.g. for calculating time-series IDs), but statefulness should not be required.
For tail-based sampling we now generate a UUID (for identifying its documents) at process start. The field has been renamed from
observer.id
toagent.ephemeral_id
, the latter of which is an ECS field (observer.id
is not).We no longer pass
beat.Info
frombeatcmd
into packagebeater
. Instead,beater
hard-codesobserver.type: apm-server
, uses packageversion
forobserver.version
, and callsos.Hostname()
forobserver.hostname
. We need to recreatebeat.Info
for the libbeat outputs. If at some point we drop support for libbeat outputs, then we would have no more dependencies onbeat.Info
outside of packagebeatcmd
.Checklist
apmpackage
have been made)How to test these changes
Related issues
Closes #3874