Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/runtime": "^7.0.0",
"@sentry/browser": "5.0.8",
"@sentry/integrations": "^5.0.8",
"@sentry/browser": "5.2.0-beta.0",
"@sentry/integrations": "5.2.0-beta.0",
"algoliasearch": "^3.32.0",
"babel-core": "^7.0.0-bridge.0",
"babel-loader": "^8.0.0",
Expand Down
2 changes: 1 addition & 1 deletion requirements-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ requests-oauthlib==0.3.3
requests[security]>=2.20.0,<2.21.0
selenium==3.141.0
semaphore>=0.4.32,<0.5.0
sentry-sdk>=0.7.0
sentry-sdk>=0.7.14
setproctitle>=1.1.7,<1.2.0
simplejson>=3.2.0,<3.9.0
six>=1.10.0,<1.11.0
Expand Down
1 change: 0 additions & 1 deletion src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ def env(key, default='', type=None):
# TODO(dcramer): kill this once we verify its safe
# 'sentry.middleware.social_auth.SentrySocialAuthExceptionMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'sentry.middleware.tracing.SentryTracingMiddleware',
'sentry.debug.middleware.DebugMiddleware',
)

Expand Down
10 changes: 10 additions & 0 deletions src/sentry/interfaces/contexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,16 @@ class MonitorContextType(ContextType):
}


@contexttype
class TraceContextType(ContextType):
type = 'trace'
indexed_fields = {
'': u'{trace_id}',
'span': u'{span_id}',
'ctx': u'{trace_id}-{span_id}',
}


class Contexts(Interface):
"""
This interface stores context specific information.
Expand Down
25 changes: 0 additions & 25 deletions src/sentry/middleware/tracing.py

This file was deleted.

3 changes: 0 additions & 3 deletions src/sentry/static/sentry/app/api.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {openSudo, redirectToProject} from 'app/actionCreators/modal';
import {uniqueId} from 'app/utils/guid';
import GroupActions from 'app/actions/groupActions';
import createRequestError from 'app/utils/requestError/createRequestError';
import * as tracing from 'app/utils/tracing';

export class Request {
constructor(xhr) {
Expand Down Expand Up @@ -208,8 +207,6 @@ export class Client {
contentType: 'application/json',
headers: {
Accept: 'application/json; charset=utf-8',
'X-Transaction-ID': tracing.getTransactionId(),
'X-Span-ID': tracing.getSpanId(),
},
success: (...args) => {
const [resp] = args || [];
Expand Down
19 changes: 8 additions & 11 deletions src/sentry/static/sentry/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ import * as ReactEmotion from 'react-emotion';
import Reflux from 'reflux';
import * as Router from 'react-router';
import * as Sentry from '@sentry/browser';
import {ExtraErrorData} from '@sentry/integrations';
import {ExtraErrorData, Tracing} from '@sentry/integrations';
import createReactClass from 'create-react-class';
import jQuery from 'jquery';
import moment from 'moment';

import {metric} from 'app/utils/analytics';
import * as tracing from 'app/utils/tracing';
import ConfigStore from 'app/stores/configStore';
import Main from 'app/main';
import ajaxCsrfSetup from 'app/utils/ajaxCsrfSetup';
Expand All @@ -38,7 +37,13 @@ import plugins from 'app/plugins';
// window.__SENTRY__OPTIONS will be emmited by sdk-config.html before loading this script
Sentry.init({
...window.__SENTRY__OPTIONS,
integrations: [new ExtraErrorData()],
integrations: [
new ExtraErrorData(),
new Tracing({
tracingOrigins: ['localhost', 'sentry.io', /^\//],
autoStartOnDomReady: false,
}),
],
});

Sentry.configureScope(scope => {
Expand All @@ -48,14 +53,6 @@ Sentry.configureScope(scope => {
if (window.__SENTRY__VERSION) {
scope.setTag('sentry_version', window.__SENTRY__VERSION);
}

// There's no setTransaction API *yet*, so we have to be explicit here
scope.addEventProcessor(event => {
return {
...event,
transaction: tracing.getRoute(),
};
});
});

function __raven_deprecated() {
Expand Down
40 changes: 0 additions & 40 deletions src/sentry/static/sentry/app/utils/tracing.jsx

This file was deleted.

9 changes: 3 additions & 6 deletions src/sentry/static/sentry/app/views/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import React from 'react';
import Reflux from 'reflux';
import createReactClass from 'create-react-class';
import keydown from 'react-keydown';
import {getCurrentHub} from '@sentry/browser';
import {Tracing} from '@sentry/integrations';

import {openCommandPalette} from 'app/actionCreators/modal';
import {t} from 'app/locale';
Expand All @@ -25,7 +27,6 @@ import NewsletterConsent from 'app/views/newsletterConsent';
import OrganizationsStore from 'app/stores/organizationsStore';
import theme from 'app/utils/theme';
import getRouteStringFromRoutes from 'app/utils/getRouteStringFromRoutes';
import * as tracing from 'app/utils/tracing';

function getAlertTypeForProblem(problem) {
switch (problem.severity) {
Expand Down Expand Up @@ -157,12 +158,8 @@ const App = createReactClass({
},

updateTracing() {
tracing.startTransaction();

const route = getRouteStringFromRoutes(this.props.routes);
if (route) {
tracing.setRoute(route);
}
Tracing.startTrace(getCurrentHub(), route);
},

onConfigStoreChange(config) {
Expand Down
1 change: 1 addition & 0 deletions tests/js/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jest.mock('@sentry/browser', () => {
captureException: jest.fn(),
showReportDialog: jest.fn(),
lastEventId: jest.fn(),
getCurrentHub: jest.spyOn(SentryBrowser, 'getCurrentHub'),
withScope: jest.spyOn(SentryBrowser, 'withScope'),
};
});
Expand Down
87 changes: 44 additions & 43 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1130,64 +1130,65 @@
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==

"@sentry/browser@5.0.8":
version "5.0.8"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.0.8.tgz#12350d1e1d0881eb4641f44ffa8ddcefb2b03217"
integrity sha512-hMV3mF8R3YZ0IhkjdYMSNdPfC2XbImCL88Mqxkc53KPGMes/8psPd40aWChRcMw0qJIovgezAdn41oxMH8XimQ==
dependencies:
"@sentry/core" "5.0.8"
"@sentry/types" "5.0.6"
"@sentry/utils" "5.0.8"
"@sentry/browser@5.2.0-beta.0":
version "5.2.0-beta.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.2.0-beta.0.tgz#8c2f54cdf946dd535d51e95c4272cd8df76cfc61"
integrity sha512-GkpXX32CsSrSQAZPYAEpWRb3U2uCAvHNpgfnWEBq0tshneYa4MG3SAGawit4F+CloIeLuFoqnjRGsEmDCZn++g==
dependencies:
"@sentry/core" "5.2.0-beta.0"
"@sentry/types" "5.2.0-beta.0"
"@sentry/utils" "5.2.0-beta.0"
tslib "^1.9.3"

"@sentry/core@5.0.8":
version "5.0.8"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.0.8.tgz#8a05f1c024cda726b4cabeb2e56c5a6e3857e475"
integrity sha512-LGTPMx4PqSOCUiUjHZ45kwealcqAnHgUZonnIv8pcqd1NmY5oOUAhI/rO60Yj9Ij6TVaSHppWpYHI7Wt9Ot6kQ==
"@sentry/core@5.2.0-beta.0":
version "5.2.0-beta.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.2.0-beta.0.tgz#c0c03b6ab1899090aceeadd1b71ab8e7694700dd"
integrity sha512-B8FU9MpAXQCFPv/7wLJc+hvBbhqTab1/0e+o0Estpnv2m45p0k1OZN3ruReuGNlv8md8y5Un7OSjbRq46YE48A==
dependencies:
"@sentry/hub" "5.0.8"
"@sentry/minimal" "5.0.8"
"@sentry/types" "5.0.6"
"@sentry/utils" "5.0.8"
"@sentry/hub" "5.2.0-beta.0"
"@sentry/minimal" "5.2.0-beta.0"
"@sentry/types" "5.2.0-beta.0"
"@sentry/utils" "5.2.0-beta.0"
tslib "^1.9.3"

"@sentry/hub@5.0.8":
version "5.0.8"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.0.8.tgz#9a229c4afee0b59a238b7c804d20369e7d3346b2"
integrity sha512-a9+hnYO42Rpdk7lrxk3dhmZYfOGMDEq2WP2blNiKIU2efI6CQ3G9Ka/6WzVOXSgV3rY+4zx60vHUhNkQVgsbsg==
"@sentry/hub@5.2.0-beta.0":
version "5.2.0-beta.0"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.2.0-beta.0.tgz#20b88a772a1538ce304e5ffa435a18dd513b4ef2"
integrity sha512-KHBP6tMxkmse3gvza0Uw0cs2QvtJErH8rhcbmUVP+J4PKYaSaCdFAyt4zZcO9QTZSXOUUxZNK4zyvu9U9hTsqw==
dependencies:
"@sentry/types" "5.0.6"
"@sentry/utils" "5.0.8"
"@sentry/types" "5.2.0-beta.0"
"@sentry/utils" "5.2.0-beta.0"
tslib "^1.9.3"

"@sentry/integrations@^5.0.8":
version "5.0.8"
resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-5.0.8.tgz#9322520827ad4014b4501e44501a3e6db22d26aa"
integrity sha512-qpk31GZtT9kIGUY1X5rV9dgTsefxjFjxJPdwWUlVpmgNYbcGGJJqnqnTCsBL2oKA3T/VHAbEP2rcE33HGiuEKA==
"@sentry/integrations@5.2.0-beta.0":
version "5.2.0-beta.0"
resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-5.2.0-beta.0.tgz#e3f4909b97ec7c16d80062d86c2cbe92ede3ced3"
integrity sha512-0WdWLeYuBL0Q+Y9oAC1Rz1AYtlPYiiRTKY1gda3pLp8jAO54U14c5Bj0VYipATg4t107BvWvn4/SKx0f1S/1fw==
dependencies:
"@sentry/types" "5.0.6"
"@sentry/utils" "5.0.8"
"@sentry/types" "5.2.0-beta.0"
"@sentry/utils" "5.2.0-beta.0"
tslib "^1.9.3"

"@sentry/minimal@5.0.8":
version "5.0.8"
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.0.8.tgz#21a6521dfbc02d098ae604813e90d945fec6c820"
integrity sha512-MP5bFuqC0xMWT9LTkX0rkX1Xxlj3G4zKdhF8rxwM9YLZUUmS5vvNs/AiPGaEAlw8i9C+0TBTcvQt3va2qVVEHA==
"@sentry/minimal@5.2.0-beta.0":
version "5.2.0-beta.0"
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.2.0-beta.0.tgz#2b3cde2adc9114e9488cb06749162060abdbe11b"
integrity sha512-vsdr4h4X2Pe7VnQ05nB7Nz3b7QkAOA+68bNPwWDWstd4QWjlSyuav8gQrert/rVOmU7C5leps4mT655d82PjYA==
dependencies:
"@sentry/hub" "5.0.8"
"@sentry/types" "5.0.6"
"@sentry/hub" "5.2.0-beta.0"
"@sentry/types" "5.2.0-beta.0"
tslib "^1.9.3"

"@sentry/types@5.0.6":
version "5.0.6"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.0.6.tgz#df1b318977e5308741049cc4f35986cf8255115f"
integrity sha512-EJYzjfnTfTQgqR3p6dSvIVZe0xe2Jz+tSmvuPABf7VoCmrFtEYkMCSf5IshMHeebmXUS5prrPSCAgVcIrJC+Bw==
"@sentry/types@5.2.0-beta.0":
version "5.2.0-beta.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.2.0-beta.0.tgz#c40d157a39850e715b5494094eac6317bcfb43e6"
integrity sha512-JB1nCQbzTGuZDH3jX7CMkd8OgRtAYl1wViTsc/ZMgpDqDjSJZvJzD+FEnW4H9AzPjcdNP7t9+VMwSJRNDDh7xg==

"@sentry/utils@5.0.8":
version "5.0.8"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.0.8.tgz#3dcc95b84fef1a862236c9950c257322817bf0da"
integrity sha512-NZUVl3i2Rm5WKgPEb0DSPYTMQsCxdbZXOiOEq2/9Ee1bY29VTzmjM08KZTYI8+ZiUJwB2l3y/nvNGkqlEoXQCg==
"@sentry/utils@5.2.0-beta.0":
version "5.2.0-beta.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.2.0-beta.0.tgz#1faaf2239e74af0f62509430df3124c0ecfa74a7"
integrity sha512-D87a+s4qG/9kBTikN4Oodh3sEXXV9AVHKQEEpOpNqVzBaLjDcJVhwO7lGIgGj03BqqHTd+inFMxed7wU3tbXsw==
dependencies:
"@sentry/types" "5.0.6"
"@sentry/types" "5.2.0-beta.0"
tslib "^1.9.3"

"@storybook/addon-a11y@^4.1.3":
Expand Down