Skip to content

Commit ecf69b4

Browse files
[Internal 3.47.0: Refactors some APIs to be PREVIEWonly (#5000)
# Pull Request Template ## Description Changes the following APIs to be preview instead of public for the next release: ![image](https://github.com/user-attachments/assets/55566d56-da23-492e-a97a-9048da66b93a) ## Type of change Please delete options that are not relevant. - [] Bug fix (non-breaking change which fixes an issue) - [] New feature (non-breaking change which adds functionality) - [] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [] This change requires a documentation update ## Closing issues To automatically close an issue: closes #IssueNumber
1 parent dfb6109 commit ecf69b4

7 files changed

Lines changed: 1002 additions & 956 deletions

File tree

Microsoft.Azure.Cosmos/src/CosmosClientTelemetryOptions.cs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,31 @@ public class CosmosClientTelemetryOptions
6060
/// If false, no metrics related to the client will be gathered or reported.
6161
/// <remarks>Metrics data can be published to a monitoring system like Prometheus or Azure Monitor, depending on the configured metrics provider.</remarks>
6262
/// </summary>
63-
public bool IsClientMetricsEnabled { get; set; }
63+
#if PREVIEW
64+
public
65+
#else
66+
internal
67+
#endif
68+
bool IsClientMetricsEnabled { get; set; }
6469

6570
/// <summary>
6671
/// Gets or sets the configuration for operation-level metrics.
6772
/// </summary>
68-
public OperationMetricsOptions OperationMetricsOptions { get; set; }
73+
#if PREVIEW
74+
public
75+
#else
76+
internal
77+
#endif
78+
OperationMetricsOptions OperationMetricsOptions { get; set; }
6979

7080
/// <summary>
7181
/// Gets or sets the configuration for network-level metrics.
7282
/// </summary>
73-
public NetworkMetricsOptions NetworkMetricsOptions { get; set; }
83+
#if PREVIEW
84+
public
85+
#else
86+
internal
87+
#endif
88+
NetworkMetricsOptions NetworkMetricsOptions { get; set; }
7489
}
7590
}

Microsoft.Azure.Cosmos/src/NetworkMetricsOptions.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ namespace Microsoft.Azure.Cosmos
99
/// <summary>
1010
/// Represents the configuration options for collecting metrics related to Cosmos DB network operations.
1111
/// </summary>
12-
public class NetworkMetricsOptions
12+
#if PREVIEW
13+
public
14+
#else
15+
internal
16+
#endif
17+
class NetworkMetricsOptions
1318
{
1419
/// <summary>
1520
/// <para>

Microsoft.Azure.Cosmos/src/OperationMetricsOptions.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ namespace Microsoft.Azure.Cosmos
99
/// <summary>
1010
/// Represents the configuration options for collecting metrics related to Cosmos DB operations.
1111
/// </summary>
12-
public class OperationMetricsOptions
12+
#if PREVIEW
13+
public
14+
#else
15+
internal
16+
#endif
17+
class OperationMetricsOptions
1318
{
1419
/// <summary>
1520
/// <para>

Microsoft.Azure.Cosmos/src/RequestOptions/RequestOptions.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,21 @@ internal static void SetSessionToken(RequestMessage request, string sessionToken
211211
/// <summary>
212212
/// Gets or sets the configuration for operation-level metrics.
213213
/// </summary>
214-
public OperationMetricsOptions OperationMetricsOptions { get; set; } = null;
214+
#if PREVIEW
215+
public
216+
#else
217+
internal
218+
#endif
219+
OperationMetricsOptions OperationMetricsOptions { get; set; } = null;
215220

216221
/// <summary>
217222
/// Gets or sets the configuration for network-level metrics.
218223
/// </summary>
219-
public NetworkMetricsOptions NetworkMetricsOptions { get; set; } = null;
224+
#if PREVIEW
225+
public
226+
#else
227+
internal
228+
#endif
229+
NetworkMetricsOptions NetworkMetricsOptions { get; set; } = null;
220230
}
221231
}

Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbClientMetrics.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ namespace Microsoft.Azure.Cosmos
99
/// These metrics are useful for tracking various aspects of Cosmos DB client operations and compliant with Open Telemetry Semantic Conventions
1010
/// It defines standardized names, units, descriptions, and histogram buckets for measuring and monitoring performance through OpenTelemetry.
1111
/// </summary>
12-
public sealed class CosmosDbClientMetrics
12+
#if PREVIEW
13+
public
14+
#else
15+
internal
16+
#endif
17+
sealed class CosmosDbClientMetrics
1318
{
1419
/// <summary>
1520
/// Operation Metrics

0 commit comments

Comments
 (0)