Hi everyone,
we already integrated APM in 3 projects with a total of 6 environments, all Rails.
However, we have another project (fairly old) in Sinatra with a lot of Sidekiq Workers that we like to monitor.
I followed this guides for Sinatra https://www.elastic.co/guide/en/apm/agent/ruby/2.x/getting-started-rack.html and also integrated this code inside the main file of our workers, where all dependencies are loaded:
# init.rb
ElasticAPM.start(YAML.load_file("config/elastic_apm.yml"))
# config/elastic_apm.yml
service_name: "api staging"
secret_token: "XXXX"
server_url: "https://XXXX.apm.eu-central-1.aws.cloud.es.io:443"
After a staging deployment I triggered some workers and requests in the Sinatra app, but no data is showing, even after 1-2 hours.
I logged in on a pry session to see if the configurations are correct:
[5] pry(main)> ElasticAPM.running?
=> true
[9] pry(main)> ElasticAPM.agent
=> #<ElasticAPM::Agent:0x007f1024771330
@config=
#<ElasticAPM::Config:0x007f102477eda0
@active=true,
@api_buffer_size=256,
@api_request_size=768000,
@api_request_time=10,
@capture_body="off",
@capture_env=true,
@capture_headers=true,
@config_file="config/elastic_apm.yml",
...
@context_builder=
#<ElasticAPM::ContextBuilder:0x007f10247709a8
@config=
#<ElasticAPM::Config:0x007f102477eda0
@active=true,
@api_buffer_size=256,
@api_request_size=768000,
@api_request_time=10,
@capture_body="off",
@capture_env=true,
@capture_headers=true,
@config_file="config/elastic_apm.yml",
@current_user_email_method=:email,
@current_user_id_method=:id,
@current_user_username_method=:username,
@custom_key_filters=[],
@default_tags={},
@disable_send=false,
@disable_start_message=false,
@disabled_spies=["json"],
@environment="staging",
@filter_exception_types=[],
@http_compression=true,
@ignore_url_patterns=[],
@instrument=true,
@instrumented_rake_tasks=[],
@log_level=1,
@log_path=nil,
...
@root_path="/var/www/api/releases/20190705060553",
@secret_token="XXXX",
@server_url="https://XXXX.apm.eu-central-1.aws.cloud.es.io:443",
@service_name="api staging",
I also tried to send some data with ElasticAPM.with_transaction
but nothing seems to be reported.
Any ideas on how to debug this, or what I'm doing wrong?
Kibana version:
v6.5.4
Elasticsearch version:
v6.5.4
APM Server version:
v6.5.4
APM Agent language and version:
Ruby, 2.9.1
Original install method (e.g. download page, yum, deb, from source, etc.) and version:
bundler via Gemfile