-
Notifications
You must be signed in to change notification settings - Fork 29
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
Use code templates #30
Use code templates #30
Conversation
c8c87d1
to
8cf8387
Compare
cdca0b4
to
4613b3c
Compare
026d0c0
to
41c82d0
Compare
41c82d0
to
2d59fc0
Compare
@sir-dunxalot any feedback? |
@sir-dunxalot @miguelcobain I'm also interested in having this merged/released. New Relic informed me that I have an NR code being loaded. |
Possible candidate for Adoption ? |
@sir-dunxalot Just following up. Anything we can help with to move this along? |
Note: The SPA snippet needs to optionally handle distributed tracing config. We use a custom "solution" (if you wanna call my hack that) for newrelic integration that handles a couple of edge cases not covered by community addons. I would not mind helping / sharing learnings so that we could switch to a community addon. These are a few of the things we handle in our in-house addon:
Distributed tracing supportThe SPA snippet you download from the the URL doesn't include distributed tracing config yet (worked with NR support on this). To enable it, you much need to pre-prepend the config as shown below:
Release identification (with CSP support)Supporting Our implementation passes in token values via environment variables since version number is not contained in source code but is determined by CI automatically. In other words:
Sorry for rambling. |
Thanks @miguelcobain! I've merged, updated additional deps locally, and will release a new version soon. Frankly, I no longer use New Relic on any projects (and barely use Ember these days) so I hope to find a co-maintainer for this repo. Let me know if you're interested. @les2 I believe your comments are best suited to a new issue or pull request. I do not know the demand for distributed tracing. I will happily receive a PR with test coverage. Regarding release identification, is that something this addon should support? Maybe your example is best added as instructions in the README. |
The PR includes #29
Check this commit if you want to see only the new changes that aren't already on that PR: 2d59fc0
What this does is to separate the new relic code scripts from the
index.js
file.We now place them in a separate
new-relic-templates
folder and there we can use{{expressions}}
to replace values.I also updates the classic and spa templates with the latest. I grabbed them from the new relic dashboard.
By the way, what is exactly the "classic" code? I used the "pro" version for the classic. Maybe new relic changed names a bit. This is how I see it right now:
So now we have 3 different types of codes: Lite, Pro and Pro + SPA.
Should we update our settings a bit to allow the user to choose one of those 3?
This PR also wraps the new-relic code using
fastboot-transform
package. So this also closes #23 and #19.