Skip to content
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

npm package for JS agent #27

Open
ledermann opened this issue Dec 16, 2023 · 2 comments
Open

npm package for JS agent #27

ledermann opened this issue Dec 16, 2023 · 2 comments

Comments

@ledermann
Copy link

For JS error tracking, it is necessary to load the agent from your CDN:

<script src="https://cdn.rorvswild.com/agent.js"></script>
<script type="text/javascript">RorVsWild.start({apiKey: "YOUR_API_KEY"})
</script>

To minimize requests to external servers, I prefer loading JS from my own server (or my own CDN). A connection to your API should only be required in case of an error, not for every single page load. Ok, I could set up a proxy for loading the agent. But ideally, the agent is part of my app's JavaScript bundle.

Do you have any plans to provide a npm package for agent.js and stracktrace.js?

@alexisbernard
Copy link
Member

I don't want to maintain a npm package for 2 files. Maybe I could include them into the gem, but that is not a priority.

@alexisbernard
Copy link
Member

Of course you looking for an automatic process, but an alternative would be to copy the agent.js file into your vendor/assets. I do not update this file really often.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants