Giter Club home page Giter Club logo

Comments (7)

lforst avatar lforst commented on June 22, 2024

It is strongly recommended to run the plugin exactly when the prod build is running to avoid source maps to be drifting apart between builds.

I still don't understand your setup. Do you deploy the same app multiple times? And do you point each deployment to a separate project in Sentry? If so, we don't support sharing artifacts between projects yet, meaning you have to upload them multiple times.

from sentry-javascript-bundler-plugins.

taobojlen avatar taobojlen commented on June 22, 2024

@lforst yes, we deploy our app many times -- we have an environment for each of our customers. they all live in the same sentry project, but as different environments.

so the deployed code will be the same across environments. we want a way to tell sentry "hey, environments A and B were just updated to run version X of our app, so that's the sourcemap to use".

maybe this isn't actually necessary? if we upload the sourcemap once, and create releases via the sentry CLI or github integration, will that work?

from sentry-javascript-bundler-plugins.

lforst avatar lforst commented on June 22, 2024

Currently, you need to upload sourcemaps to each project separately.

from sentry-javascript-bundler-plugins.

bastien-pruvost avatar bastien-pruvost commented on June 22, 2024

I have the same problem, I have a Vite application with two environments (staging and production). And the code base is not the same (I have new features on staging that I don't have in production yet). I use sentry vite plugin in the deployment CIs to upload the sourcemaps.
But how can I upload different sourcemaps in the same Sentry project but in two different Sentry environments (staging and production) ?

from sentry-javascript-bundler-plugins.

lforst avatar lforst commented on June 22, 2024

@bastien-pruvost I don't think your problem is the same. You are not uploading to two different projects. If you use the default configuration of the vite plugin, everything should just work for you.

from sentry-javascript-bundler-plugins.

taobojlen avatar taobojlen commented on June 22, 2024

@lforst I don't upload to different Sentry projects either! I just have one project, with multiple environments.

My understanding is that the hierarchy in Sentry goes like this: Project -> Environment -> Release -> Sourcemap.

So my overall question is: when we deploy the same build to n environments, do we need to upload n sourcemaps? Or is it possible to upload a single sourcemap, and create the releases separately (e.g. via Sentry's API)? Is Sentry smart enough to re-use the sourcemap across environments in that case?

from sentry-javascript-bundler-plugins.

lforst avatar lforst commented on June 22, 2024

The hierarchy goes:

  • Project -> Sourcemap (if you use debug IDs which is the default)
  • Project -> Release -> Sourcemap (if you use the legacy upload process)

So if you have multiple environments that all send to the same project in Sentry, everything should just work fine by uploading once, everytime you build your application.

from sentry-javascript-bundler-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.