From 8877e8436721f71a8e440dde8447b7695e0cc400 Mon Sep 17 00:00:00 2001 From: Mike Goldsmth Date: Mon, 29 Apr 2024 12:59:34 +0100 Subject: [PATCH] inherit SDK SpanProcessor --- .../opentelemetry/processor/baggage/baggage_span_processor.rb | 3 ++- processor/baggage/opentelemetry-processor-baggage.gemspec | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/processor/baggage/lib/opentelemetry/processor/baggage/baggage_span_processor.rb b/processor/baggage/lib/opentelemetry/processor/baggage/baggage_span_processor.rb index 668596979..c5e840cec 100644 --- a/processor/baggage/lib/opentelemetry/processor/baggage/baggage_span_processor.rb +++ b/processor/baggage/lib/opentelemetry/processor/baggage/baggage_span_processor.rb @@ -5,6 +5,7 @@ # SPDX-License-Identifier: Apache-2.0 require 'opentelemetry-api' +require 'opentelemetry-sdk' module OpenTelemetry module Processor @@ -40,7 +41,7 @@ module Baggage # ) # ) # end - class BaggageSpanProcessor + class BaggageSpanProcessor < OpenTelemetry::SDK::Trace::SpanProcessor # Called when a `Span` is started, adds Baggage keys/values to the span as attributes. # # @param [Span] span the `Span` that just started, expected to conform diff --git a/processor/baggage/opentelemetry-processor-baggage.gemspec b/processor/baggage/opentelemetry-processor-baggage.gemspec index ac61aeb60..adaaf13be 100644 --- a/processor/baggage/opentelemetry-processor-baggage.gemspec +++ b/processor/baggage/opentelemetry-processor-baggage.gemspec @@ -24,6 +24,7 @@ Gem::Specification.new do |spec| spec.required_ruby_version = '>= 3.0' spec.add_dependency 'opentelemetry-api', '~> 1.0' + spec.add_dependency 'opentelemetry-sdk', '~> 1.0' spec.add_development_dependency 'bundler', '~> 2.4' spec.add_development_dependency 'minitest', '~> 5.0'