newrelic-grape
newrelic-grape copied to clipboard
Request path appears in newrelic as ":version/endpoint_name(.:format)"
How can I make it appear as /v1/endpoint_name ??
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
So this is supposed to happen? I'm just trying to understand :)
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.
What about when problem is on /v2/users and not on /v1/users?
yes, it's a problem, feel free to open a pull request for it.
Thanks. I will try to fix it! :)
PR #15 with corrections
PR was merged to master. @flyerhzm thanks.
gem 'newrelic-grape', github: 'flyerhzm/newrelic-grape'
Result:
Looks like it's solved in #15