chore: correct OpenTracing -> OpenTelemetry (#34)

pull/38/head
Marcus Griep 2022-03-09 11:23:43 -05:00 committed by GitHub
parent 5f180155ef
commit 643f47ad92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@ edition = "2018"
description = "Opentracing middleware for reqwest." description = "Opentracing middleware for reqwest."
repository = "https://github.com/TrueLayer/reqwest-middleware" repository = "https://github.com/TrueLayer/reqwest-middleware"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
keywords = ["reqwest", "http", "middleware", "opentracing", "tracing"] keywords = ["reqwest", "http", "middleware", "opentelemetry", "tracing"]
categories = ["web-programming::http-client"] categories = ["web-programming::http-client"]
[features] [features]

View File

@ -38,7 +38,7 @@ impl Middleware for TracingMiddleware {
) )
}; };
// Adds tracing headers to the given request to propagate the OpenTracing context to downstream revivers of the request. // Adds tracing headers to the given request to propagate the OpenTelemetry context to downstream revivers of the request.
// Spans added by downstream consumers will be part of the same trace. // Spans added by downstream consumers will be part of the same trace.
#[cfg(any( #[cfg(any(
feature = "opentelemetry_0_13", feature = "opentelemetry_0_13",
@ -47,7 +47,7 @@ impl Middleware for TracingMiddleware {
feature = "opentelemetry_0_16", feature = "opentelemetry_0_16",
feature = "opentelemetry_0_17", feature = "opentelemetry_0_17",
))] ))]
let req = crate::otel::inject_opentracing_context_into_request(&request_span, req); let req = crate::otel::inject_opentelemetry_context_into_request(&request_span, req);
// Run the request // Run the request
let outcome = next.run(req, extensions).await; let outcome = next.run(req, extensions).await;

View File

@ -37,8 +37,8 @@ use opentelemetry::global;
use opentelemetry::propagation::Injector; use opentelemetry::propagation::Injector;
use tracing_opentelemetry::OpenTelemetrySpanExt; use tracing_opentelemetry::OpenTelemetrySpanExt;
/// Injects the given Opentelemetry Context into a reqwest::Request headers to allow propagation downstream. /// Injects the given OpenTelemetry Context into a reqwest::Request headers to allow propagation downstream.
pub fn inject_opentracing_context_into_request(span: &Span, request: Request) -> Request { pub fn inject_opentelemetry_context_into_request(span: &Span, request: Request) -> Request {
let context = span.context(); let context = span.context();
let mut request = request; let mut request = request;