diff --git a/Directory.Packages.props b/Directory.Packages.props index 647e09884..f088054dc 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -48,7 +48,7 @@ - + @@ -62,7 +62,7 @@ - + @@ -90,17 +90,17 @@ - - - + + + - - - - - - - + + + + + + + @@ -118,7 +118,7 @@ - + \ No newline at end of file diff --git a/eng/templates/build-steps.yml b/eng/templates/build-steps.yml index cb6300182..cdfaea8fe 100644 --- a/eng/templates/build-steps.yml +++ b/eng/templates/build-steps.yml @@ -11,19 +11,6 @@ steps: # Start by restoring all the dependencies. This needs to be its own task # from what I can tell. We specifically only target DurableTask.AzureStorage # and its direct dependencies. -# Configure all the .NET SDK versions we need -- task: UseDotNet@2 - displayName: 'Use the .NET Core 2.1 SDK (required for build signing)' - inputs: - packageType: 'sdk' - version: '2.1.x' - -- task: UseDotNet@2 - displayName: 'Use the .NET Core 3.1 SDK' - inputs: - packageType: 'sdk' - version: '3.1.x' - - task: UseDotNet@2 displayName: 'Use the .NET 8 SDK' inputs: diff --git a/samples/Correlation.Samples/Correlation.Samples.csproj b/samples/Correlation.Samples/Correlation.Samples.csproj index 81757ac8b..03d080a03 100644 --- a/samples/Correlation.Samples/Correlation.Samples.csproj +++ b/samples/Correlation.Samples/Correlation.Samples.csproj @@ -21,6 +21,8 @@ + + Always diff --git a/samples/Correlation.Samples/TelemetryActivator.cs b/samples/Correlation.Samples/TelemetryActivator.cs index 176c915d6..a51905da0 100644 --- a/samples/Correlation.Samples/TelemetryActivator.cs +++ b/samples/Correlation.Samples/TelemetryActivator.cs @@ -69,7 +69,21 @@ void SetUpTelemetryClient() telemetryInitializer.ExcludeComponentCorrelationHttpHeadersOnDomains.Add("127.0.0.1"); config.TelemetryInitializers.Add(telemetryInitializer); - config.InstrumentationKey = Environment.GetEnvironmentVariable("APPINSIGHTS_INSTRUMENTATIONKEY"); + string connectionString = Environment.GetEnvironmentVariable("APPLICATIONINSIGHTS_CONNECTION_STRING"); + if (!string.IsNullOrEmpty(connectionString)) + { + config.ConnectionString = connectionString; + } + else + { + string instrumentationKey = Environment.GetEnvironmentVariable("APPINSIGHTS_INSTRUMENTATIONKEY"); + if (!string.IsNullOrEmpty(instrumentationKey)) + { +#pragma warning disable CS0618 // InstrumentationKey is obsolete; kept for backward compatibility. + config.InstrumentationKey = instrumentationKey; +#pragma warning restore CS0618 + } + } module.Initialize(config); diff --git a/samples/DistributedTraceSample/ApplicationInsights/ApplicationInsightsSample.csproj b/samples/DistributedTraceSample/ApplicationInsights/ApplicationInsightsSample.csproj index 160690471..ea56695ae 100644 --- a/samples/DistributedTraceSample/ApplicationInsights/ApplicationInsightsSample.csproj +++ b/samples/DistributedTraceSample/ApplicationInsights/ApplicationInsightsSample.csproj @@ -9,10 +9,11 @@ - + + diff --git a/samples/DistributedTraceSample/OpenTelemetry/OpenTelemetrySample.csproj b/samples/DistributedTraceSample/OpenTelemetry/OpenTelemetrySample.csproj index 5a7d3e2f2..5097ce075 100644 --- a/samples/DistributedTraceSample/OpenTelemetry/OpenTelemetrySample.csproj +++ b/samples/DistributedTraceSample/OpenTelemetry/OpenTelemetrySample.csproj @@ -9,7 +9,7 @@ - + diff --git a/samples/DistributedTraceSample/OpenTelemetry/Program.cs b/samples/DistributedTraceSample/OpenTelemetry/Program.cs index 2235fb180..d081192dd 100644 --- a/samples/DistributedTraceSample/OpenTelemetry/Program.cs +++ b/samples/DistributedTraceSample/OpenTelemetry/Program.cs @@ -31,7 +31,7 @@ static async Task Main(string[] args) .SetResourceBuilder(ResourceBuilder.CreateDefault().AddService("MySample")) .AddSource("DurableTask.Core") .AddConsoleExporter() - .AddZipkinExporter() + .AddOtlpExporter() .AddAzureMonitorTraceExporter(options => { options.ConnectionString = Environment.GetEnvironmentVariable("AZURE_MONITOR_CONNECTION_STRING"); diff --git a/samples/ManagedIdentitySample/DTFx.AzureStorage v1.x/ManagedIdentity.AzStorageV1.csproj b/samples/ManagedIdentitySample/DTFx.AzureStorage v1.x/ManagedIdentity.AzStorageV1.csproj index cdb974eb9..9a8d130c2 100644 --- a/samples/ManagedIdentitySample/DTFx.AzureStorage v1.x/ManagedIdentity.AzStorageV1.csproj +++ b/samples/ManagedIdentitySample/DTFx.AzureStorage v1.x/ManagedIdentity.AzStorageV1.csproj @@ -14,6 +14,9 @@ + + +