Sentry auth token help

definewaterHOBBY

10 months ago

Hey guys im having a small issue with sentry token when i try to push my project i get the following error in my code and that error crashes my whole app

error: Auth token is required for this request. Please run `sentry-cli login` and try again!

Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.

Please attach the full debug log to all bug reports.

Where do i provide the Auth token since the .sentryclirc is in the .gitingore

import * as Sentry from "@sentry/node";
import { nodeProfilingIntegration } from '@sentry/profiling-node';

// Ensure to call this before importing any other modules!
Sentry.init({
  dsn: "https://*.*.de.sentry.io/*",
  integrations: [
    // Add our Profiling integration
    nodeProfilingIntegration(),
  ],

  // Add Tracing by setting tracesSampleRate
  // We recommend adjusting this value in production
  tracesSampleRate: 1.0,

  // Set sampling rate for profiling
  // This is relative to tracesSampleRate
  profilesSampleRate: 1.0,
});

i have this setup right now

1 Replies

definewaterHOBBY

10 months ago

51cb3e5e-013d-43eb-b545-600daa26b09f


10 months ago

can you provide it via an environment variable?


definewaterHOBBY

10 months ago

thats what i dont know


definewaterHOBBY

10 months ago

i cant seem to find anything on this


10 months ago

that's something you would have to consult the applicable documentation for


definewaterHOBBY

10 months ago

it wants sentry-cli login


definewaterHOBBY

10 months ago

but we dont have terminal access i think


10 months ago

please consult the applicable documentation on how you would provide the token in a docker environment without an interactive shell


10 months ago

after a quick Google -


definewaterHOBBY

10 months ago

how do i do this tho


definewaterHOBBY

10 months ago

in railway


10 months ago

bro


10 months ago

service variables aka environment variables


definewaterHOBBY

10 months ago

but the sentry config is a whole file for itself


definewaterHOBBY

10 months ago

wait i think i got it


definewaterHOBBY

10 months ago

💀


10 months ago

have you read the docs section I linked?


definewaterHOBBY

10 months ago

yes


definewaterHOBBY

10 months ago

one sec i think i got it


definewaterHOBBY

10 months ago

AHAHAHAHA


definewaterHOBBY

10 months ago

NOT THE CAP EMOJI


definewaterHOBBY

10 months ago

it works


definewaterHOBBY

10 months ago

im a idiot


10 months ago

great!


sydalihsnPRO

6 months ago

@definewater How did you do it?


Sentry auth token help - Railway Help Station