-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spans from Sidekiq workers are missing after upgrading to v1.2.1
#1495
Comments
Here are is a simple example. You will need to have redis running locally and available on the default port. Gemfile# frozen_string_literal: true
source 'https://rubygems.org'
gem 'opentelemetry-api'
gem 'opentelemetry-common'
gem 'opentelemetry-instrumentation-base'
gem 'opentelemetry-instrumentation-sidekiq'
gem 'opentelemetry-sdk'
gem 'sidekiq' Gemfile.lockGEM
remote: https://rubygems.org/
specs:
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
opentelemetry-api (1.2.0)
opentelemetry-common (0.19.7)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (0.22.1)
opentelemetry-api (~> 1.0)
opentelemetry-registry (~> 0.1)
opentelemetry-instrumentation-sidekiq (0.24.1)
opentelemetry-api (~> 1.0)
opentelemetry-common (~> 0.19.3)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-registry (0.3.0)
opentelemetry-api (~> 1.1)
opentelemetry-sdk (1.2.1)
opentelemetry-api (~> 1.1)
opentelemetry-common (~> 0.19.3)
opentelemetry-registry (~> 0.2)
opentelemetry-semantic_conventions
opentelemetry-semantic_conventions (1.10.0)
opentelemetry-api (~> 1.0)
rack (3.0.8)
redis-client (0.14.1)
connection_pool
sidekiq (7.1.2)
concurrent-ruby (< 2)
connection_pool (>= 2.3.0)
rack (>= 2.2.4)
redis-client (>= 0.14.0)
PLATFORMS
arm64-darwin-22
DEPENDENCIES
opentelemetry-api
opentelemetry-common
opentelemetry-instrumentation-base
opentelemetry-instrumentation-sidekiq
opentelemetry-sdk
sidekiq
BUNDLED WITH
2.4.10 sidekiq_example.rb# frozen_string_literal: true
require "rubygems"
require "bundler/setup"
Bundler.require
# Export traces to console by default
ENV["OTEL_TRACES_EXPORTER"] ||= "console"
OpenTelemetry::SDK.configure do |c|
c.use "OpenTelemetry::Instrumentation::Sidekiq"
end
# A basic Sidekiq job worker example
class SimpleJob
include Sidekiq::Worker
def perform
OpenTelemetry.tracer_provider.tracer("sidekiq_example", "0.0.1").in_span("foo") do
puts "Workin'"
end
end
end
if ARGV[0] == "client"
SimpleJob.perform_async
end |
1. Queue the job
Output
2. Run the sidekiq server
Output
|
We have a similar issue opened in the instrumentation repo: open-telemetry/opentelemetry-ruby-contrib#544 Would you mind sharing your comments there instead? |
I can confirm this issue is still present even on opentelemetry-sdk (1.3.0)
|
👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the |
Description of the bug
After upgrading only the
opentelemetry-sdk
gem fromv1.2.0
tov1.2.1
, I started seeing a lot of "Calling finish on an ended Span." warnings from Sidekiq. I also found that I am only receiving a single span (the parent) for all of my Sidekiq workers. After reverting the SDK back down tov1.2.0
these problems went away.The only thing that looks to have changed in 1.2.1 was #1412.
Share details about your runtime
Operating system details: macOS 13.4.1 (22F82)
RUBY_ENGINE: "ruby"
RUBY_VERSION: "3.2.2"
RUBY_DESCRIPTION: "ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]"
The text was updated successfully, but these errors were encountered: