You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### What does this PR do?
Skip zero value metrics that are rarely used, these metrics provide _some_ debugging value, but don't provide any signal when `0`, thus we can stop sending these and reduce the overhead here a small amount. DM me for exact cost calculations
### Motivation
Reduce overhead
### Describe how you validated your changes
Ran locally and observed these metrics do not appear, but the other ones still do. Also unit tests
### Additional Notes
Co-authored-by: andrew.glaude <[email protected]>
assert.Equal(t, "[WARN] Detected both analytics events AND single span sampling in the same trace. Single span sampling wins because App Analytics is deprecated.", b.String())
3832
3832
assert.False(t, keep) //The sampling decision was FALSE but the trace itself is marked as not dropped
Copy file name to clipboardExpand all lines: pkg/trace/info/stats.go
+21-17Lines changed: 21 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -23,12 +23,14 @@ import (
23
23
// ReceiverStats is used to store all the stats per tags.
24
24
typeReceiverStatsstruct {
25
25
sync.RWMutex
26
-
Statsmap[Tags]*TagStats
26
+
Statsmap[Tags]*TagStats
27
+
SendAllStatsbool// if true, all stats will be published even those stats that are zero, otherwise some less-frequently-used stats will be omitted when zero to save costs
// sendAllStats is a boolean that controls whether all stats will be published even those stats that are zero, otherwise some less-frequently-used stats will be omitted when zero to save costs
0 commit comments