Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from open-telemetry:master #2

Merged
merged 1 commit into from
Nov 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/api/distributed_context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
//! `Carrier`s that travel in-band across process boundaries.
pub mod binary_propagator;
pub mod http_b3_propagator;
pub mod http_trace_context_propagator;
pub mod trace_context_propagator;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! # HTTP Trace Context Propagator
//! # Trace Context Propagator
//!
//! The `traceparent` header represents the incoming request in a
//! tracing system in a common format, understood by all vendors.
Expand Down Expand Up @@ -27,12 +27,12 @@ static TRACEPARENT_HEADER: &str = "Traceparent";
/// Extracts and injects `SpanContext`s into `Carrier`s using the
/// trace-context format.
#[derive(Debug, Default)]
pub struct HTTPTraceContextPropagator {}
pub struct TraceContextPropagator {}

impl HTTPTraceContextPropagator {
/// Create a new `HTTPTraceContextPropagator`.
impl TraceContextPropagator {
/// Create a new `TraceContextPropagator`.
pub fn new() -> Self {
HTTPTraceContextPropagator {}
TraceContextPropagator {}
}

/// Extract span context from w3c trace-context header.
Expand Down Expand Up @@ -78,7 +78,7 @@ impl HTTPTraceContextPropagator {
}
}

impl api::HttpTextFormat for HTTPTraceContextPropagator {
impl api::HttpTextFormat for TraceContextPropagator {
/// Properly encodes the values of the `SpanContext` and injects them
/// into the `Carrier`.
fn inject(&self, context: api::SpanContext, carrier: &mut dyn api::Carrier) {
Expand Down Expand Up @@ -136,7 +136,7 @@ mod test {

#[test]
fn extract_w3c() {
let propagator = HTTPTraceContextPropagator::new();
let propagator = TraceContextPropagator::new();

for (header, expected_context) in extract_data() {
let mut carrier: HashMap<&'static str, String> = HashMap::new();
Expand All @@ -147,7 +147,7 @@ mod test {

#[test]
fn inject_w3c() {
let propagator = HTTPTraceContextPropagator::new();
let propagator = TraceContextPropagator::new();

for (expected_header, context) in inject_data() {
let mut carrier = HashMap::new();
Expand Down