rajeshkumarchandolu commented on code in PR #12145:
URL: https://github.com/apache/ozone/pull/12145#discussion_r4704151275
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/tracing/TracingUtil.java:
##########
@@ -623,6 +627,13 @@ public static void addAttributesToCurrentSpan(String key,
boolean value) {
}
}
+ public static void addAttributesToCurrentSpan(Map<String, String>
attributes) {
+ if (attributes == null) {
+ return;
+ }
+ attributes.forEach(TracingUtil::addAttributesToCurrentSpan);
Review Comment:
Thanks both, this is a good scenario. Where this stands:
- The storage volume follows the sampling ratio, since only sampled traces
are exported: 100% is the worst case, and the ratio is what brings the 4 GB
down (1% would be roughly a hundredth of it). The CPU and memory cost per
sampling state is in https://github.com/apache/ozone/pull/12162: ~6 ns and no
allocation for a call under an unsampled parent, ~140-150 ns and ~450-530 B for
a sampled span.
- On the client side, spans go through the SDK's BatchSpanProcessor, which
has a bounded queue (2048 spans by default) and drops new spans when it is full
instead of blocking requests or growing memory. So a slow or overloaded
collector does not stall requests or make memory grow without limit; that is
handled by the OpenTelemetry SDK itself. The queue is bounded by span count,
not bytes, so very large attribute values are what we would cap if they turn
out to matter.
- What is kept on disk is a Jaeger/collector configuration question, not
something this PR changes. The trace backend can have a retention (purge)
policy so traces are dropped after a set time. We have not explored compaction
in Jaeger, which would shrink the disk usage further, and how best to run the
collector (retention, compaction, storage backend) is still in the exploration
phase, so I'd rather keep that out of this PR.
- For attribute size, the SDK has a configurable maximum attribute value
length that we can set if large values turn out to matter, and we can also cap
the audit values copied to spans (e.g. 1024 characters) in this one method. I'd
rather decide on real numbers than guess a limit now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]