newrelic-grape icon indicating copy to clipboard operation
newrelic-grape copied to clipboard

Request path appears in newrelic as ":version/endpoint_name(.:format)"

Open rrecio opened this issue 11 years ago • 9 comments

How can I make it appear as /v1/endpoint_name ?? screen shot 2013-07-05 at 4 23 16 am

rrecio avatar Jul 05 '13 07:07 rrecio

You can try to override request_path and request_method here https://github.com/flyerhzm/newrelic-grape/blob/master/lib/newrelic-grape/instrument.rb#L23

flyerhzm avatar Jul 06 '13 03:07 flyerhzm

So this is supposed to happen? I'm just trying to understand :)

rrecio avatar Jul 06 '13 03:07 rrecio

yes, we only track the url pattern, like users-:id

if not, you will see lots of urls on newrelic web transaction, like, /users/1, /users/10, /users/100, etc.

but version and format may not be converted.

flyerhzm avatar Jul 06 '13 03:07 flyerhzm

What about when problem is on /v2/users and not on /v1/users?

rrecio avatar Jul 06 '13 05:07 rrecio

yes, it's a problem, feel free to open a pull request for it.

flyerhzm avatar Jul 06 '13 05:07 flyerhzm

Thanks. I will try to fix it! :)

rrecio avatar Jul 06 '13 06:07 rrecio

PR #15 with corrections

donbobka avatar May 09 '14 12:05 donbobka

PR was merged to master. @flyerhzm thanks.

gem 'newrelic-grape', github: 'flyerhzm/newrelic-grape'

Result: 2014-05-09_18-13-48

donbobka avatar May 09 '14 12:05 donbobka

Looks like it's solved in #15

dmitry avatar Sep 22 '15 07:09 dmitry