Skip to content

Commit

Permalink
[Beta] Consume latest Azure Monitor OpenTelemetry (#1194)
Browse files Browse the repository at this point in the history
* Files restructure

* WIP

* WIP

* Fix tests

* Update

* Update dependencies

* Build update

* Update package-lock

* Fix circular dependency

* Lint

* Update funcitonal tests

* Update test app

* Update

* Add default config
  • Loading branch information
hectorhdzg authored Aug 29, 2023
1 parent 95f0ec0 commit da65696
Show file tree
Hide file tree
Showing 43 changed files with 2,029 additions and 8,152 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backcompat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm i
- run: npm run backcompattest
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm i
- run: npm run functionaltest
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm run clean
- run: npm ci
- run: npm i
- run: npm run build --if-present
- run: npm run lint
- run: npm test
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm i
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const config : ApplicationInsightsOptions = {
redis4: { enabled: true },
},
resource: resource,
logInstrumentations: {
logInstrumentationOptions: {
console: { enabled: true},
bunyan: { enabled: true},
winston: { enabled: true},
Expand All @@ -122,7 +122,7 @@ const appInsights = new TelemetryClient(config);
| ------------------------------- |------------------------------------------------------------------------------------------------------------|-------|
| ... | Azure Monitor OpenTelemetry Configuration [More info here](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/monitor/monitor-opentelemetry#configuration) | |
| enableAutoCollectExceptions | Sets the state of exception tracking. If true uncaught exceptions will be sent to Application Insights | true|
| logInstrumentations| Allow configuration of Log Instrumentations. | {"console": { enabled: false },"bunyan": { enabled: false },"winston": { enabled: false }}|
| logInstrumentationOptions| Allow configuration of Log Instrumentations. | {"console": { enabled: false },"bunyan": { enabled: false },"winston": { enabled: false }}|
| extendedMetrics | Enable/Disable specific extended Metrics(gc, heap and loop). |{"gc":false,"heap":false,"loop":false}|

Configuration could be set using configuration file `applicationinsights.json` located under root folder of applicationinsights package installation folder, Ex: `node_modules/applicationinsights`. These configuration values will be applied to all ApplicationInsightsClients created in the SDK.
Expand All @@ -138,7 +138,7 @@ Configuration could be set using configuration file `applicationinsights.json`
"enabled": false
}
},
"logInstrumentations":{
"logInstrumentationOptions":{
"console": {
"enabled": true
}
Expand Down
2 changes: 1 addition & 1 deletion applicationinsights.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export {
HttpRequest,
TelemetryClient,
dispose,
} from "./src/shim/shim-applicationinsights";
} from "./src/shim/applicationinsights";
Loading

0 comments on commit da65696

Please sign in to comment.