@@ -7,6 +7,10 @@ pub use bytes::Bytes;
7
7
pub use http:: { Request , Response } ;
8
8
use opentelemetry:: propagation:: { Extractor , Injector } ;
9
9
10
+ /// Helper for injecting headers into HTTP Requests. This is used for OpenTelemetry context
11
+ /// propagation over HTTP.
12
+ /// See [this](https://github.com/open-telemetry/opentelemetry-rust/blob/main/examples/tracing-http-propagator/README.md)
13
+ /// for example usage.
10
14
pub struct HeaderInjector < ' a > ( pub & ' a mut http:: HeaderMap ) ;
11
15
12
16
impl < ' a > Injector for HeaderInjector < ' a > {
@@ -20,6 +24,10 @@ impl<'a> Injector for HeaderInjector<'a> {
20
24
}
21
25
}
22
26
27
+ /// Helper for extracting headers from HTTP Requests. This is used for OpenTelemetry context
28
+ /// propagation over HTTP.
29
+ /// See [this](https://github.com/open-telemetry/opentelemetry-rust/blob/main/examples/tracing-http-propagator/README.md)
30
+ /// for example usage.
23
31
pub struct HeaderExtractor < ' a > ( pub & ' a http:: HeaderMap ) ;
24
32
25
33
impl < ' a > Extractor for HeaderExtractor < ' a > {
@@ -39,7 +47,9 @@ impl<'a> Extractor for HeaderExtractor<'a> {
39
47
40
48
pub type HttpError = Box < dyn std:: error:: Error + Send + Sync + ' static > ;
41
49
42
- /// A minimal interface necessary for export spans over HTTP.
50
+ /// A minimal interface necessary for sending requests over HTTP.
51
+ /// Used primarily for exporting telemetry over HTTP. Also used for fetching
52
+ /// sampling strategies for JaegerRemoteSampler
43
53
///
44
54
/// Users sometime choose HTTP clients that relay on a certain async runtime. This trait allows
45
55
/// users to bring their choice of HTTP client.
0 commit comments