apm-agent-ruby icon indicating copy to clipboard operation
apm-agent-ruby copied to clipboard

Racecar consumer instrumentation improvements

Open ErvalhouS opened this issue 1 year ago • 5 comments

What does this pull request do?

This PR adds better context to Racecar consumer transactions.

  1. Transaction naming now includes the consumer class, in a format that is similar to the current Rails instrumentation i.e.: ConsumerClass#method
  2. Transaction success/failure based on Racecar's exception handling

Why is it important?

Right now there's only the process.args to differ transactions happening in different consumers, which could be problematic since it isn't the default visualization grouping from other libraries. Error handling is also not recorded, what makes transactions be stored with an unknown status.

Checklist

  • [x] I have signed the Contributor License Agreement.
  • [x] My code follows the style guidelines of this project (See .rubocop.yml)
  • [x] I have rebased my changes on top of the latest main branch
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [ ] ~~I have made corresponding changes to the documentation~~
  • [x] I have updated CHANGELOG.asciidoc
  • [ ] ~~I have updated supported-technologies.asciidoc~~
  • [ ] ~~Added an API method or config option? Document in which version this will be introduced~~

Related issues

Relates https://github.com/elastic/apm-agent-ruby/pull/1284

ErvalhouS avatar Jan 08 '24 16:01 ErvalhouS

@elasticmachine run elasticsearch-ci/docs

picandocodigo avatar Jan 09 '24 14:01 picandocodigo

I don't think the tests failures had anything to do with the changes.

ErvalhouS avatar Jan 09 '24 21:01 ErvalhouS

@ErvalhouS thank you for the contribution. No, the build failures are not related to your change. I'm trying to fix the build in a different PR and once that's done, I'll rebase this branch to bring in the changes. Thank you!

picandocodigo avatar Jan 10 '24 12:01 picandocodigo

@picandocodigo can we trigger a re-run on CI?

ErvalhouS avatar May 10 '24 13:05 ErvalhouS