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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"@emotion/core": "^10.0.27",
"@emotion/styled": "^10.0.27",
"@sentry/apm": "5.18.0",
"@sentry/browser": "5.18.0",
"@sentry/integrations": "5.18.0",
"@sentry/react": "5.18.0",
"@sentry/release-parser": "^0.6.0",
"@sentry/rrweb": "^0.1.1",
"@sentry/utils": "5.18.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as ReactRouter from 'react-router';
import * as Sentry from '@sentry/browser';
import isInteger from 'lodash/isInteger';
import omit from 'lodash/omit';
import pick from 'lodash/pick';
import qs from 'query-string';
import * as Sentry from '@sentry/react';

import {
DATE_TIME,
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/static/sentry/app/actionCreators/group.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

import {Client} from 'app/api';
import {buildUserId, buildTeamId} from 'app/utils';
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/static/sentry/app/actionCreators/members.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

import {Client} from 'app/api';
import {Member} from 'app/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

import {Client} from 'app/api';
import {addErrorMessage} from 'app/actionCreators/indicator';
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/static/sentry/app/actionCreators/release.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

import ReleaseActions from 'app/actions/releaseActions';
import {Client} from 'app/api';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

import RepositoryActions from 'app/actions/repositoryActions';
import {Client} from 'app/api';
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/static/sentry/app/api.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import isUndefined from 'lodash/isUndefined';
import isNil from 'lodash/isNil';
import $ from 'jquery';
import {Severity} from '@sentry/browser';
import {Severity} from '@sentry/react';

import {
PROJECT_MOVED,
Expand Down
6 changes: 3 additions & 3 deletions src/sentry/static/sentry/app/bootstrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import React from 'react';
import ReactDOM from 'react-dom';
import Reflux from 'reflux';
import * as Router from 'react-router';
import * as Sentry from '@sentry/browser';
import {ExtraErrorData} from '@sentry/integrations';
import {Integrations} from '@sentry/apm';
import SentryRRWeb from '@sentry/rrweb';
import createReactClass from 'create-react-class';
import jQuery from 'jquery';
import moment from 'moment';
import {Integrations} from '@sentry/apm';
import {ExtraErrorData} from '@sentry/integrations';
import * as Sentry from '@sentry/react';

import {metric} from 'app/utils/analytics';
import {init as initApiSentryClient} from 'app/utils/apiSentryClient';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import debounce from 'lodash/debounce';
import PropTypes from 'prop-types';
import React from 'react';
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

import NoteInput from 'app/components/activity/note/input';
import localStorage from 'app/utils/localStorage';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import React from 'react';
import Reflux from 'reflux';
import styled from '@emotion/styled';
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

import {
closeGuide,
Expand Down
17 changes: 2 additions & 15 deletions src/sentry/static/sentry/app/components/asyncComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import isEqual from 'lodash/isEqual';
import PropTypes from 'prop-types';
import React from 'react';
import * as Sentry from '@sentry/browser';
import {RouteComponentProps} from 'react-router/lib/Router';
import {WithRouterProps} from 'react-router/lib/withRouter';
import * as Sentry from '@sentry/react';

import {Client} from 'app/api';
import {t} from 'app/locale';
Expand All @@ -15,15 +15,7 @@ import RouteError from 'app/views/routeError';
import {metric} from 'app/utils/analytics';
import getRouteStringFromRoutes from 'app/utils/getRouteStringFromRoutes';

type AsyncComponentProps = {
/**
* Optional sentry APM profiling.
*
* NOTE: we don't decorate `AsyncComponent` but rather the subclass so we can
* get its component name
*/
finishProfile?: () => void;
} & Partial<RouteComponentProps<{}, {}>>;
type AsyncComponentProps = Partial<RouteComponentProps<{}, {}>>;

type AsyncComponentState = {
loading: boolean;
Expand Down Expand Up @@ -167,11 +159,6 @@ export default class AsyncComponent<
},
});
this._measurement.hasMeasured = true;

// sentry apm profiling
if (typeof this.props.finishProfile === 'function') {
this.props.finishProfile();
}
}

// Re-fetch data when router params change.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

import SentryTypes from 'app/sentryTypes';
import UserAvatar from 'app/components/avatar/userAvatar';
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/static/sentry/app/components/dropdownMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

import {MENU_CLOSE_DELAY} from 'app/constants';

Expand Down
2 changes: 1 addition & 1 deletion src/sentry/static/sentry/app/components/errorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {browserHistory} from 'react-router';
import PropTypes from 'prop-types';
import React from 'react';
import styled from '@emotion/styled';
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

import {t} from 'app/locale';
import Alert from 'app/components/alert';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import classNames from 'classnames';
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

import {t} from 'app/locale';
import InlineSvg from 'app/components/inlineSvg';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class SpanTree extends React.Component<PropType> {

// hide gap spans (i.e. "missing instrumentation" spans) for browser js transactions,
// since they're not useful to indicate
const shouldIncludeGap = !isJavaScriptSDK(event.sdk?.name);
const shouldIncludeGap = !isBrowserJavaScriptSDK(event.sdk?.name);

const isValidGap =
typeof previousSiblingEndTimestamp === 'number' &&
Expand Down Expand Up @@ -356,12 +356,14 @@ const TraceViewContainer = styled('div')`
border-bottom-right-radius: 3px;
`;

function isJavaScriptSDK(sdkName?: string): boolean {
function isBrowserJavaScriptSDK(sdkName?: string): boolean {
if (!sdkName) {
return false;
}
// based on https://github.com/getsentry/sentry-javascript/blob/master/packages/browser/src/version.ts
return sdkName.toLowerCase() === 'sentry.javascript.browser';
return ['sentry.javascript.browser', 'sentry.javascript.react'].includes(
sdkName.toLowerCase()
);
}

export default SpanTree;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import isEmpty from 'lodash/isEmpty';
import isString from 'lodash/isString';
import * as Sentry from '@sentry/browser';
import queryString from 'query-string';
import * as Sentry from '@sentry/react';

import {FILTER_MASK} from 'app/constants';
import {defined} from 'app/utils';
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/static/sentry/app/components/lazyLoad.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import styled from '@emotion/styled';
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

import {isWebpackChunkLoadingError} from 'app/utils';
import {t} from 'app/locale';
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/static/sentry/app/components/links/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React from 'react';
import PropTypes from 'prop-types';
import {Link as RouterLink} from 'react-router';
import {Location, LocationDescriptor} from 'history';
import * as Sentry from '@sentry/browser';
import styled from '@emotion/styled';
import isPropValid from '@emotion/is-prop-valid';
import * as Sentry from '@sentry/react';

type AnchorProps = React.HTMLProps<HTMLAnchorElement>;

Expand Down
8 changes: 4 additions & 4 deletions src/sentry/static/sentry/app/components/loadingIndicator.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import classNames from 'classnames';

import withProfiler from 'app/utils/withProfiler';
import {withProfiler} from '@sentry/react';

type Props = {
overlay?: boolean;
Expand All @@ -17,7 +16,6 @@ type Props = {
className?: string;
style?: React.CSSProperties;
children?: React.ReactNode;
finishProfile: () => void;
};

function LoadingIndicator(props: Props) {
Expand Down Expand Up @@ -82,4 +80,6 @@ LoadingIndicator.propTypes = {
hideSpinner: PropTypes.bool,
};

export default withProfiler(LoadingIndicator);
export default withProfiler(LoadingIndicator, {
hasUpdateSpan: false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmm I can't form words atm, but has doesn't read to me that this is an option for withProfiler... maybe something like includeUpdateSpan?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or just updateSpan

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updateSpan makes it sound like the profiler will perform an update of a span -- maybe includeUpdates?

Copy link
Member Author

@AbhiPrasad AbhiPrasad Jun 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So somethin alongs the lines of:

// If time component is on page should be displayed as a span. True by default.
includeRender?: boolean;
// If component updates should be displayed as spans. True by default.
includeUpdates?: boolean;

I like this naming.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now I am going to merge this in, but I will make the API changes and come back and update.

});
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import 'react-date-range/dist/theme/default.css';
import {DateRangePicker} from 'react-date-range';
import PropTypes from 'prop-types';
import React from 'react';
import * as Sentry from '@sentry/browser';
import moment from 'moment';
import styled from '@emotion/styled';
import * as Sentry from '@sentry/react';

import {addErrorMessage} from 'app/actionCreators/indicator';
import {analytics} from 'app/utils/analytics';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import debounce from 'lodash/debounce';
import {withRouter} from 'react-router';
import PropTypes from 'prop-types';
import React from 'react';
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

import {Client} from 'app/api';
import {createFuzzySearch} from 'app/utils/createFuzzySearch';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import {browserHistory} from 'react-router';
import PropTypes from 'prop-types';
import React from 'react';
import Reflux from 'reflux';
import * as Sentry from '@sentry/browser';
import createReactClass from 'create-react-class';
import debounce from 'lodash/debounce';
import styled from '@emotion/styled';
import * as Sentry from '@sentry/react';

import {addErrorMessage} from 'app/actionCreators/indicator';
import {trackAnalyticsEvent} from 'app/utils/analytics';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import u2f from 'u2f-api';
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

import ConfigStore from 'app/stores/configStore';
import {t, tct} from 'app/locale';
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/static/sentry/app/stores/hookStore.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Reflux from 'reflux';
import isUndefined from 'lodash/isUndefined';
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

import {Hooks, HookName} from 'app/types/hooks';

Expand Down
2 changes: 1 addition & 1 deletion src/sentry/static/sentry/app/translations.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

// zh-cn => zh_CN
function convertToDjangoLocaleFormat(language: string) {
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/static/sentry/app/utils/apiSentryClient.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

let hub;

Expand Down
2 changes: 1 addition & 1 deletion src/sentry/static/sentry/app/utils/apm.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Sentry from '@sentry/browser';
import * as Router from 'react-router';
import {createMemoryHistory} from 'history';
import * as Sentry from '@sentry/react';

import getRouteStringFromRoutes from 'app/utils/getRouteStringFromRoutes';

Expand Down
2 changes: 1 addition & 1 deletion src/sentry/static/sentry/app/utils/eventWaiter.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Sentry from '@sentry/browser';
import React from 'react';
import * as Sentry from '@sentry/react';

import {analytics} from 'app/utils/analytics';
import {Client} from 'app/api';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

export default function handleXhrErrorResponse(message: string) {
return (resp: JQueryXHR) => {
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/static/sentry/app/utils/logging.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Sentry from '@sentry/browser';
import * as Sentry from '@sentry/react';

export function logException(ex: Error, context: any): void {
Sentry.withScope(scope => {
Expand Down
54 changes: 0 additions & 54 deletions src/sentry/static/sentry/app/utils/withProfiler.tsx

This file was deleted.

Loading