Skip to content

Commit 75322a1

Browse files
authored
[Monitor OpenTelemetry] Add Winston to Statsbeat Tracking (Azure#29667)
### Packages impacted by this PR @azure/montior-opentelemetry ### Checklists - [x] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [x] Added a changelog (if necessary)
1 parent b8d84c6 commit 75322a1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

sdk/monitor/monitor-opentelemetry/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export function useAzureMonitor(options?: AzureMonitorOpenTelemetryOptions) {
4444
postgreSql: config.instrumentationOptions?.postgreSql?.enabled,
4545
redis: config.instrumentationOptions?.redis?.enabled,
4646
bunyan: config.instrumentationOptions?.bunyan?.enabled,
47+
winston: config.instrumentationOptions?.winston?.enabled,
4748
// Features
4849
browserSdkLoader: config.browserSdkLoaderOptions.enabled,
4950
aadHandling: !!config.azureMonitorExporterOptions?.credential,

sdk/monitor/monitor-opentelemetry/src/utils/statsbeat.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ class StatsbeatConfiguration {
3838
if (statsbeatOptions.bunyan === true) {
3939
instrumentationBitMap |= StatsbeatInstrumentation.BUNYAN;
4040
}
41+
if (statsbeatOptions.winston === true) {
42+
instrumentationBitMap |= StatsbeatInstrumentation.WINSTON;
43+
}
4144

4245
let featureBitMap = StatsbeatFeature.NONE;
4346
featureBitMap |= StatsbeatFeature.DISTRO;

0 commit comments

Comments
 (0)