-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NREUM: (1) instead of Javascript? #125
Comments
Hi @sebastianhoitz, thanks for trying out browser tracing. The A code of (1) indicates that you tried to generate headers outside of a web-transaction. Are you pre-generating the headers? Calling It's a bit tough to say exactly what's happening, can you give an example of where and how you're calling |
Ok, I have this scenario: I use handlebars to output my templates. I have an object of handlebars helpers that looks like this: unless window?
newrelic = require "newrelic"
App.HandlebarsHelpers =
newrelic_header: ->
unless newrelic
return ""
new handlebars.SafeString(newrelic.getBrowserTimingHeader())
for name, method of App.HandlebarsHelpers
handlebars.registerHelper name, method in my handlebars template I then do this: layouts/application.hbs <!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>PrismaBox Webseite</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="shortcut icon" href="/images/favicon.png">
{{> layouts/_application_newrelic}}
...
</html> layouts/_application_newrelic.hbs {{#is env "production"}}
{{newrelic_header}}
{{/is}} Do I have any options to pass the request context to newrelic as an argument? |
From what I see right now is, that I could pass the generated header string as parameter to the handlebars template, so that I just output a string in handlebars, right? Edit: Ok, looks like this does not work, either. Here are some more details: I use an express-based framework. The weird thing is: the backend side gets reported to newrelic just fine. It detects transactions and sends the metrics to newrelic. But for some reason this part has problems trying to detect the transaction. |
@sebastianhoitz this is a bit difficult to debug without seeing the entire application, but I suspect it has something to do with where the A rather crude, but effective means of determining this might be:
The stack trace generated might have some useful information about whether it's generated in the context of a transaction or not. This is definitely not to be used in production code, or checked in. Sorry I don't have a better idea at the moment, if you want to discuss more details in a private ticket, feel free to email [email protected] with a link to this thread. Don't worry, we'll figure this out! |
Ok, I sent you an email with the stacktrace. I also noticed that NR inserts the JS script during the first request to the page. But after that it is not able to identify the request anymore. |
I followed up to your email. I'll leave this issue open for now, perhaps we can find a general solution, and it might make a good reference for others. |
Could you inform on what news there are about this? Did you manage to solve your personal case? |
Hey @santihbc, we're still working on solving everyones specific case. I want to take this opportunity to apologize for lack of good documentation around these errors. We're preparing a troubleshooting document to explain the error codes that will go on our help site soon. The error with The solution is to ensure that There are some template rendering techniques which violate this; they're not doing anything wrong, and neither are we. In these circumstances, you'll just need to find a better way to generate the header. One option would be to call I do not have a general solution yet, but if you can share details about how your templates are rendering/caching I would love to help come up with a solution that could be useful to others. |
Thanks for your response @groundwater , how about |
For reference, the errors are explained in the api source, but we will be moving that to an actual help doc very soon. An If you are using a supported router, can you describe how the route is being called? If you are not using a supported router, you will have to use our naming API along any route that you wish to have browser tracing enabled. |
The route is the base route. I have a single page application so I download HTML just once from the server:
Then inside the layout.html template that contains the index.html sub-template I render the headers in the following way:
Then I get the NREUM: 3 comment instead of the headers |
@groundwater We are using Hapi and getting the same issue (NREUM: 3), we also are on / in a one page app, any advice? |
Here is what @lyric and I did to resolve our issue:
Then the headers were rendered to our page, and page metrics showed up in our dashboard. 👍 |
This works locally, but when I deployed to heroku, we start getting RUM_ERROR 3 again. Starting to look now. |
Hey everyone. It looks like there are several people experiencing errors generating browser headers. I'd like to help everyone get this working, but this ticket is probably already too crowded to address people individually. I would highly recommend opening a ticket with our support staff by emailing [email protected]. Feel free to reference this issue here when you're sending your request in. We have awesome support engineers who would love to hear from you. It's clear to me that the variety of applications wanting to use browser tracing is much wider than we originally anticipated, and it's also likely that there are new use-cases we should sit down and thing about accommodating. It's worth mentioning that if you do receive an error, it's because something is not configured correctly, or the agent could not establish a session with our servers. Node's async nature makes some areas of tracing difficult, and it may be possible that your app is escaping our tracer at some points. In these situations, the more detail you have the better, and the faster we can reproduce your error the faster it can be fixed. @santihbc I followed your template, and could not replicate the error. @lyric if you have more info, especially logs I would be glad to take a look. You may want to email those to support when you get the chance. @mdarnall I'm happy you got the agent working, but you may be introducing some subtle errors. I'm cool with that if it works, but I would ask that if you file a future ticket make sure to mention your modifications. Thanks for your support on this, our browser agent team is awesome, so I definitely want to get their product out to all our node customers. |
Thanks @groundwater. It is working for us now. We are now trying to get better reporting for a single page app. |
@lyric can you share the solution please? :) |
I'm going to close this issue in a few days, not because I think everyone's issue has been solved, but because I think this issue has grown and diverged too much to be useful to people. If you are still having an issue, I encourage you to use our support channel so we can better track the success of each ticket. |
It would be great if As @groundwater suggested above, I had to call I recommend at least mentioning this somewhere in the README. Similarly I found documentation about the Browser feature very difficult to find. Leaving links for whomever lands here as well: |
I updated to version 1.7.5 and am still experiencing the NREUM(1) messages. :( |
Hi @sebastianhoitz, We are transitioning away from using the GitHub issue tracker for support of the Node.js Agent. Instead, please go to http://support.newrelic.com. You will have a better experience through our support portal than we have been able to provide here on GitHub. We appreciate your understanding as we undergo this transition. |
feat: Add Nest.js application example demonstrating file based agent config
NEWRELIC-4422: remove __NR prefix properties and usage
Resolves several dev npm audit warnings.
Resolves several dev npm audit warnings.
Release v0.5.1
I just installed the newrelic end user monitoring.
It did report data for a few seconds, but then it stopped and just outputs this HTML code:
<!-- NREUM: (1) -->
how do I get it back? Does this have anything to do with the environment NR thinks I'm in?
Edit: For some reason the reports ended when I saved the application settings in the NR interface. Also, it shows me this error:
The text was updated successfully, but these errors were encountered: