-
Notifications
You must be signed in to change notification settings - Fork 92
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
maint: rename sent_reason_cache to kept_reason_cache #1346
Conversation
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 OK, but maybe there's more? Did you search for "send" as well as "sent"?
@@ -480,12 +480,12 @@ func (i *InMemCollector) processSpan(sp *types.Span) { | |||
trace := i.cache.Get(sp.TraceID) | |||
if trace == nil { | |||
// if the trace has already been sent, just pass along the span | |||
if sr, sentReason, found := i.sampleTraceCache.CheckSpan(sp); found { | |||
if sr, keptReason, found := i.sampleTraceCache.CheckSpan(sp); found { | |||
i.Metrics.Increment("trace_sent_cache_hit") |
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.
maybe change the name of this metric? And are there other ones?
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 think this one is ok. This metric is for the TraceSentCache
, not the keptReasonCache
. Hopefully with this rename, things will be a bit more clear
My apology that the PR description wasn't specific enough. I just updated it. This PR is only renaming things that are related to the |
## Which problem is this PR solving? In the `collector`, we use `sendReason` to describe why a trace is moved into the decision-making process. Additionally, we have `sentReason`, which indicates the reason behind a trace receiving a “kept” decision. To avoid confusion between these terms when sharing this information from the decider node to the rest of the cluster, I propose renaming `sentReasonCache` to `keptReasonCache` to better reflect its purpose. ## Short description of the changes - rename all `sentReasonCache` to `keptReasonCache`
Which problem is this PR solving?
In the
collector
, we usesendReason
to describe why a trace is moved into the decision-making process. Additionally, we havesentReason
, which indicates the reason behind a trace receiving a “kept” decision.To avoid confusion between these terms when sharing this information from the decider node to the rest of the cluster, I propose renaming
sentReasonCache
tokeptReasonCache
to better reflect its purpose.Short description of the changes
sentReasonCache
tokeptReasonCache