-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Add representative count to apm-data plugin #119995
base: main
Are you sure you want to change the base?
Conversation
x-pack/plugin/apm-data/src/main/resources/ingest-pipelines/[email protected]
Outdated
Show resolved
Hide resolved
x-pack/plugin/apm-data/src/yamlRestTest/resources/rest-api-spec/test/20_traces_ingest.yml
Show resolved
Hide resolved
field: event.success_count | ||
value: 1 | ||
source: | | ||
ctx.event.success_count = ctx[ctx.processor?.event]?.representative_count; |
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.
I can't think of a reason why representative count would be missing, but I still think a null check feels safer.
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.
(Not a response to @carsonip, just a comment on the same section of the code.) What eventually happens with the value of the event.success_count
? Does it make sense to pop a null
in there or will that blow up later processing?
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.
Looking at apm-server source code, event.success_count can be nil: https://github.com/elastic/apm-server/blob/79c4599ab9bd65e1cc688eed1169505933f6f405/systemtest/ingest_test.go#L177
It is only non-nil when outcome is success or failure, in which case, non-0 and 0 respectively.
I assume it will be used by APM UI for getting a transaction success rate.
Closes elastic/apm-data#388
The pipeline changes copies the representative count calculated in APM Data (see Code), into the
event.success_count
metric. The default representative count is1
.If an event, which can only be a
transaction
orspan
in this context, failed for some reason, theevent.success_count
metric is set to zero. To my understanding, we are not capturing any data related to failed events. Nor do I see any usage of something like anevent.failure_count
metric. Please correct me if I'm wrong.Kibana
Along with the unit test provided, the pipeline changes was also test manually in Kibana Console:
POST _ingest/pipeline/_simulate