LCOV - code coverage report
Current view: top level - source/extensions/tracers/opentelemetry/samplers/always_on - always_on_sampler.h (source / functions) Hit Total Coverage
Test: coverage.dat Lines: 0 1 0.0 %
Date: 2024-01-05 06:35:25 Functions: 0 1 0.0 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include "envoy/server/factory_context.h"
       4             : 
       5             : #include "source/common/common/logger.h"
       6             : #include "source/common/config/datasource.h"
       7             : #include "source/extensions/tracers/opentelemetry/samplers/sampler.h"
       8             : 
       9             : namespace Envoy {
      10             : namespace Extensions {
      11             : namespace Tracers {
      12             : namespace OpenTelemetry {
      13             : 
      14             : /**
      15             :  * @brief A sampler which samples every span.
      16             :  * https://opentelemetry.io/docs/specs/otel/trace/sdk/#alwayson
      17             :  * - Returns RECORD_AND_SAMPLE always.
      18             :  * - Description MUST be AlwaysOnSampler.
      19             :  *
      20             :  */
      21             : class AlwaysOnSampler : public Sampler, Logger::Loggable<Logger::Id::tracing> {
      22             : public:
      23             :   explicit AlwaysOnSampler(const Protobuf::Message& /*config*/,
      24           0 :                            Server::Configuration::TracerFactoryContext& /*context*/) {}
      25             :   SamplingResult shouldSample(const absl::optional<SpanContext> parent_context,
      26             :                               const std::string& trace_id, const std::string& name,
      27             :                               OTelSpanKind spankind,
      28             :                               OptRef<const Tracing::TraceContext> trace_context,
      29             :                               const std::vector<SpanContext>& links) override;
      30             :   std::string getDescription() const override;
      31             : 
      32             : private:
      33             : };
      34             : 
      35             : } // namespace OpenTelemetry
      36             : } // namespace Tracers
      37             : } // namespace Extensions
      38             : } // namespace Envoy

Generated by: LCOV version 1.15