1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! Fire-and-forget telemetry over the one Bifrost client.
//!
//! The only difference from [`crate::bifrost::Bifrost::insert`] is what happens when the
//! producer refuses: telemetry swallows the refusal and counts it, because
//! losing a signal row is better than breaking the instrumented caller.
use SchemaRef;
use crateBifrost;
use crateCorrelation;
/// Record one telemetry observation, fire-and-forget.
///
/// Enqueues onto the same pooled producers as [`Bifrost::insert`], but on
/// queue-full it swallows the error and bumps the client's drop counter — the
/// caller is never broken. That is the whole difference between the two, and it
/// is why telemetry has its own function rather than a flag on `insert`.
///
/// Telemetry names its own `table` and `schema` per call rather than using the
/// client's active binding: an instrumented process writes its signals
/// alongside whatever the application is writing, and must not disturb — or be
/// disturbed by — the table the application has bound.
///
/// # Arguments
/// * `bifrost` - The client whose pooled producers and drop counter are used.
/// * `table` - The destination table's `<namespace>.<name>`.
/// * `schema` - The table's user schema the row is checked against at seal.
/// * `json` - One JSON-encoded row.
/// * `correlation` - The card and run identities stamped onto the row.