Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Beta] Add Note Regarding Our Support for Node Versions #1275

Merged
merged 6 commits into from
Feb 7, 2024
38 changes: 24 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -25,7 +28,6 @@ Consider whether this preview is right for you. It *enables distributed tracing,
- Ability to manually set User ID or Authenticated User ID
- Propagating Operation Name to Dependency Telemetry


> *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.


Expand Down Expand Up @@ -83,6 +85,9 @@ const config : AzureMonitorOpenTelemetryOptions = {
// Application Insights Connection String
connectionString: process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"] || "<your connection string>",
},
otlpTraceExporterConfig: {},
otlpMetricExporterConfig: {},
otlpLogExporterConfig: {},
samplingRatio: 1,
enableAutoCollectExceptions: true,
enableAutoCollectStandardMetrics: true,
Expand Down Expand Up @@ -116,16 +121,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.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) | |
| 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`.

Expand Down Expand Up @@ -195,9 +207,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.<METHOD_NAME>()`.
Expand Down
Loading