Git Product home page Git Product logo

Comments (5)

mbenadda avatar mbenadda commented on May 23, 2024 1

Just a quick note to point out that is is probably affected by #72 and generally by the way we want to split our apps into separate reusable packages.

It's probably a good idea to wait until the split is effective to work on sentry/whatever reporting.

from richie.

mbenadda avatar mbenadda commented on May 23, 2024

For client side-errors, it would seem to me that it's cleaner to just yarn add Raven.js and then import it as an ES6 module for use in our code.

Not sure what Django template integration brings us. At most I see integrating the DSN as a global variable that the client will pick up (if we don't want to manage it in the client settings.json directly).

Something like <script>window.SENTRY_PUBLIC_DSN = {% sentry_public_dsn %}</script> inside <head> that we make sure is above any JS code includes.

from richie.

jmaupetit avatar jmaupetit commented on May 23, 2024

I do agree that it's way more clean to load raven as an ES6 module ❤️

But, as we have an hybrid approach concerning the front-end, we may miss application failures for everything related to DjangoCMS' or any third-party JavaScript app loaded by the CMS.

Hence, we need to define a specific block in our base Django template to load & configure Raven.js. By doing so, we will be able to override this behavior when only our front-end app is loaded.

WDYT?

from richie.

mbenadda avatar mbenadda commented on May 23, 2024

I overlooked the third-party JS part. I think on the front-office there would probably be no other JS than ours involved but on the back-office it's a different story and we need to catch errors there too.

Therefore, it's probably better to just reuse the global-scope Raven.js in our front code than to load it twice. (Maybe adding some logic to load it if it cannot be detected in the global scope?)

from richie.

jmaupetit avatar jmaupetit commented on May 23, 2024

Maybe adding some logic to load it if it cannot be detected in the global scope?

Yup. Good idea!

from richie.

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.