NVIDIA DeepStream SDK API Reference

9.2 Release
includes/opentelemetry/context/propagation/noop_propagator.h
Go to the documentation of this file.
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3 
4 #pragma once
5 
6 #include "opentelemetry/context/propagation/text_map_propagator.h"
7 #include "opentelemetry/version.h"
8 
10 namespace context
11 {
12 namespace propagation
13 {
14 
19 {
20 public:
23  context::Context &context) noexcept override
24  {
25  return context;
26  }
27 
29  void Inject(TextMapCarrier & /*carrier*/,
30  const context::Context & /* context */) noexcept override
31  {}
32 
33  bool Fields(nostd::function_ref<bool(nostd::string_view)> /* callback */) const noexcept override
34  {
35  return true;
36  }
37 };
38 } // namespace propagation
39 } // namespace context
nostd::function_ref
Definition: includes/opentelemetry/nostd/function_ref.h:17
context::propagation::NoOpPropagator::Extract
context::Context Extract(const TextMapCarrier &, context::Context &context) noexcept override
Noop extract function does nothing and returns the input context.
Definition: includes/opentelemetry/context/propagation/noop_propagator.h:22
OPENTELEMETRY_BEGIN_NAMESPACE
#define OPENTELEMETRY_BEGIN_NAMESPACE
Definition: includes/opentelemetry/version.h:21
context
Definition: includes/opentelemetry/context/context.h:16
context::propagation::TextMapPropagator
Definition: includes/opentelemetry/context/propagation/text_map_propagator.h:42
context::propagation::NoOpPropagator::Fields
bool Fields(nostd::function_ref< bool(nostd::string_view)>) const noexcept override
Definition: includes/opentelemetry/context/propagation/noop_propagator.h:33
OPENTELEMETRY_END_NAMESPACE
#define OPENTELEMETRY_END_NAMESPACE
Definition: includes/opentelemetry/version.h:24
context::propagation::NoOpPropagator::Inject
void Inject(TextMapCarrier &, const context::Context &) noexcept override
Noop inject function does nothing.
Definition: includes/opentelemetry/context/propagation/noop_propagator.h:29
context::Context
Definition: includes/opentelemetry/context/context.h:23
context::propagation::TextMapCarrier
Definition: includes/opentelemetry/context/propagation/text_map_propagator.h:18
context::propagation::NoOpPropagator
No-op implementation TextMapPropagator.
Definition: includes/opentelemetry/context/propagation/noop_propagator.h:18
nostd::string_view
Back port of std::string_view to work with pre-cpp-17 compilers.
Definition: includes/opentelemetry/nostd/string_view.h:37