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
//! The integration that owns the spans of the app, when the spans do not come from
//! the `tracing` integration of Flare.
//!
//! The OpenTelemetry bridge sets a [`SpanSource`]. The `tracing` integration then
//! makes no spans of its own, because two span pipelines send each trace twice. Log
//! lines take their trace from the span source, and the client gives each queued
//! report to the span source, which adds the report to the current span.
use OnceLock;
use crateQueuedReport;
use crateTraceContext;
/// The functions of the integration that owns the spans. See
/// [`set_span_source`].
///
/// The Flare integrations use this type. This type is not part of the public API.
/// The span source, when an integration set one.
static SPAN_SOURCE: = new;
/// Sets the integration that owns the spans of the app. Only the first call has an
/// effect.
///
/// The Flare integrations use this function. This function is not part of the
/// public API.
/// Returns the span source, or `None` when no integration set one. Without a
/// span source, the `tracing` integration of Flare owns the spans.
///
/// The Flare integrations use this function. This function is not part of the
/// public API.