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

[FEATURE] generate a link to the current log

Open sbeckeriv opened this issue 3 years ago • 6 comments

Feature Description

I have logging in new relic and I would like to be able to generate a link to the logs to send to my error reporting.

Describe Alternatives

I could generate one myself however, I can not get the params for https://one.newrelic.com/logger to work. I think I need to send a random state and omitting the account appears to work. I would like to include the server name and app name as well to really focus the logs. With both I can remove the server name to get a bigger app view at the time.

 now = DateTime.now                                                                                                                               
"https://one.newrelic.com/logger?begin=#{(now+5.minutes).strftime('%Q')}&end=#{(now+7.minutes).strftime('%Q')}&state=#  {rand(3333)}"

Priority

Really want.

sbeckeriv avatar Apr 08 '22 17:04 sbeckeriv

@sbeckeriv Thanks for submitting a feature request! Will you share the Ruby Agent version are you using and a little about the application that you are running?

angelatan2 avatar Apr 08 '22 18:04 angelatan2

@angelatan2 I am running the current version of the agent. I am running a rails 6 app with an error reporting service.

sbeckeriv avatar Apr 08 '22 18:04 sbeckeriv

@sbeckeriv Thank you for the feature request. I see that this feature will ease getting information to the people to look at the logs. I've shared this feature request with @elucus who will review this request.

angelatan2 avatar Apr 11 '22 22:04 angelatan2

@sbeckeriv We reviewed your request; however, we have trouble understanding your use case. These questions will help form the use case. We would appreciate it if you could write the use case to clarify the context of the feature request.

  1. Can you clarify where the link should be and where/what it would link?
  2. Is this a link you expect from the UI or the agent log or output console or something else?
  3. What error reporting tool are you using?
  4. Are there docs from New Relic that helped you craft your example link?
  5. You would like the server name and app name included but can you elaborate more on the portion about focusing the logs?

angelatan2 avatar Apr 18 '22 17:04 angelatan2

  `info = info.merge(log_url: "https://one.newrelic.com/logger?begin=#{(now-7.minutes).strftime('%Q')}&end=#{(now+7.minutes).strftime('%Q')}&state=#{rand(3333)}")`

this is the code i have now. I would like to include the account id in the url and then have the search come up with it prefiltered to the host name and app name like

"apmApplicationNames":"THISAPPNAME" "fullHostname":"THISSERVERNAME"

  1. this goes to the ui.
  2. any error tool that allows tags. 4)) no. i copied the current url i saw and i guessed at it. turns out state is required but i have no clue what it is. a random number seems to work well.
  3. i have 10 servers with different host name and different apps. I want to logs to filter to "apmApplicationNames":"THISAPPNAME" "fullHostname":"THISSERVERNAME" along with start and end times.

sbeckeriv avatar Apr 18 '22 18:04 sbeckeriv

https://new-relic.atlassian.net/browse/NR-133079

Work has been completed on this issue.

Hi @sbeckeriv,

Our apologies for the abrupt and automated closing of this issue while you clearly still don't have the desired functionality available.

Effectively this issue was treated as a duplicate and closed, because we've had multiple requests for generating links. The team responsible for providing log data in the UI is looking into the best way to deliver this functionality. Once they have decided upon a standard and implemented it, then the APM agent teams like our Ruby team can help further expose the functionality via the agents.

Unfortunately, the work in question is being tracked with a system internal to New Relic and you won't have visibility into the status of it. You are welcome to reach out to your New Relic account rep at any time, and you are most welcome to create subsequent feature requests in this repo to ask where things are at.

fallwith avatar Mar 01 '24 20:03 fallwith