The 3.0.0-beta.7 package depends on @azure/monitor-opentelemetry with a semver of ^1.0.0-beta.1. However, this causes upgrades to new beta versions which can (and now do) including breaking changes.
1.0.0-beta.2 has removed AzureMonitorOpenTelemetryClient, and replaced with a call to useAzureMonitor - so installing applicationinsights@3.0.0-beta.7 and attempting to new up a TelemetryClient causes a crash:
TypeError: monitor_opentelemetry_1.AzureMonitorOpenTelemetryClient is not a constructor
at new TelemetryClient (....\node_modules\applicationinsights\out\src\shim\telemetryClient.js:44:24)
This can be resolved with a manual resolution in package.json, forcing @azure/monitor-opentelemetry to remain at 1.0.0-beta.1.
I'd suggest that in future releases, exact version matches be used for dependencies that are also pre-release and subject to breaking changes between "compatible according to semver" versions.
This should be resolved now as we temporary removed that dependency, we will make sure to pin specific version for beta dependencies to avoid this in the future
The
3.0.0-beta.7
package depends on@azure/monitor-opentelemetry
with a semver of^1.0.0-beta.1
. However, this causes upgrades to new beta versions which can (and now do) including breaking changes.1.0.0-beta.2
has removedAzureMonitorOpenTelemetryClient
, and replaced with a call touseAzureMonitor
- so installingapplicationinsights@3.0.0-beta.7
and attempting to new up aTelemetryClient
causes a crash:This can be resolved with a manual resolution in package.json, forcing
@azure/monitor-opentelemetry
to remain at1.0.0-beta.1
.I'd suggest that in future releases, exact version matches be used for dependencies that are also pre-release and subject to breaking changes between "compatible according to semver" versions.