From 643f47ad9291be23eec9c712be5ac782e02f1840 Mon Sep 17 00:00:00 2001 From: Marcus Griep Date: Wed, 9 Mar 2022 11:23:43 -0500 Subject: [PATCH] chore: correct OpenTracing -> OpenTelemetry (#34) --- reqwest-tracing/Cargo.toml | 2 +- reqwest-tracing/src/middleware.rs | 4 ++-- reqwest-tracing/src/otel.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/reqwest-tracing/Cargo.toml b/reqwest-tracing/Cargo.toml index 6f99b04..a8499d3 100644 --- a/reqwest-tracing/Cargo.toml +++ b/reqwest-tracing/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" description = "Opentracing middleware for reqwest." repository = "https://github.com/TrueLayer/reqwest-middleware" license = "MIT OR Apache-2.0" -keywords = ["reqwest", "http", "middleware", "opentracing", "tracing"] +keywords = ["reqwest", "http", "middleware", "opentelemetry", "tracing"] categories = ["web-programming::http-client"] [features] diff --git a/reqwest-tracing/src/middleware.rs b/reqwest-tracing/src/middleware.rs index 8b660af..2d31f56 100644 --- a/reqwest-tracing/src/middleware.rs +++ b/reqwest-tracing/src/middleware.rs @@ -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. #[cfg(any( feature = "opentelemetry_0_13", @@ -47,7 +47,7 @@ impl Middleware for TracingMiddleware { feature = "opentelemetry_0_16", 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 let outcome = next.run(req, extensions).await; diff --git a/reqwest-tracing/src/otel.rs b/reqwest-tracing/src/otel.rs index 5beb295..41d48c2 100644 --- a/reqwest-tracing/src/otel.rs +++ b/reqwest-tracing/src/otel.rs @@ -37,8 +37,8 @@ use opentelemetry::global; use opentelemetry::propagation::Injector; use tracing_opentelemetry::OpenTelemetrySpanExt; -/// 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 { +/// Injects the given OpenTelemetry Context into a reqwest::Request headers to allow propagation downstream. +pub fn inject_opentelemetry_context_into_request(span: &Span, request: Request) -> Request { let context = span.context(); let mut request = request;