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.
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
[apm] peer.service aggregation for trace stats, option to compute stats based on span.kind #16103
[apm] peer.service aggregation for trace stats, option to compute stats based on span.kind #16103
Changes from 33 commits
df3e63f
8cda026
d0e1321
f940919
fb95f5c
2ad214f
af0f5f6
bfaa1e2
1593a31
27c1a02
1e74f07
2e80bb4
0353e82
4eb1a0a
dcfe044
a776a46
b0a39d6
59129de
66f690d
a405615
ba3ad76
588a0ec
2586730
e7222b9
11cfffb
90c0b09
45758c6
c7c7e51
394c33b
4fa25f1
0986d4f
2e68665
2c1f694
0cf26cc
63c572a
6dc94ad
ffd0975
cee986d
c4ea367
d6a545c
1a07963
1454017
76957f4
1f8c1e3
01156fc
98136a2
ecdeaa4
c65f007
b4bdba1
4450bb5
29f9320
94886e0
8ad14ae
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 PR description says This is a somewhat complementary but arguably necessary about
compute_stats_by_span_kind
. What's the impact of enabling one of the 2 new options without the other?If understand correctly
compute_stats_by_span_kind
should be also set totrue
ifpeer_service_stats_aggregation
is enabled, this can be error prone! Does it make sense to have a single optionpeer_service_stats_aggregation
and always compute by span kind if it's enabled? (I might be missing context here).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.
This is a great question. Let me explain:
peer.service
would be set are already marked as measured, so checkingspan.kind
isn't always necessary to get stats. You don't have to setcompute_stats_by_span_kind
in all cases.span.kind
is set to client/producer and the span is not measured. Here's where you'd want both flags to be safe. If someone is submitting OTel traces, they definitely would want both options on. There's no notion of measured spans in OTel.span.kind
might also be high in cardinality. Enabling computation byspan.kind
could be unexpectedly expensive.peer.service
.Ultimately I think we want to get to a point where both behaviors are on by default. Having the options be separated and off by default lets us test in a safer, more granular fashion.
I'm wondering though about the logic you suggested. Maybe there's a way to get a little more precise here.
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.
Thank you for explaining! Let's capture all that in the documentation of these fields.
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.
Should
ExtraAggregators
get marked as deprecated as opposed to deleted? My worry here is that it might still live in a customer configuration somewhere, and if we were to re-introduce it in the future we could run into problems. I think this has to be considered like a "reserved" field of sorts.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.
Alternatively, we could start using is again with
peer.service
as a possible value that we set if enabled.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've added this back with a comment about it being deprecated. It's not actually used in the current agent code because we don't create aggregation keys with strings anymore. We have the new struct key format, so we can't arbitrarily aggregate over other tag keys.
I think this only works for much older versions of the agent (probably any agent that doesn't use the new ClientStatsPayloads).