Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Azure app insights telemetry on development #1426

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 src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const AZURE_VOICES_BASE_PATH_API =

// AdSense constants

const NODE_ENV = process.env.NODE_ENV;
export const NODE_ENV = process.env.NODE_ENV;
const HOSTNAME = window.location.hostname;
export const ADSENSE_ON_PRODUCTION =
HOSTNAME === 'app.cboard.io' && NODE_ENV === 'production';
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ import SpeechProvider from './providers/SpeechProvider';
import ThemeProvider from './providers/ThemeProvider';
import configureStore, { getStore } from './store';
import { ApplicationInsights } from '@microsoft/applicationinsights-web';
import { AZURE_INST_KEY } from './constants';
import { NODE_ENV, AZURE_INST_KEY } from './constants';

if (AZURE_INST_KEY) {
const appInsights = new ApplicationInsights({
config: {
disableTelemetry: NODE_ENV === 'development',
instrumentationKey: AZURE_INST_KEY,
enableAutoRouteTracking: true,
loggingLevelTelemetry: 2,
Expand Down