Skip to content

Sentry transaction name #2351

Open
Open
@mbajur

Description

@mbajur

Hello! I'm using Grape gem in one of my production apps. This app also uses Sentry for error reporting and performance monitoring. This issue is not strictly tied to grape but - for some reason, Sentry transaction naming works fine for regular rails controllers and actions but not for grape ones. It uses request URL instead. So, for regular rails transactions i'm getting Doorkeeper::TokensController#create while for grape actions, i'm getting /api/v1/records/1 etc. This thing can be configured by using Sentry.configure_scope { |scope| scope.set_transaction_name("MyController#my_action") } before the actual transaction and i was wondering:

Is that possible to access current resource and action names in before filter of my grape api, globally? By globally i mean not separately in each resource but rather in the parent Base < Grape::API class.

Thanks in advance for any clues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions