How to use @sentry/tracing - 2 common examples

To help you get started, we’ve selected a few @sentry/tracing examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hlcfan / pokr / app / javascript / packs / room_app.js View on Github external
// import "channels"

// Rails.start()
// Turbolinks.start()
// ActiveStorage.start()

import ReactDOM from 'react-dom'
import React from 'react'
import Room from './bundles/Room/containers/Room'
import * as Sentry from "@sentry/react"
import { Integrations } from "@sentry/tracing"

Sentry.init({
  dsn: "https://e1070f75c7b24052a1784b4ce297b9e2@o100957.ingest.sentry.io/221730",
  release: "my-project-name@" + process.env.npm_package_version,
  integrations: [new Integrations.BrowserTracing()],

  // We recommend adjusting this value in production, or using tracesSampler
  // for finer control
  tracesSampleRate: 1.0,
});

document.addEventListener('DOMContentLoaded', () => {
  roomId = document.querySelector("#roomId").value
  roomName = document.querySelector("#roomName").value
  role = document.querySelector("#role").value
  currentVote = document.querySelector("#currentVote").value
  roomState = document.querySelector("#roomState").value
  pointValues = JSON.parse(document.querySelector("#pointValues").value)
  timerInterval = document.querySelector("#timerInterval").value
  freeStyle = document.querySelector("#freeStyle").value
  currentStoryId = document.querySelector("#currentStoryId").value
github ethereum-optimism / optimism / packages / data-transport-layer / src / services / server / service.ts View on Github external
private _initSentry() {
    Sentry.init({
      dsn: this.options.sentryDsn,
      release: this.options.release,
      environment: this.options.ethNetworkName,
      integrations: [
        new Sentry.Integrations.Http({ tracing: true }),
        new Tracing.Integrations.Express({
          app: this.state.app,
        }),
      ],
      tracesSampleRate: this.options.sentryTraceRate,
    })
    this.state.app.use(Sentry.Handlers.requestHandler())
    this.state.app.use(Sentry.Handlers.tracingHandler())
  }

@sentry/tracing

Sentry Performance Monitoring Package

MIT
Latest version published 1 day ago

Package Health Score

95 / 100
Full package analysis

Similar packages