Ruby transactions - workers and grape


I'm trying to apply configure APM transactions on 2 places:

  1. On workers, I try to apply the ElasticAPM.transaction {} and it doenst send any new data
  2. On Grape (gem) endpoints: all endpoints shows as Rack instead of the correct path/controller

Any help on the issues is more than welcome.


  1. What worker library are you using? The gem should automatically instrument DelayedJob and Sidekiq so if one of them, then no need to add your own transactions.

  2. There's no official Grape support yet. A user submitted their custom Grape middleware which you can find here:

Thanks for the response.

  1. Custom workers. I was able to make it work wrapping a ElasticAPM.transaction
    ElasticAPM.with_transaction / ElasticAPM.start_transaction / ElasticAPM.end_transaction dont exist even though it appears on the doc.

  2. I tried that but it didnt work. After improvements, it stopped throwing errors but doesnt split the Rack on APM into requests.
    Do you intend to merge it soon?

  1. Sounds like you are using a version of the agent < 2.0? The APIs changed in 2.0 from transaction to the ones in the docs. (Docs for 1.x are also available)

  2. Grape support is on the todo although I can't give you any dates. I think I want to do it through ActiveSupport::Notifications instead though.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.