Repository sentry-module

mauxtin

mauxtin posted a new question

sentry-module • 2 days ago

How to use captureException?

Is there any way to do something like that? This is inside a method.
At this point I am getting the error
Uncaught (in promise) TypeError: Cannot read property 'captureException' of undefined

   this.$axios.post('/endpoint', data).then((response) => {
    //
   }).catch((error) => {
       if (error.response.status !== 422) {
         this.$raven.captureException(error)
       }
    })
benoitemile

benoitemile resolved the question #c18

sentry-module • 14 days ago

Sentry module : Splitting client/server errors

you can mark this as resolved

SAGV

SAGV posted a new question

sentry-module • a month ago

Using Raven in nuxtServerInit?

Is there any way to use Raven within nuxtServerInit method and inside other store actions?

Unfortunately, $raven is not passed as a part of context.app like context.app.$axios, for example.

DiederikvandenB

DiederikvandenB posted a new question

sentry-module • a month ago

Help wanted: tests

To everyone using this package:

If anyone could help out to write a few basic tests that would be great. I'd be willing to maintain the package although I do not use Vue/Nuxt myself anymore, and having tests would make this much easier. I unfortunately do not have enough spare time available to write the tests myself.

Cheers!

benoitemile

benoitemile posted a new question

sentry-module • 2 months ago

Sentry module : Splitting client/server errors

Hello there,

Do you think it is possible to separate nuxt server and nuxt client in 2 different sentry projects ?

Thank you

PhouvanhKCSV

PhouvanhKCSV posted a new question

sentry-module • 2 months ago

How to set Private Key

Hi,

in my nuxt.config.js i have

...
sentry: {
    public_dsn: 'xxx',
    project_id: 'xxx',
  }
...

but when i run build, i got the message "nuxt:sentry disabled because no (private) key was found

Where can i get the private key? (and public key). i have read their docs only see document about "dsn"

Thanks

iNerV

iNerV posted a new question

sentry-module • 3 months ago

How integrate with SessionStack

Hello! I tried integrate our Sentry with SessionStack but I get an error:

ReferenceError
Raven is not defined

Can you help me?

acidjazz

acidjazz posted a new question

sentry-module • 4 months ago

Ability to disable for specific environments?

I'd like to not load this for my local env, is there any way i can dynamically load the module and/or specify a config option that disables it and then decide based on an ENV variable?

pSchaub

pSchaub posted a new question

sentry-module • 5 months ago

Is this project prepared for nuxt 2?
warning " > @nuxtjs/[email protected]" has unmet peer dependency "[email protected]<1.0.0 || >1.2.1".

I have seen this warning with yarn while using nuxt-edge.
So my question is: Is this project prepared for nuxt 2 or are there some changes needed for a full support of nuxt 2?

Atinux

Atinux fixed the bug report #c9 in v1.0.1

sentry-module • 5 months ago

bug NuxtJS 1.0.0 errorMiddleware undefined
pauldariye

pauldariye posted a new question

sentry-module • 5 months ago

I get undefined on my server log when accessing $raven from app context

screen shot 2018-03-22 at 02 38 54

boltonomous

boltonomous posted a new question

sentry-module • 5 months ago

must have a SENTRY_PRIVATE_KEY env, even though SENTRY_DSN exists

This module works well, but one issue I ran into is that I had to have SENTRYPRIVATEKEY defined for this to work… even though SENTRY_DSN was defined.

It looks like the culprit is here:
https://github.com/nuxt-community/sentry-module/blob/master/lib/sentry.js#L22

I'm happy to fix, just wanted to make sure there wasn't more to this before doing so. Thanks!

dorianamouroux

dorianamouroux posted a new question

sentry-module • 5 months ago

Inject keys on runtime

I'm using this package https://github.com/samtgarson/nuxt-env to inject my environment variable on runtime; and avoid having keys on the buildtime. Would sentry-module play nicely with it; to avoid the issues mentioned in the README of nuxt-env ?

damienbeaufils

damienbeaufils posted a new question

sentry-module • 5 months ago

Sentry key is null in raven-js when passing SENTRY_DSN only to start process

Hello,

I have a Nuxt v1.4.0 application which I build once with npm run build, to be able to ship it in a Docker container. In the container, the application is started using npm start.
The container is deployed in multiple environments (development, staging, production…) and we use environment variables to have distinct configurations between environments. So I have a distinct SENTRY_DSN environment variable between staging and production.

When I start the application with the environment variable, Sentry configuration is OK for node (raven) but not for client (raven-js). It seems that the raven-js client configuration is only filled during build phase, from the nuxt-config variables.

Would it be possible to build without that information but to start the application with it?
For example: npm run build && SENTRY_DSN=xyz npm start
In other words, would it be possible for the generated code be updated with the environment variable during application start?

If not, I can't build once and run everywhere the application, because I have SENTRY_DSN values depending on the environment on which the application is started.

Thanks!

tolgap

tolgap posted a new question

sentry-module • 5 months ago

Do not initialize this module if no Sentry information is passed (like in a local environment)

If you leave any Sentry information out of your .env file, this module still tries to send a HTTP request to sentry.io but (of course) with a wrong URL: POST https://sentry.io/api//store/?sentry_version=7&sentry_client=raven-js%2F3.23.1&sentry_key=null 400 (BAD REQUEST).

It would be nice if this module would check if all required Sentry info was empty, the plugin simply does not initialize. Otherwise I have to resort to polluting my nuxt.config.js with a bunch of process.env checks 😄 .

pSchaub

pSchaub posted a new question

sentry-module • 6 months ago

Support "false" string in process.env.SENTRY_DISABLE_CLIENT_SIDE

If you do this in the env file …

SENTRY_DISABLE_CLIENT_SIDE=false

… the script will still think that the sentry client should be disabled. The reason is that "false" is a string and not a boolean.

So please add a check if the string "false" or "0" is set to support the above environment variable as a normal user would expect it.

apertureless

apertureless posted a new question

sentry-module • 6 months ago

😔 not working

Installed the current version.
Added it to modules and config with dsn.

After yarn build && yarn start I am getting

raven@2.4.1 alert: failed to send exception to sentry: HTTP Error (401): Invalid api key

If I run yarn dev

raven@2.4.1 alert: failed to send exception to sentry: HTTP Error (413): undefined
raven@2.4.1 alert: failed to send exception to sentry: Socket timed out on request to sentry.io

nuxt 1.3.0

btw. if I console.log(this.$raven) I get

_dsn:"https://[email protected]/"
Flur3x

Flur3x posted a new question

sentry-module • 7 months ago

Example for Raven.setUserContext()

Hi, thanks for this nice module. I'd like to ask if you could give an example on how/where to call

this.$raven.setUserContext( { email: '[email protected]' } );

It probably should be called as soon as possible, but there is no such thing as nuxtClientInit right now and I can't access the app context in nuxtServerInit. I don't even know if it's necessary to call it on the server side already. Sure, I could add it to a middleware, but then it would be called/evaluated with every route change …

Help is much appreciated! :)

Best,
Daniel

steffen1249

steffen1249 posted a new bug report

sentry-module • 7 months ago

bug NuxtJS 1.0.0 errorMiddleware undefined

At Nuxt release 1.0.0 they did braking changes to their hook system which included a rewrite of how they use their errorMiddleware.

The errorMiddleware is no longer a part of the Renderer class, which results in errorMiddleware being undefined and the custom sentry middleware is not called at any point because of this.

Please refer to how it was done prior to the release here:
https://github.com/nuxt/nuxt.js/blob/v1.0.0-rc11/lib/core/renderer.js#L323

And after 1.0.0 here:
https://github.com/nuxt/nuxt.js/blob/v1.0.0/lib/core/renderer.js#L17

luchun

luchun posted a new question

sentry-module • 7 months ago

Nuxt.js 1.0.0 new hook system

nuxt.plugin('renderer',..) is deprecated. Please use new hooks system.

please see https://github.com/nuxt/nuxt.js/releases Breaking changes section