Skip to content

Commit

Permalink
wip test
Browse files Browse the repository at this point in the history
  • Loading branch information
dianashevchenko committed Dec 13, 2023
1 parent a780a04 commit 699cfe8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions ddtrace/tracer/rules_sampler.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,9 @@ func (rs *traceRulesSampler) apply(span *span, atFinish bool) bool {
// TODO: technically, span.name/ service tags could change the span and cause other tag-less rules
// to evaluate to true. However, previously this was disregarded. Should we keep the behaviour as it was before
// or re-evaluate all the rules?
if atFinish && len(rule.Tags) == 0 {
continue
}
//if atFinish && len(rule.Tags) == 0 {
// continue
//}
if rule.match(span) {
matched = true
rate = rule.Rate
Expand Down
1 change: 0 additions & 1 deletion ddtrace/tracer/span.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@ func (s *span) Finish(opts ...ddtrace.FinishOption) {
// we have an active tracer
if t.rulesSampling.traces.enabled() {
t.rulesSampling.SampleTrace(s, true)

}
}

Expand Down
6 changes: 3 additions & 3 deletions ddtrace/tracer/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -677,9 +677,9 @@ func (t *tracer) sample(span *span) {
if rs, ok := sampler.(RateSampler); ok && rs.Rate() < 1 {
span.setMetric(sampleRateMetricKey, rs.Rate())
}
if t.rulesSampling.SampleTrace(span, false) {
return
}
//if t.rulesSampling.SampleTrace(span, false) {
// return
//}
t.prioritySampling.apply(span)
}

Expand Down

0 comments on commit 699cfe8

Please sign in to comment.