docs(observability): document rationale for unbatched UDP metric flushing
Explain that individual metric delivery prevents data truncation caused by small UDP receive buffers on the remote host.
This commit is contained in:
1 file changed
+4
@@ -186,6 +186,10 @@ impl Metrics {
|
|||||||
|
|
||||||
fn flush(&self, transport: &mut Transport, batch: &[Metric], host_tag: &str) {
|
fn flush(&self, transport: &mut Transport, batch: &[Metric], host_tag: &str) {
|
||||||
match transport {
|
match transport {
|
||||||
|
/*
|
||||||
|
* the UDP receive buffer might be too small on the receiver to accept batched data,
|
||||||
|
* and it'll get cutoff in the middle of a record. so send metrics directly on UDP
|
||||||
|
*/
|
||||||
Transport::Udp(_) => {
|
Transport::Udp(_) => {
|
||||||
let mut data = String::with_capacity(300);
|
let mut data = String::with_capacity(300);
|
||||||
for metric in batch {
|
for metric in batch {
|
||||||
|
|||||||
Reference in new issue
Block a user