-
Notifications
You must be signed in to change notification settings - Fork 43
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
Instrument Gatsby application #451
Comments
Hi @TioLuiso thanks for reaching out. We are currently fixing an issue with our NPM publishing so the new package isn't out there yet. I will message you when it is so you can give it another try. |
That's what I call fast!!!. Thanks a lot |
@TioLuiso we got the updated package published. Can you please try now. The version should be |
Hello
|
Thanks for trying the npm package @TioLuiso . Any chance you could put together a small reproduction of the issue? The import path for the browser agent class is correct. What version of NodeJS are you using? When you say it is incorrect, what do you mean? |
Ok
As you can see, if cannot find the module I have pushed this into a github repo: https://github.com/TioLuiso/react-newrelic |
@TioLuiso we have published a new release of the NPM package I was able to get your reproduction working with the new version after adding a line to instantiate the |
I am still seeing the same issue on I was able to produce a minimal reproduction here using Parcel: https://github.com/kylekarpack/nr-browser-test |
@kylekarpack I do not see that issue when I clone your reproduction repository. What version of Node are you running? What VSCode plugins do you have installed? Any global or IDE eslint or typescript settings that could cause this? |
@patrickhousley, this occurs for me in a GitHub codespace running Node 19.7.0, but the issue is less about VSCode and more about the fact that the project won't build. When you run As an aside, I fixed the JSX issue on the minimal repro so that wouldn't be a distraction |
Ah ok, yea the build does show the error but not my vscode. Weird. |
Weirdly, what does work for the build is: import { BrowserAgent } from '@newrelic/browser-agent'; But that causes VSCode's syntax highlighting to get unhappy:
|
This may be related to parcel-bundler/parcel#4155 I will have to do some more digging a little later. |
@kylekarpack That issue I linked above is the exact cause of your problems. The parcel bundler has a PR merged to support the
|
@patrickhousley, thanks for digging that up. That does indeed solve the build issue with Parcel. Appreciate it! My VSCode syntax highlighting is still not happy, but I can live with that for now |
Work has been completed on this issue. |
Description
We have followed readme to instrument react application. However, we don't see anything in new relic
Steps to Reproduce
yarn add @newrelic/browser-agent
gatsby develop
Expected Behavior
That the traces of the navigation and the calls to backend would appear in New Relic
Relevant Logs / Console output
In console, I can see
Browser Agent Initialized!
Your Environment
Browser: Chrome v111.0
OS: MacOs Ventura 13.2
Additional context
if instead of
gatsby develop
we dogatsby build
, we receive this error insteadThe text was updated successfully, but these errors were encountered: