Skip to content

Commit 74b7956

Browse files
remove all tracing related code
1 parent 9fa781b commit 74b7956

File tree

7 files changed

+11
-42
lines changed

7 files changed

+11
-42
lines changed

Aspire.sln

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -661,16 +661,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Azure.Npgsql.EntityF
661661
EndProject
662662
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Components.Common.Tests", "tests\Aspire.Components.Common.Tests\Aspire.Components.Common.Tests.csproj", "{30950CEB-2232-F9FC-04FF-ADDCB8AC30A7}"
663663
EndProject
664-
<<<<<<< HEAD
665-
<<<<<<< HEAD
666664
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Azure.AppConfiguration", "src\Components\Aspire.Azure.AppConfiguration\Aspire.Azure.AppConfiguration.csproj", "{C33CE874-27B7-4194-A2E7-D0CD950997CC}"
667665
EndProject
668666
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Azure.AppConfiguration.Tests", "tests\Aspire.Azure.AppConfiguration.Tests\Aspire.Azure.AppConfiguration.Tests.csproj", "{FE972BF3-F448-4CF0-8544-0056B26BF006}"
669-
=======
670667
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}"
671668
EndProject
672-
=======
673-
>>>>>>> 0e182c9de0132af77787fdcc550e19b63a50e5e1
674669
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Hosting.Azure.ContainerRegistry", "src\Aspire.Hosting.Azure.ContainerRegistry\Aspire.Hosting.Azure.ContainerRegistry.csproj", "{6CBA29C8-FF78-4ABC-BEFA-2A53CB4DB2A3}"
675670
EndProject
676671
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspire.Hosting.Azure.AppService", "src\Aspire.Hosting.Azure.AppService\Aspire.Hosting.Azure.AppService.csproj", "{5DDF8E89-FBBD-4A6F-BF32-7D2140724941}"
@@ -680,7 +675,6 @@ EndProject
680675
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AzureAppService.ApiService", "playground\AzureAppService\AzureAppService.ApiService\AzureAppService.ApiService.csproj", "{A617DC84-65DA-41B5-B378-6C2F569CEE48}"
681676
EndProject
682677
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AzureAppService.AppHost", "playground\AzureAppService\AzureAppService.AppHost\AzureAppService.AppHost.csproj", "{2C879943-DF34-44FA-B2C3-29D97F24DD76}"
683-
>>>>>>> aad850bcfea054da216d79cdf54b049740daab95
684678
EndProject
685679
Global
686680
GlobalSection(SolutionConfigurationPlatforms) = preSolution

src/Components/Aspire.Azure.AppConfiguration/Aspire.Azure.AppConfiguration.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<ItemGroup>
2323
<PackageReference Include="Microsoft.Extensions.Azure" />
2424
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" />
25+
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" />
2526
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" />
2627
<PackageReference Include="OpenTelemetry.Extensions.Hosting" />
2728
<PackageReference Include="Microsoft.Extensions.Configuration.AzureAppConfiguration" />

src/Components/Aspire.Azure.AppConfiguration/AspireAppConfigurationExtensions.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,7 @@ public static void AddAzureAppConfiguration(
6464

6565
builder.Services.AddAzureAppConfiguration(); // register IConfigurationRefresherProvider service
6666

67-
if (!settings.DisableTracing)
68-
{
69-
// WIP: https://github.com/Azure/AppConfiguration-DotnetProvider/pull/645
70-
// Will be supported in the next 8.2.0 release
71-
builder.Services.AddOpenTelemetry()
72-
.WithTracing(traceBuilder =>
73-
traceBuilder.AddSource(["Microsoft.Extensions.Configuration.AzureAppConfiguration"]));
74-
}
67+
// WIP: https://github.com/Azure/AppConfiguration-DotnetProvider/pull/645
68+
// Tracing will be supported in the next 8.2.0 release
7569
}
7670
}

src/Components/Aspire.Azure.AppConfiguration/AzureAppConfigurationSettings.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@ public sealed class AzureAppConfigurationSettings : IConnectionStringSettings
2222
/// </summary>
2323
public TokenCredential? Credential { get; set; }
2424

25-
/// <summary>
26-
/// Gets or sets a boolean value that indicates whether the OpenTelemetry tracing is disabled or not.
27-
/// </summary>
28-
/// <value>
29-
/// The default value is <see langword="false"/>.
30-
/// </value>
31-
public bool DisableTracing { get; set; }
32-
3325
void IConnectionStringSettings.ParseConnectionString(string? connectionString)
3426
{
3527
if (!string.IsNullOrEmpty(connectionString) &&

src/Components/Aspire.Azure.AppConfiguration/ConfigurationSchema.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@
1919
"AppConfiguration": {
2020
"type": "object",
2121
"properties": {
22-
"DisableTracing": {
23-
"type": "boolean",
24-
"description": "Gets or sets a boolean value that indicates whether the OpenTelemetry tracing is disabled or not.",
25-
"default": false
26-
},
2722
"Endpoint": {
2823
"type": "string",
2924
"format": "uri",

tests/Aspire.Azure.AppConfiguration.Tests/ConfigurationTests.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ public class ConfigurationTests
1111
public void EndpointUriIsNullByDefault()
1212
=> Assert.Null(new AzureAppConfigurationSettings().Endpoint);
1313

14-
[Fact]
15-
public void TracingIsEnabledByDefault()
16-
=> Assert.False(new AzureAppConfigurationSettings().DisableTracing);
14+
// WIP: https://github.com/Azure/AppConfiguration-DotnetProvider/pull/645
15+
// Tracing will be supported in the next 8.2.0 release
1716
}

tests/Aspire.Azure.AppConfiguration.Tests/ConformanceTests.cs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,8 @@ public class ConformanceTests : ConformanceTests<IConfigurationRefresherProvider
3232
{
3333
"Aspire": {
3434
"Azure": {
35-
"Data": {
36-
"AppConfiguration": {
37-
"Endpoint": "http://YOUR_URI",
38-
"DisableHealthChecks": true,
39-
"DisableTracing": false
40-
}
35+
"AppConfiguration": {
36+
"Endpoint": "http://YOUR_URI"
4137
}
4238
}
4339
}
@@ -81,8 +77,7 @@ protected override void RegisterComponent(HostApplicationBuilder builder, Action
8177

8278
protected override (string json, string error)[] InvalidJsonToErrorMessage => new[]
8379
{
84-
("""{"Aspire": { "Azure": { "AppConfiguration": { "Endpoint": "YOUR_URI"}}}}""", "Value does not match format \"uri\""),
85-
("""{"Aspire": { "Azure": { "AppConfiguration": { "Endpoint": "http://YOUR_URI", "DisableTracing": "true"}}}}""", "Value is \"string\" but should be \"boolean\""),
80+
("""{"Aspire": { "Azure": { "AppConfiguration": { "Endpoint": "YOUR_URI"}}}}""", "Value does not match format \"uri\"")
8681
};
8782

8883
protected override void SetHealthCheck(AzureAppConfigurationSettings options, bool enabled)
@@ -98,10 +93,9 @@ protected override void SetTracing(AzureAppConfigurationSettings options, bool e
9893
=> throw new NotImplementedException();
9994

10095
protected override void TriggerActivity(IConfigurationRefresherProvider service)
101-
{
102-
Thread.Sleep(1000);
103-
service.Refreshers.First().RefreshAsync().ConfigureAwait(false).GetAwaiter().GetResult();
104-
}
96+
// WIP: https://github.com/Azure/AppConfiguration-DotnetProvider/pull/645
97+
// Will be supported in the next 8.2.0 release
98+
=> throw new NotImplementedException();
10599

106100
[Fact]
107101
public void TracingEnablesTheRightActivitySource()

0 commit comments

Comments
 (0)