We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
this gem causing a random error in my code that use mongodb. such as:
NameError: undefined local variable or method `type' for #<BSON::Document:0x00007f28841f58e8>
I found an old issue in apm-agent-ruby, mentioned that it is because RubyVM issue. Currently I use Ruby v2.7
Add functionality in Spy Sidekiq middleware, to be something like this:
class Middleware def call(worker, job, queue) worker_class = worker.class if worker_class.respond_to?(:apm_tracking_disabled?) && worker_class.apm_tracking_disabled? yield else name = SidekiqSpy.name_for(job) transaction = ElasticAPM.start_transaction(name, 'Sidekiq') ElasticAPM.set_label(:queue, queue) begin yield transaction&.done :success transaction&.outcome = Transaction::Outcome::SUCCESS rescue ::Exception => e ElasticAPM.report(e, handled: false) transaction&.done :error transaction&.outcome = Transaction::Outcome::FAILURE raise ensure ElasticAPM.end_transaction end end end end
the above code is from AI. the main concept is to add additional config in my sidekiq worker class, such as self.apm_tracking_disabled = true
self.apm_tracking_disabled = true
it's ok if you can't accept this idea, I could override the Spy Middleware class in my app instead.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is your feature request related to a problem? Please describe.
this gem causing a random error in my code that use mongodb. such as:
I found an old issue in apm-agent-ruby, mentioned that it is because RubyVM issue.
Currently I use Ruby v2.7
Describe the solution you'd like
Add functionality in Spy Sidekiq middleware, to be something like this:
the above code is from AI. the main concept is to add additional config in my sidekiq worker class, such as
self.apm_tracking_disabled = true
it's ok if you can't accept this idea, I could override the Spy Middleware class in my app instead.
The text was updated successfully, but these errors were encountered: