JSFiddle - React, Tailwind, and code Playground

by eurica

HTML

<script src="https://browser.sentry-cdn.com/5.19.0/bundle.min.js"></script>
<html>

  <head>
    <title>JS test</title>
    <script src="https://browser.sentry-cdn.com/5.19.0/bundle.apm.min.js" integrity="sha384-QJMqCxzp7MKzl8zNb0DvULCSpKHUwFkgB/FcUVsEXJhwkO8JZFLGeiOXPepa+moK" crossorigin="anonymous"></script>

  </head>

  <body>


    <script type="text/javascript">
      //<![CDATA[


      Sentry = window.Sentry;

      console.log(Sentry)
      Sentry.init({
        dsn: 'https://[email protected]/5316387',
        integrations: [new Sentry.Integrations.Tracing()],

        tracesSampleRate: 1,
      });


      const transaction = Sentry.startTransaction({
        name: 'test-transaction'
      });
      const span = transaction.startChild({
        op: 'functionX'
      }); // This function returns a Span
      // functionCallX
      span.finish(); // Remember that only finished spans will be sent with the transaction
      transaction.finish(); // Finishing the transaction will send it to Sentry


      //]]>

    </script>

  </body>

</html>

JavaScript

Sentry.init({ dsn: 'https://[email protected]/5316387' });
myUndefinedFunction();