Skip to content

Commit e6c3261

Browse files
authored
API changes for components (dotnet#3736)
1 parent a16a383 commit e6c3261

File tree

170 files changed

+898
-866
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+898
-866
lines changed

src/Components/Aspire.Azure.AI.OpenAI/AspireAzureOpenAIExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,6 @@ protected override bool GetHealthCheckEnabled(AzureOpenAISettings settings)
122122
=> settings.Credential;
123123

124124
protected override bool GetTracingEnabled(AzureOpenAISettings settings)
125-
=> settings.Tracing;
125+
=> !settings.DisableTracing;
126126
}
127127
}

src/Components/Aspire.Azure.AI.OpenAI/AzureOpenAISettings.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ public sealed class AzureOpenAISettings : IConnectionStringSettings
4040
public string? Key { get; set; }
4141

4242
/// <summary>
43-
/// Gets or sets a boolean value that indicates whether the OpenTelemetry tracing is enabled or not.
43+
/// Gets or sets a boolean value that indicates whether the OpenTelemetry tracing is disabled or not.
4444
/// </summary>
4545
/// <value>
46-
/// The default value is <see langword="true"/>.
46+
/// The default value is <see langword="false"/>.
4747
/// </value>
48-
public bool Tracing { get; set; } = true;
48+
public bool DisableTracing { get; set; }
4949

5050
void IConnectionStringSettings.ParseConnectionString(string? connectionString)
5151
{

src/Components/Aspire.Azure.AI.OpenAI/ConfigurationSchema.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@
9999
},
100100
"description": "Client options for OpenAIClient."
101101
},
102+
"DisableTracing": {
103+
"type": "boolean",
104+
"description": "Gets or sets a boolean value that indicates whether the OpenTelemetry tracing is disabled or not.",
105+
"default": false
106+
},
102107
"Endpoint": {
103108
"type": "string",
104109
"format": "uri",
@@ -107,11 +112,6 @@
107112
"Key": {
108113
"type": "string",
109114
"description": "Gets or sets the key to use to authenticate to the Azure OpenAI endpoint."
110-
},
111-
"Tracing": {
112-
"type": "boolean",
113-
"description": "Gets or sets a boolean value that indicates whether the OpenTelemetry tracing is enabled or not.",
114-
"default": true
115115
}
116116
},
117117
"description": "The settings relevant to accessing Azure OpenAI or OpenAI."

src/Components/Aspire.Azure.AI.OpenAI/PublicAPI.Unshipped.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Aspire.Azure.AI.OpenAI.AzureOpenAISettings.Endpoint.get -> System.Uri?
77
Aspire.Azure.AI.OpenAI.AzureOpenAISettings.Endpoint.set -> void
88
Aspire.Azure.AI.OpenAI.AzureOpenAISettings.Key.get -> string?
99
Aspire.Azure.AI.OpenAI.AzureOpenAISettings.Key.set -> void
10-
Aspire.Azure.AI.OpenAI.AzureOpenAISettings.Tracing.get -> bool
11-
Aspire.Azure.AI.OpenAI.AzureOpenAISettings.Tracing.set -> void
10+
Aspire.Azure.AI.OpenAI.AzureOpenAISettings.DisableTracing.get -> bool
11+
Aspire.Azure.AI.OpenAI.AzureOpenAISettings.DisableTracing.set -> void
1212
Microsoft.Extensions.Hosting.AspireAzureOpenAIExtensions
1313
static Microsoft.Extensions.Hosting.AspireAzureOpenAIExtensions.AddAzureOpenAIClient(this Microsoft.Extensions.Hosting.IHostApplicationBuilder! builder, string! connectionName, System.Action<Aspire.Azure.AI.OpenAI.AzureOpenAISettings!>? configureSettings = null, System.Action<Azure.Core.Extensions.IAzureClientBuilder<Azure.AI.OpenAI.OpenAIClient!, Azure.AI.OpenAI.OpenAIClientOptions!>!>? configureClientBuilder = null) -> void
1414
static Microsoft.Extensions.Hosting.AspireAzureOpenAIExtensions.AddKeyedAzureOpenAIClient(this Microsoft.Extensions.Hosting.IHostApplicationBuilder! builder, string! name, System.Action<Aspire.Azure.AI.OpenAI.AzureOpenAISettings!>? configureSettings = null, System.Action<Azure.Core.Extensions.IAzureClientBuilder<Azure.AI.OpenAI.OpenAIClient!, Azure.AI.OpenAI.OpenAIClientOptions!>!>? configureClientBuilder = null) -> void

src/Components/Aspire.Azure.AI.OpenAI/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ The .NET Aspire Azure AI OpenAI library supports [Microsoft.Extensions.Configura
8888
"Azure": {
8989
"AI": {
9090
"OpenAI": {
91-
"Tracing": true,
91+
"DisableTracing": false,
9292
}
9393
}
9494
}
@@ -101,7 +101,7 @@ The .NET Aspire Azure AI OpenAI library supports [Microsoft.Extensions.Configura
101101
You can also pass the `Action<AzureOpenAISettings> configureSettings` delegate to set up some or all the options inline, for example to disable tracing from code:
102102

103103
```csharp
104-
builder.AddAzureAIOpenAIClient("openaiConnectionName", settings => settings.Tracing = false);
104+
builder.AddAzureAIOpenAIClient("openaiConnectionName", settings => settings.DisableTracing = true);
105105
```
106106

107107
You can also setup the [OpenAIClientOptions](https://learn.microsoft.com/dotnet/api/azure.ai.openai.openaiclientoptions) using the optional `Action<IAzureClientBuilder<OpenAIClient, OpenAIClientOptions>> configureClientBuilder` parameter of the `AddAzureAIOpenAIClient` method. For example, to set the client ID for this client:

src/Components/Aspire.Azure.Data.Tables/AspireTablesExtensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ protected override IHealthCheck CreateHealthCheck(TableServiceClient client, Azu
9999
=> new AzureTableServiceHealthCheck(client, new AzureTableServiceHealthCheckOptions());
100100

101101
protected override bool GetHealthCheckEnabled(AzureDataTablesSettings settings)
102-
=> settings.HealthChecks;
102+
=> !settings.DisableHealthChecks;
103103

104104
protected override TokenCredential? GetTokenCredential(AzureDataTablesSettings settings)
105105
=> settings.Credential;
106106

107107
protected override bool GetTracingEnabled(AzureDataTablesSettings settings)
108-
=> settings.Tracing;
108+
=> !settings.DisableTracing;
109109
}
110110
}

src/Components/Aspire.Azure.Data.Tables/AzureDataTablesSettings.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,20 @@ public sealed class AzureDataTablesSettings : IConnectionStringSettings
3434
public TokenCredential? Credential { get; set; }
3535

3636
/// <summary>
37-
/// Gets or sets a boolean value that indicates whether the health check is enabled or not.
37+
/// Gets or sets a boolean value that indicates whether the health check is disabled or not.
3838
/// </summary>
3939
/// <value>
40-
/// The default value is <see langword="true"/>.
40+
/// The default value is <see langword="false"/>.
4141
/// </value>
42-
public bool HealthChecks { get; set; } = true;
42+
public bool DisableHealthChecks { get; set; }
4343

4444
/// <summary>
45-
/// Gets or sets a boolean value that indicates whether the OpenTelemetry tracing is enabled or not.
45+
/// Gets or sets a boolean value that indicates whether the OpenTelemetry tracing is disabled or not.
4646
/// </summary>
4747
/// <value>
48-
/// The default value is <see langword="true"/>.
48+
/// The default value is <see langword="false"/>.
4949
/// </value>
50-
public bool Tracing { get; set; } = true;
50+
public bool DisableTracing { get; set; }
5151

5252
void IConnectionStringSettings.ParseConnectionString(string? connectionString)
5353
{

src/Components/Aspire.Azure.Data.Tables/ConfigurationSchema.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,20 @@
107107
"type": "string",
108108
"description": "Gets or sets the connection string used to connect to the table service account."
109109
},
110-
"HealthChecks": {
110+
"DisableHealthChecks": {
111111
"type": "boolean",
112-
"description": "Gets or sets a boolean value that indicates whether the health check is enabled or not.",
113-
"default": true
112+
"description": "Gets or sets a boolean value that indicates whether the health check is disabled or not.",
113+
"default": false
114+
},
115+
"DisableTracing": {
116+
"type": "boolean",
117+
"description": "Gets or sets a boolean value that indicates whether the OpenTelemetry tracing is disabled or not.",
118+
"default": false
114119
},
115120
"ServiceUri": {
116121
"type": "string",
117122
"format": "uri",
118123
"description": "A 'System.Uri' referencing the table service account.\nThis is likely to be similar to \"https://{account_name}.table.core.windows.net/\" or \"https://{account_name}.table.cosmos.azure.com/\"."
119-
},
120-
"Tracing": {
121-
"type": "boolean",
122-
"description": "Gets or sets a boolean value that indicates whether the OpenTelemetry tracing is enabled or not.",
123-
"default": true
124124
}
125125
},
126126
"description": "Provides the client configuration settings for connecting to Azure Tables."

src/Components/Aspire.Azure.Data.Tables/PublicAPI.Unshipped.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ Aspire.Azure.Data.Tables.AzureDataTablesSettings.ConnectionString.get -> string?
55
Aspire.Azure.Data.Tables.AzureDataTablesSettings.ConnectionString.set -> void
66
Aspire.Azure.Data.Tables.AzureDataTablesSettings.Credential.get -> Azure.Core.TokenCredential?
77
Aspire.Azure.Data.Tables.AzureDataTablesSettings.Credential.set -> void
8-
Aspire.Azure.Data.Tables.AzureDataTablesSettings.HealthChecks.get -> bool
9-
Aspire.Azure.Data.Tables.AzureDataTablesSettings.HealthChecks.set -> void
8+
Aspire.Azure.Data.Tables.AzureDataTablesSettings.DisableHealthChecks.get -> bool
9+
Aspire.Azure.Data.Tables.AzureDataTablesSettings.DisableHealthChecks.set -> void
1010
Aspire.Azure.Data.Tables.AzureDataTablesSettings.ServiceUri.get -> System.Uri?
1111
Aspire.Azure.Data.Tables.AzureDataTablesSettings.ServiceUri.set -> void
12-
Aspire.Azure.Data.Tables.AzureDataTablesSettings.Tracing.get -> bool
13-
Aspire.Azure.Data.Tables.AzureDataTablesSettings.Tracing.set -> void
12+
Aspire.Azure.Data.Tables.AzureDataTablesSettings.DisableTracing.get -> bool
13+
Aspire.Azure.Data.Tables.AzureDataTablesSettings.DisableTracing.set -> void
1414
Microsoft.Extensions.Hosting.AspireTablesExtensions
1515
static Microsoft.Extensions.Hosting.AspireTablesExtensions.AddAzureTableClient(this Microsoft.Extensions.Hosting.IHostApplicationBuilder! builder, string! connectionName, System.Action<Aspire.Azure.Data.Tables.AzureDataTablesSettings!>? configureSettings = null, System.Action<Azure.Core.Extensions.IAzureClientBuilder<Azure.Data.Tables.TableServiceClient!, Azure.Data.Tables.TableClientOptions!>!>? configureClientBuilder = null) -> void
1616
static Microsoft.Extensions.Hosting.AspireTablesExtensions.AddKeyedAzureTableClient(this Microsoft.Extensions.Hosting.IHostApplicationBuilder! builder, string! name, System.Action<Aspire.Azure.Data.Tables.AzureDataTablesSettings!>? configureSettings = null, System.Action<Azure.Core.Extensions.IAzureClientBuilder<Azure.Data.Tables.TableServiceClient!, Azure.Data.Tables.TableClientOptions!>!>? configureClientBuilder = null) -> void

src/Components/Aspire.Azure.Data.Tables/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ The Azure Table storage library supports [Microsoft.Extensions.Configuration](ht
8686
"Azure": {
8787
"Data": {
8888
"Tables": {
89-
"HealthChecks": false,
90-
"Tracing": true,
89+
"DisableHealthChecks": true,
90+
"DisableTracing": false,
9191
"ClientOptions": {
9292
"Diagnostics": {
9393
"ApplicationId": "myapp"
@@ -105,7 +105,7 @@ The Azure Table storage library supports [Microsoft.Extensions.Configuration](ht
105105
You can also pass the `Action<AzureDataTablesSettings> configureSettings` delegate to set up some or all the options inline, for example to disable health checks from code:
106106

107107
```csharp
108-
builder.AddAzureTableClient("tables", settings => settings.HealthChecks = false);
108+
builder.AddAzureTableClient("tables", settings => settings.DisableHealthChecks = true);
109109
```
110110

111111
You can also setup the [TableClientOptions](https://learn.microsoft.com/dotnet/api/azure.data.tables.tableclientoptions) using the optional `Action<IAzureClientBuilder<TableServiceClient, TableClientOptions>> configureClientBuilder` parameter of the `AddAzureTableClient` method. For example, to set the first part of "User-Agent" headers for all requests issues by this client:

0 commit comments

Comments
 (0)