-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added `telemetry.ts`, which reproduces the issue: > Object literal may only specify known properties, and 'ignoreHeaders' does not exist in type 'IConfiguration & IConfig'.ts(2353) Run build or just see the eslint highlight from the file. Also installed latest `@microsoft/applicationinsights-web` and `@microsoft/applicationinsights-react-js`.
- Loading branch information
Showing
3 changed files
with
257 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { | ||
ApplicationInsights, | ||
ITelemetryItem, | ||
} from "@microsoft/applicationinsights-web"; | ||
import { ReactPlugin } from "@microsoft/applicationinsights-react-js"; | ||
import { createBrowserHistory } from "history"; | ||
|
||
const history = createBrowserHistory(); | ||
|
||
const reactPlugin = new ReactPlugin(); | ||
|
||
const appInsights = new ApplicationInsights({ | ||
config: { | ||
connectionString: process.env.VITE_APP_AI_INSTRUMENTATION_CONNECTION_STRING, | ||
disableFetchTracking: false, | ||
//enableRequestHeaderTracking: true, // Enable to get request headers in dependency logs | ||
enableResponseHeaderTracking: true, // Enable to get response headers in dependency logs | ||
ignoreHeaders: [ | ||
"Authorization", | ||
"X-API-Key", | ||
"WWW-Authenticate", | ||
"date", | ||
"x-ms-blob-type", | ||
"x-ms-lease-status", | ||
"x-ms-request-id", | ||
"x-ms-version", | ||
"content-type", | ||
"X-Powered-By", | ||
"X-Firefox-Spdy", | ||
"Set-Cookie", | ||
"Request-Context", | ||
"Content-Encoding", | ||
"Access-Control-Allow-Origin", | ||
"Content-Encoding", | ||
"Vary", | ||
], // Ignore these headers in dependency logs | ||
disableAjaxTracking: false, | ||
enableCorsCorrelation: true, | ||
extensions: [reactPlugin /* debugPluginInstance */], | ||
extensionConfig: { | ||
[reactPlugin.identifier]: { | ||
history, | ||
}, | ||
/* | ||
[DebugPlugin.identifier]: { | ||
trackers: toTrack | ||
} | ||
*/ | ||
}, | ||
}, | ||
}); | ||
|
||
appInsights.loadAppInsights(); | ||
export { reactPlugin, appInsights }; |