Skip to content
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

Rails Runner Instrumentation #1219

Closed
allcentury opened this issue Oct 26, 2020 · 1 comment · Fixed by #2509
Closed

Rails Runner Instrumentation #1219

allcentury opened this issue Oct 26, 2020 · 1 comment · Fixed by #2509
Assignees
Labels
community Was opened by a community member feature-request A request for a new feature or change to an existing one integrations Involves tracing integrations

Comments

@allcentury
Copy link

We run a lot of cronjobs via:

bundle exec rails runner bin/my_runner.rb

However, I'm unable to find these traces in APM. Do we need to manually set up the tracing or is there integration instrumentation that we missed?

If these aren't automatically picked up, I think this is a common enough execution method that others would want it.

Config:

Datadog.configure do |c|
  if !%w[development test].include?(Rails.env) || ENV["DD_AGENT_DISABLE_TRACING"]
    c.runtime_metrics_enabled = true
    c.analytics_enabled = true

    c.use :rails, service_name: app_name
    c.use :active_model_serializers, service_name: "#{app_name}-active-model-serializers"
    c.use :aws, service_name: "#{app_name}-aws"
    c.use :concurrent_ruby, service_name: "#{app_name}-concurrent-ruby"
    c.use :faraday, service_name: "#{app_name}-faraday"
    c.use :racecar, service_name: "#{app_name}-racecar"
    c.use :rake, service_name: "#{app_name}-rake"
    c.use :redis, service_name: "#{app_name}-redis"
    c.use :shoryuken, service_name: "#{app_name}-shoryuken"
    c.tracer hostname: config[:apm][:host], port: config[:apm][:port]
    c.runtime_metrics statsd: STATSD_NO_NAMESPACE
  end
end
@marcotc
Copy link
Member

marcotc commented Oct 27, 2020

👋 @allcentury, thank you for reporting this issue.

We don't currently have first-class support for instrumenting Rails Runner executions.
We have plans to spend more time improving our Rails instrumentation, so I'll make sure to capture the Runner instrumentation in that effort.

Meanwhile, your only solution is to perform manual instrumentation at your entry points.

@marcotc marcotc added feature-request A request for a new feature or change to an existing one integrations Involves tracing integrations labels Oct 27, 2020
@delner delner added the community Was opened by a community member label Apr 21, 2021
@github-project-automation github-project-automation bot moved this to Resolved (without changes) in Planning Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Was opened by a community member feature-request A request for a new feature or change to an existing one integrations Involves tracing integrations
Projects
Status: Resolved (without changes)
Development

Successfully merging a pull request may close this issue.

3 participants