APM Agent language and version: Latest version, Ruby
Browser version: N/A
Using the Ruby agent, I know it's possible to exclude certain URL suffixes (ie. /healthcheck) from being reported (which we use with great success!) but in a few services we have we use Sidekiq which is background job processing. There's a bunch of repetative jobs that just send health information to AWS cloudwatch that I'd like to have the agent not instrument but I can't quite see a config option for classes.
In this example, I'd like to have the 2 boxed jobs not collected by the agent. Is this do'able?
You can omit the payloads with a filter. It's not going to stop the events from being registered but it is going to stop them from being sent to APM Server.
Like so (untested):
ElasticAPM.add_filter(:omit_cloudwatch_workers) do |payload|
if payload.dig(:transaction, :name) =~ /CloudWatchWorker/
return ElasticAPM::Transport::Filters::SKIP # => :skip
end
payload
end
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.