Skip to content

Commit a8545d0

Browse files
Update connection string and fix VS build error. (Azure#34707)
1 parent fc7d83e commit a8545d0

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/AzureMonitorTransmitter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private static ConnectionVars InitializeConnectionVars(AzureMonitorExporterOptio
6464
return ConnectionStringParser.GetValues(options.ConnectionString);
6565
}
6666

67-
throw new InvalidOperationException("A connection string was not found. This MUST be provided via either AzureMonitorExporterOptions or set in the environment variable 'APPLICATIONINSIGHTS_CONNECTION_STRING'");
67+
throw new InvalidOperationException("A connection string was not found. Please set your connection string.");
6868
}
6969

7070
private static ApplicationInsightsRestClient InitializeRestClient(AzureMonitorExporterOptions options, ConnectionVars connectionVars, TokenCredential? credential)

sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/ConnectionString/ConnectionStringParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static ConnectionVars GetValues(string? connectionString)
4444
catch (Exception ex)
4545
{
4646
AzureMonitorExporterEventSource.Log.WriteError("ConnectionStringError", ex);
47-
throw new InvalidOperationException("Connection String Error: A valid connection string is required to send telemetry data to Azure Monitor. Please set your connection string.", ex);
47+
throw new InvalidOperationException("Connection String Error: " + ex.Message, ex);
4848
}
4949
}
5050

sdk/monitor/Azure.Monitor.OpenTelemetry/Azure.Monitor.OpenTelemetry.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Monitor.OpenTelemetry
2020
EndProject
2121
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Monitor.OpenTelemetry.Tests", "tests\Azure.Monitor.OpenTelemetry.Tests\Azure.Monitor.OpenTelemetry.Tests.csproj", "{E047E7C5-F248-49DF-BC2C-A690BC5F0F71}"
2222
EndProject
23+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{3E77BE70-A052-44F1-9E79-CB6D266DB1B3}"
24+
EndProject
2325
Global
2426
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2527
Debug|Any CPU = Debug|Any CPU
@@ -42,6 +44,10 @@ Global
4244
{E047E7C5-F248-49DF-BC2C-A690BC5F0F71}.Debug|Any CPU.Build.0 = Debug|Any CPU
4345
{E047E7C5-F248-49DF-BC2C-A690BC5F0F71}.Release|Any CPU.ActiveCfg = Release|Any CPU
4446
{E047E7C5-F248-49DF-BC2C-A690BC5F0F71}.Release|Any CPU.Build.0 = Release|Any CPU
47+
{3E77BE70-A052-44F1-9E79-CB6D266DB1B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
48+
{3E77BE70-A052-44F1-9E79-CB6D266DB1B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
49+
{3E77BE70-A052-44F1-9E79-CB6D266DB1B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
50+
{3E77BE70-A052-44F1-9E79-CB6D266DB1B3}.Release|Any CPU.Build.0 = Release|Any CPU
4551
EndGlobalSection
4652
GlobalSection(SolutionProperties) = preSolution
4753
HideSolutionNode = FALSE

0 commit comments

Comments
 (0)