Commit c33e11dd authored by Dennis Tang's avatar Dennis Tang

Update references to @sentry/browser to point at wrapper

This updates all references to @sentry/browser to a local wrapper which
currently stubs the methods as part of an investigation on Sentry's
impact on performance.
parent 0561a870
<script> <script>
import * as Sentry from '@sentry/browser';
import { import {
GlAlert, GlAlert,
GlBadge, GlBadge,
...@@ -12,6 +11,7 @@ import { ...@@ -12,6 +11,7 @@ import {
GlButton, GlButton,
GlSafeHtmlDirective, GlSafeHtmlDirective,
} from '@gitlab/ui'; } from '@gitlab/ui';
import * as Sentry from '~/sentry/wrapper';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import alertQuery from '../graphql/queries/details.query.graphql'; import alertQuery from '../graphql/queries/details.query.graphql';
import sidebarStatusQuery from '../graphql/queries/sidebar_status.query.graphql'; import sidebarStatusQuery from '../graphql/queries/sidebar_status.query.graphql';
......
<script> <script>
import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import * as Sentry from '@sentry/browser'; import * as Sentry from '~/sentry/wrapper';
Vue.use(Vuex); Vue.use(Vuex);
......
<script> <script>
import * as Sentry from '@sentry/browser'; import * as Sentry from '~/sentry/wrapper';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
import { SUPPORTED_FORMATS, getFormatter } from '~/lib/utils/unit_format'; import { SUPPORTED_FORMATS, getFormatter } from '~/lib/utils/unit_format';
......
import * as Sentry from '@sentry/browser'; import * as Sentry from '~/sentry/wrapper';
import Poll from '~/lib/utils/poll'; import Poll from '~/lib/utils/poll';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { deprecatedCreateFlash as flash } from '~/flash'; import { deprecatedCreateFlash as flash } from '~/flash';
......
import * as Sentry from '@sentry/browser';
import { escape } from 'lodash'; import { escape } from 'lodash';
import * as Sentry from '~/sentry/wrapper';
import { spriteIcon } from './lib/utils/common_utils'; import { spriteIcon } from './lib/utils/common_utils';
const FLASH_TYPES = { const FLASH_TYPES = {
......
import * as Sentry from '@sentry/browser'; import * as Sentry from '~/sentry/wrapper';
import { sanitize } from '~/lib/dompurify'; import { sanitize } from '~/lib/dompurify';
// We currently load + parse the data from the issue app and related merge request // We currently load + parse the data from the issue app and related merge request
......
import * as Sentry from '@sentry/browser'; import * as Sentry from '~/sentry/wrapper';
import * as types from './mutation_types'; import * as types from './mutation_types';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
......
import * as Sentry from '@sentry/browser'; import * as Sentry from '~/sentry/wrapper';
import * as types from './mutation_types'; import * as types from './mutation_types';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
......
import * as Sentry from '@sentry/browser';
import $ from 'jquery'; import $ from 'jquery';
import * as Sentry from '~/sentry/wrapper';
import { __ } from '~/locale'; import { __ } from '~/locale';
const IGNORE_ERRORS = [ const IGNORE_ERRORS = [
......
<script> <script>
import * as Sentry from '@sentry/browser';
import { import {
GlAlert, GlAlert,
GlButton, GlButton,
...@@ -10,6 +9,7 @@ import { ...@@ -10,6 +9,7 @@ import {
GlSprintf, GlSprintf,
GlTooltipDirective, GlTooltipDirective,
} from '@gitlab/ui'; } from '@gitlab/ui';
import * as Sentry from '~/sentry/wrapper';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { redirectTo } from '~/lib/utils/url_utility'; import { redirectTo } from '~/lib/utils/url_utility';
import { import {
......
<script> <script>
import * as Sentry from '@sentry/browser';
import { GlPagination } from '@gitlab/ui'; import { GlPagination } from '@gitlab/ui';
import * as Sentry from '~/sentry/wrapper';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import Api from '~/api'; import Api from '~/api';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
......
<script> <script>
import * as Sentry from '@sentry/browser';
import { GlIcon, GlLink, GlCard, GlFormCheckbox, GlSprintf } from '@gitlab/ui'; import { GlIcon, GlLink, GlCard, GlFormCheckbox, GlSprintf } from '@gitlab/ui';
import * as Sentry from '~/sentry/wrapper';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { __ } from '~/locale'; import { __ } from '~/locale';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
......
<script> <script>
import * as Sentry from '@sentry/browser';
import { GlButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import * as Sentry from '~/sentry/wrapper';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import { redirectTo } from '~/lib/utils/url_utility'; import { redirectTo } from '~/lib/utils/url_utility';
......
<script> <script>
import * as Sentry from '@sentry/browser';
import { GlDropdown, GlDropdownItem, GlTab, GlTabs } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem, GlTab, GlTabs } from '@gitlab/ui';
import { camelCase, kebabCase } from 'lodash'; import { camelCase, kebabCase } from 'lodash';
import * as Sentry from '~/sentry/wrapper';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import { getLocationHash } from '~/lib/utils/url_utility'; import { getLocationHash } from '~/lib/utils/url_utility';
import ProfilesList from './dast_profiles_list.vue'; import ProfilesList from './dast_profiles_list.vue';
......
<script> <script>
import * as Sentry from '@sentry/browser';
import { isEqual } from 'lodash'; import { isEqual } from 'lodash';
import { import {
GlAlert, GlAlert,
...@@ -15,6 +14,7 @@ import { ...@@ -15,6 +14,7 @@ import {
GlFormCheckbox, GlFormCheckbox,
GlFormRadioGroup, GlFormRadioGroup,
} from '@gitlab/ui'; } from '@gitlab/ui';
import * as Sentry from '~/sentry/wrapper';
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
import { redirectTo } from '~/lib/utils/url_utility'; import { redirectTo } from '~/lib/utils/url_utility';
import { serializeFormObject, isEmptyValue } from '~/lib/utils/forms'; import { serializeFormObject, isEmptyValue } from '~/lib/utils/forms';
......
<script> <script>
import * as Sentry from '@sentry/browser';
import { isEqual } from 'lodash'; import { isEqual } from 'lodash';
import { import {
GlAlert, GlAlert,
...@@ -11,6 +10,7 @@ import { ...@@ -11,6 +10,7 @@ import {
GlModal, GlModal,
GlToggle, GlToggle,
} from '@gitlab/ui'; } from '@gitlab/ui';
import * as Sentry from '~/sentry/wrapper';
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
import { isAbsolute, redirectTo } from '~/lib/utils/url_utility'; import { isAbsolute, redirectTo } from '~/lib/utils/url_utility';
import { fetchPolicies } from '~/lib/graphql'; import { fetchPolicies } from '~/lib/graphql';
......
<script> <script>
import * as Sentry from '@sentry/browser';
import { import {
GlAlert, GlAlert,
GlButton, GlButton,
...@@ -12,6 +11,7 @@ import { ...@@ -12,6 +11,7 @@ import {
GlInputGroupText, GlInputGroupText,
GlLoadingIcon, GlLoadingIcon,
} from '@gitlab/ui'; } from '@gitlab/ui';
import * as Sentry from '~/sentry/wrapper';
import download from '~/lib/utils/downloader'; import download from '~/lib/utils/downloader';
import { cleanLeadingSeparator, joinPaths, stripPathTail } from '~/lib/utils/url_utility'; import { cleanLeadingSeparator, joinPaths, stripPathTail } from '~/lib/utils/url_utility';
import { fetchPolicies } from '~/lib/graphql'; import { fetchPolicies } from '~/lib/graphql';
......
import * as Sentry from '@sentry/browser'; import * as Sentry from '~/sentry/wrapper';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import * as types from './mutation_types'; import * as types from './mutation_types';
......
<script> <script>
import { GlAlert, GlButton, GlIcon, GlLink } from '@gitlab/ui'; import { GlAlert, GlButton, GlIcon, GlLink } from '@gitlab/ui';
import * as Sentry from '@sentry/browser';
import { cloneDeep } from 'lodash'; import { cloneDeep } from 'lodash';
import * as Sentry from '~/sentry/wrapper';
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
import { redirectTo } from '~/lib/utils/url_utility'; import { redirectTo } from '~/lib/utils/url_utility';
import AnalyzerConfiguration from './analyzer_configuration.vue'; import AnalyzerConfiguration from './analyzer_configuration.vue';
......
import * as Sentry from '@sentry/browser'; import * as Sentry from '~/sentry/wrapper';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import * as types from './mutation_types'; import * as types from './mutation_types';
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlPagination } from '@gitlab/ui'; import { GlPagination } from '@gitlab/ui';
import * as Sentry from '@sentry/browser';
import RequirementsRoot from 'ee/requirements/components/requirements_root.vue'; import RequirementsRoot from 'ee/requirements/components/requirements_root.vue';
import RequirementsTabs from 'ee/requirements/components/requirements_tabs.vue'; import RequirementsTabs from 'ee/requirements/components/requirements_tabs.vue';
...@@ -13,6 +12,7 @@ import createRequirement from 'ee/requirements/queries/createRequirement.mutatio ...@@ -13,6 +12,7 @@ import createRequirement from 'ee/requirements/queries/createRequirement.mutatio
import updateRequirement from 'ee/requirements/queries/updateRequirement.mutation.graphql'; import updateRequirement from 'ee/requirements/queries/updateRequirement.mutation.graphql';
import { TEST_HOST } from 'helpers/test_constants'; import { TEST_HOST } from 'helpers/test_constants';
import * as Sentry from '~/sentry/wrapper';
import AuthorToken from '~/vue_shared/components/filtered_search_bar/tokens/author_token.vue'; import AuthorToken from '~/vue_shared/components/filtered_search_bar/tokens/author_token.vue';
import FilteredSearchBarRoot from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue'; import FilteredSearchBarRoot from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
......
import * as Sentry from '@sentry/browser';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import AxiosMockAdapter from 'axios-mock-adapter'; import AxiosMockAdapter from 'axios-mock-adapter';
import { GlButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import CreateMergeRequestButton from 'ee/security_configuration/components/create_merge_request_button.vue'; import CreateMergeRequestButton from 'ee/security_configuration/components/create_merge_request_button.vue';
import waitForPromises from 'helpers/wait_for_promises'; import waitForPromises from 'helpers/wait_for_promises';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
import * as Sentry from '~/sentry/wrapper';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { redirectTo } from '~/lib/utils/url_utility'; import { redirectTo } from '~/lib/utils/url_utility';
......
import { merge } from 'lodash'; import { merge } from 'lodash';
import * as Sentry from '@sentry/browser';
import { GlAlert, GlLink } from '@gitlab/ui'; import { GlAlert, GlLink } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import AnalyzerConfiguration from 'ee/security_configuration/sast/components/analyzer_configuration.vue'; import AnalyzerConfiguration from 'ee/security_configuration/sast/components/analyzer_configuration.vue';
...@@ -7,6 +6,7 @@ import ConfigurationForm from 'ee/security_configuration/sast/components/configu ...@@ -7,6 +6,7 @@ import ConfigurationForm from 'ee/security_configuration/sast/components/configu
import DynamicFields from 'ee/security_configuration/sast/components/dynamic_fields.vue'; import DynamicFields from 'ee/security_configuration/sast/components/dynamic_fields.vue';
import ExpandableSection from 'ee/security_configuration/sast/components/expandable_section.vue'; import ExpandableSection from 'ee/security_configuration/sast/components/expandable_section.vue';
import configureSastMutation from 'ee/security_configuration/sast/graphql/configure_sast.mutation.graphql'; import configureSastMutation from 'ee/security_configuration/sast/graphql/configure_sast.mutation.graphql';
import * as Sentry from '~/sentry/wrapper';
import { redirectTo } from '~/lib/utils/url_utility'; import { redirectTo } from '~/lib/utils/url_utility';
import { makeEntities, makeSastCiConfiguration } from './helpers'; import { makeEntities, makeSastCiConfiguration } from './helpers';
......
...@@ -6,7 +6,7 @@ import { ...@@ -6,7 +6,7 @@ import {
GlDeprecatedSkeletonLoading as GlSkeletonLoading, GlDeprecatedSkeletonLoading as GlSkeletonLoading,
GlTable, GlTable,
} from '@gitlab/ui'; } from '@gitlab/ui';
import * as Sentry from '@sentry/browser'; import * as Sentry from '~/sentry/wrapper';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import Clusters from '~/clusters_list/components/clusters.vue'; import Clusters from '~/clusters_list/components/clusters.vue';
import ClusterStore from '~/clusters_list/store'; import ClusterStore from '~/clusters_list/store';
......
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import testAction from 'helpers/vuex_action_helper'; import testAction from 'helpers/vuex_action_helper';
import waitForPromises from 'helpers/wait_for_promises'; import waitForPromises from 'helpers/wait_for_promises';
import * as Sentry from '@sentry/browser'; import * as Sentry from '~/sentry/wrapper';
import Poll from '~/lib/utils/poll'; import Poll from '~/lib/utils/poll';
import { deprecatedCreateFlash as flashError } from '~/flash'; import { deprecatedCreateFlash as flashError } from '~/flash';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
......
import * as Sentry from '@sentry/browser'; import * as Sentry from '~/sentry/wrapper';
import SentryConfig from '~/sentry/sentry_config'; import SentryConfig from '~/sentry/sentry_config';
describe('SentryConfig', () => { describe('SentryConfig', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment