From 2e02f94a3e50d2fb1230584abfe9f534c5d280cc Mon Sep 17 00:00:00 2001 From: Jackson Weber Date: Mon, 5 Feb 2024 13:07:45 -0800 Subject: [PATCH 1/4] Update readme to make note of our node version support. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e3927d3a..ce7d98db 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Consider whether this preview is right for you. It *enables distributed tracing, - Ability to override Operation Name - Ability to manually set User ID or Authenticated User ID - Propagating Operation Name to Dependency Telemetry + - Support for versions of Node that are not [supported by OpenTelemetry](https://github.com/open-telemetry/opentelemetry-js#supported-runtimes) > *Warning:* This SDK only works for Node.js environments. Use the [Application Insights JavaScript SDK](https://github.com/microsoft/ApplicationInsights-JS) for web and browser scenarios. From 9038db1a88683974284c0bb3a0266db8356d7375 Mon Sep 17 00:00:00 2001 From: Jackson Weber Date: Mon, 5 Feb 2024 23:35:05 -0800 Subject: [PATCH 2/4] Update README default properties and support tables. --- README.md | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index ce7d98db..0045a867 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,9 @@ const config : AzureMonitorOpenTelemetryOptions = { // Application Insights Connection String connectionString: process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"] || "", }, + otlpTraceExporterConfig: {}, + otlpMetricExporterConfig: {}, + otlpLogExporterConfig: {}, samplingRatio: 1, enableAutoCollectExceptions: true, enableAutoCollectStandardMetrics: true, @@ -117,16 +120,23 @@ useAzureMonitor(config); -|Property|Description|Default| -| ------------------------------- |------------------------------------------------------------------------------------------------------------|-------| -| ... | Azure Monitor OpenTelemetry Configuration [More info here](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/monitor/monitor-opentelemetry#configuration) | | -| otlpTraceExporterConfig | OTLP Trace Exporter Configurationon [More info here](https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-http) | | -| otlpMetricExporterConfig | OTLP Metric Exporter Configuration [More info here](https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-http) | | -| otlpLogExporterConfig | OTLP Log Exporter Configuration [More info here](https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-logs-otlp-http) | | -| enableAutoCollectExceptions | Sets the state of exception tracking. If true uncaught exceptions will be sent to Application Insights | true| -| enableAutoCollectPerformance | Sets the state of Performance Counters. If true Performance Counters will be sent to Application Insights | true| -| 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}| +| Property | Description | Default | +| --------------------------------|------------------------------------------------------------------------------------------------------------|-------| +| ... | Azure Monitor OpenTelemetry Configuration [More info here](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/monitor/monitor-opentelemetry#configuration) | | +| azureMonitorExporterOptions | Azure Monitor OpenTelemetry Exporter Configuration [More info here](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/monitor/monitor-opentelemetry-exporter) | | +| otlpTraceExporterConfig | OTLP Trace Exporter Configurationon [More info here](https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-http) | | +| otlpMetricExporterConfig | OTLP Metric Exporter Configuration [More info here](https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-http) | | +| otlpLogExporterConfig | OTLP Log Exporter Configuration [More info here](https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-logs-otlp-http) | | +| samplingRatio | Sampling ratio must take a value in the range [0,1], 1 meaning all data will sampled and 0 all Tracing data will be sampled out. | 1 | +| enableAutoCollectExceptions | Sets the state of exception tracking. If true uncaught exceptions will be sent to Application Insights | true | +| enableAutoCollectStandardMetrics | Sets the state of standard metrics tracking. If true standard metrics will be collected and sent to Application Insights | true | +| enableAutoCollectPerformance | Sets the state of Performance Counters. If true Performance Counters will be sent to Application Insights | true | +| enableLiveMetrics | Enables communication with Application Insights Live Metrics. If true, enables communication with the live metrics service | false | +| enableWebInstrumentation | Sets the state of automatic web Instrumentation (Optional, disabled by default). If true, web instrumentation will be enabled on valid node server http response with the connection string used for SDK initialization | false | +| webInstrumentationConnectionString | Sets connection string used for web Instrumentation (Browser SDK Loader) (Optional, Default undefined) | | +| instrumentationOptions | instrumentation options | { azureSdk: { enabled: true }, http: { enabled: true }, mongoDb: { enabled: true }, mySql: { enabled: true }, postgreSql: { enabled: true }, redis: { enabled: true }, redis4: { enabled: true }, console: { enabled: true}, bunyan: { enabled: true}, winston: { enabled: true} } | +| resource | Opentelemetry Resource. [More info here](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources) | | +| 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`. @@ -196,9 +206,7 @@ The following configurations are set using either environment variables, setting | enableMaxBytesOnDisk | Not supported by the shim. And not supported to be changed in Azure Monitor OpenTelemetry. The @azure/monitor-opentelemetry-exporter sets this value at 50MB. | | noHttpAgentKeepAlive | Not supported in the shim or Azure Monitor OpenTelemetry. | | httpAgent/httpsAgent | Not supported in the shim or Azure Monitor OpenTelemetry. | -| enableWebInstrumentation | Not currently supported in the shim, but is in Azure Monitor OpenTelemetry as `enableBrowserSdkLoader`. | -| webInstrumentationConnectionString | Not supported in the shim, but is in Azure Monitor OpenTelemetry as `browserSdkLoaderConnectionString`. | -| webInstrumentationConfig | Not currently supported by the shim, but is in Azure Monitor OpenTelemetry as `browserSdkLoaderConfig`. | +| webInstrumentationConfig | Not currently supported by the shim or Azure Monitor OpenTelemetry. | | quickPulseHost | Not supported in the shim or Azure Monitor OpenTelemetry. | The following methods are part of the `TelemetryClient` class. They can be called using `applicationinsights.defaultClient.()`. From 437a3cef19c7f6749adf3dcd541caa435f3115a2 Mon Sep 17 00:00:00 2001 From: Jackson Weber Date: Wed, 7 Feb 2024 13:47:38 -0800 Subject: [PATCH 3/4] Move where we declare support for node verisons. --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f9405ec2..79c68433 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,9 @@ Azure VMs and Web Apps, and even other public clouds. This solution is based on [Azure Application Insights]: https://azure.microsoft.com/documentation/articles/app-insights-overview/ [discover and rapidly diagnose performance and other issues]: https://docs.microsoft.com/azure/application-insights/app-insights-detect-triage-diagnose +## Supported Node.JS versions + +We support the versions of Node.JS that are [supported by OpenTelemetry](https://github.com/open-telemetry/opentelemetry-js#supported-runtimes). ## Limitations of current preview release @@ -24,8 +27,6 @@ Consider whether this preview is right for you. It *enables distributed tracing, - Ability to override Operation Name - Ability to manually set User ID or Authenticated User ID - Propagating Operation Name to Dependency Telemetry - - Support for versions of Node that are not [supported by OpenTelemetry](https://github.com/open-telemetry/opentelemetry-js#supported-runtimes) - > *Warning:* This SDK only works for Node.js environments. Use the [Application Insights JavaScript SDK](https://github.com/microsoft/ApplicationInsights-JS) for web and browser scenarios. From 9d209233fcffad9667c578899af6bced816d18d1 Mon Sep 17 00:00:00 2001 From: Jackson Weber Date: Wed, 7 Feb 2024 13:53:20 -0800 Subject: [PATCH 4/4] Unify on a captialization scheme for Node.js --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 79c68433..fe62608a 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,9 @@ Azure VMs and Web Apps, and even other public clouds. This solution is based on [Azure Application Insights]: https://azure.microsoft.com/documentation/articles/app-insights-overview/ [discover and rapidly diagnose performance and other issues]: https://docs.microsoft.com/azure/application-insights/app-insights-detect-triage-diagnose -## Supported Node.JS versions +## Supported Node.js versions -We support the versions of Node.JS that are [supported by OpenTelemetry](https://github.com/open-telemetry/opentelemetry-js#supported-runtimes). +We support the versions of Node.js that are [supported by OpenTelemetry](https://github.com/open-telemetry/opentelemetry-js#supported-runtimes). ## Limitations of current preview release @@ -133,7 +133,7 @@ useAzureMonitor(config); | enableAutoCollectStandardMetrics | Sets the state of standard metrics tracking. If true standard metrics will be collected and sent to Application Insights | true | | enableAutoCollectPerformance | Sets the state of Performance Counters. If true Performance Counters will be sent to Application Insights | true | | enableLiveMetrics | Enables communication with Application Insights Live Metrics. If true, enables communication with the live metrics service | false | -| enableWebInstrumentation | Sets the state of automatic web Instrumentation (Optional, disabled by default). If true, web instrumentation will be enabled on valid node server http response with the connection string used for SDK initialization | false | +| enableWebInstrumentation | Sets the state of automatic web Instrumentation (Optional, disabled by default). If true, web instrumentation will be enabled on valid node.js server http response with the connection string used for SDK initialization | false | | webInstrumentationConnectionString | Sets connection string used for web Instrumentation (Browser SDK Loader) (Optional, Default undefined) | | | instrumentationOptions | instrumentation options | { azureSdk: { enabled: true }, http: { enabled: true }, mongoDb: { enabled: true }, mySql: { enabled: true }, postgreSql: { enabled: true }, redis: { enabled: true }, redis4: { enabled: true }, console: { enabled: true}, bunyan: { enabled: true}, winston: { enabled: true} } | | resource | Opentelemetry Resource. [More info here](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources) | |