Skip to content
This repository was archived by the owner on Sep 22, 2023. It is now read-only.

Commit 93b1c31

Browse files
authored
Fix bool (#3)
* support initializing without a env key * update readme with how to contribute * set a fallback key * dont contribute * configurable dep tracking * add env options * set configurable env vars * Fix the bool * Flip logic
1 parent 99192fc commit 93b1c31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { EventTelemetry, DependencyTelemetry, ExceptionTelemetry, MetricTelemetr
33
const clientKey = (process.env.APPINSIGHTS_INSTRUMENTATIONKEY || "fake")
44

55
appInsights.setup(clientKey)
6-
.setAutoDependencyCorrelation(<boolean>(process.env.AI_AUTO_DEPENDENCY_CORRELATE ? process.env.AI_AUTO_DEPENDENCY_CORRELATE : true))
6+
.setAutoDependencyCorrelation(<boolean>(process.env.AI_AUTO_DEPENDENCY_CORRELATE === 'false' ? false : true))
77
.setAutoCollectRequests(true)
88
.setAutoCollectPerformance(true, true)
99
.setAutoCollectExceptions(true)
10-
.setAutoCollectDependencies(<boolean>(process.env.AI_AUTOCOLLECT_DEPENDENCIES ? process.env.AI_AUTOCOLLECT_DEPENDENCIES : true))
10+
.setAutoCollectDependencies(<boolean>(process.env.AI_AUTOCOLLECT_DEPENDENCIES === 'false' ? false : true))
1111
.setAutoCollectConsole(true)
1212
.setUseDiskRetryCaching(true)
1313
.setSendLiveMetrics(false)

0 commit comments

Comments
 (0)