chore: correct OpenTracing -> OpenTelemetry (#34)

This commit is contained in:
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."
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]

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.
#[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;

View file

@ -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;