ServiceLevelIndicators.Asp.ApiVersioning
10.0.0-preview.2
See the version list below for details.
dotnet add package ServiceLevelIndicators.Asp.ApiVersioning --version 10.0.0-preview.2
NuGet\Install-Package ServiceLevelIndicators.Asp.ApiVersioning -Version 10.0.0-preview.2
<PackageReference Include="ServiceLevelIndicators.Asp.ApiVersioning" Version="10.0.0-preview.2" />
<PackageVersion Include="ServiceLevelIndicators.Asp.ApiVersioning" Version="10.0.0-preview.2" />
<PackageReference Include="ServiceLevelIndicators.Asp.ApiVersioning" />
paket add ServiceLevelIndicators.Asp.ApiVersioning --version 10.0.0-preview.2
#r "nuget: ServiceLevelIndicators.Asp.ApiVersioning, 10.0.0-preview.2"
#:package ServiceLevelIndicators.Asp.ApiVersioning@10.0.0-preview.2
#addin nuget:?package=ServiceLevelIndicators.Asp.ApiVersioning&version=10.0.0-preview.2&prerelease
#tool nuget:?package=ServiceLevelIndicators.Asp.ApiVersioning&version=10.0.0-preview.2&prerelease
ServiceLevelIndicators.Asp.ApiVersioning
Adds API version as a metric dimension to ServiceLevelIndicators.Asp SLI metrics. Works with the Asp.Versioning package.
Installation
dotnet add package ServiceLevelIndicators.Asp.ApiVersioning
Requires ServiceLevelIndicators.Asp (installed automatically as a dependency).
Usage
Chain AddApiVersion() onto the SLI builder:
builder.Services.AddServiceLevelIndicator(options =>
{
options.LocationId = ServiceLevelIndicator.CreateLocationId("public", "westus3");
})
.AddMvc()
.AddApiVersion();
This registers ApiVersionEnrichment, which reads the resolved API version from the request and emits it as an attribute on every SLI measurement.
Emitted Attribute
| Attribute | Description |
|---|---|
http.api.version |
The resolved API version string (e.g. 1.0, 2024-01-15), Neutral, or Unspecified |
This attribute is added alongside all the standard attributes emitted by ServiceLevelIndicators.Asp (Operation, CustomerResourceId, LocationId, activity.status.code, http.response.status.code).
Further Reading
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Asp.Versioning.Http (>= 10.0.0-preview.1)
- ServiceLevelIndicators.Asp (>= 10.0.0-preview.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.0-preview.6 | 40 | 3/14/2026 |
| 10.0.0-preview.2 | 69 | 3/5/2026 |
| 8.0.1 | 321 | 2/11/2025 |
| 8.0.0-alpha.25 | 116 | 11/22/2024 |
| 8.0.0-alpha.24 | 109 | 11/20/2024 |
| 8.0.0-alpha.17 | 159 | 5/21/2024 |
| 8.0.0-alpha.12 | 164 | 3/29/2024 |
| 8.0.0-alpha.7 | 142 | 1/24/2024 |
| 8.0.0-alpha.6 | 119 | 1/23/2024 |
| 1.1.2 | 334 | 12/14/2023 |
| 1.1.1 | 278 | 11/10/2023 |
| 1.0.1 | 295 | 10/3/2023 |
| 0.1.0-alpha.20 | 176 | 9/27/2023 |
| 0.1.0-alpha.19 | 125 | 9/27/2023 |
| 0.1.0-alpha.18 | 194 | 9/14/2023 |
| 0.1.0-alpha.10 | 214 | 8/23/2023 |