Skip to content

Commit 71f6bef

Browse files
authored
[Azure Monitor] Fix issue with connection string provided through env variable (Azure#26461)
### Packages impacted by this PR @azure/monitor-opentelemetry Connection string provided through env variable would be ignored, parsing is triggered in Azure Monitor Exporters, distro should not have any extra validation for it.
1 parent 3bdcd08 commit 71f6bef

File tree

1 file changed

+0
-8
lines changed
  • sdk/monitor/monitor-opentelemetry/src

1 file changed

+0
-8
lines changed

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ export class AzureMonitorOpenTelemetryClient {
3232
*/
3333
constructor(options?: AzureMonitorOpenTelemetryOptions) {
3434
this._config = new AzureMonitorOpenTelemetryConfig(options);
35-
if (
36-
!this._config?.azureMonitorExporterConfig?.connectionString ||
37-
this._config?.azureMonitorExporterConfig?.connectionString === ""
38-
) {
39-
throw new Error(
40-
"Connection String not found, please provide it before starting Azure Monitor OpenTelemetry Client."
41-
);
42-
}
4335
this._setStatsbeatFeatures();
4436
this._metricHandler = new MetricHandler(this._config);
4537
this._traceHandler = new TraceHandler(this._config, this._metricHandler);

0 commit comments

Comments
 (0)