Skip to content

Commit e0186a6

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

File tree

6 files changed

+11
-36
lines changed

6 files changed

+11
-36
lines changed

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)