Qyl.OpenTelemetry.SemanticConventions.SourceGeneration
3.0.0
See the version list below for details.
dotnet add package Qyl.OpenTelemetry.SemanticConventions.SourceGeneration --version 3.0.0
NuGet\Install-Package Qyl.OpenTelemetry.SemanticConventions.SourceGeneration -Version 3.0.0
<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.SourceGeneration" Version="3.0.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Qyl.OpenTelemetry.SemanticConventions.SourceGeneration" Version="3.0.0" />
<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.SourceGeneration"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Qyl.OpenTelemetry.SemanticConventions.SourceGeneration --version 3.0.0
#r "nuget: Qyl.OpenTelemetry.SemanticConventions.SourceGeneration, 3.0.0"
#:package Qyl.OpenTelemetry.SemanticConventions.SourceGeneration@3.0.0
#addin nuget:?package=Qyl.OpenTelemetry.SemanticConventions.SourceGeneration&version=3.0.0
#tool nuget:?package=Qyl.OpenTelemetry.SemanticConventions.SourceGeneration&version=3.0.0
Qyl.OpenTelemetry.SemanticConventions.SourceGeneration
Roslyn source generator for OpenTelemetry semantic-convention constants,
descriptors, and thin helper APIs. It does not collect telemetry. Consumers own
their Meter, ActivitySource, Logger, instrumentation scope, versioning,
and enablement.
Use
using Qyl.OpenTelemetry.SemanticConventions.SourceGeneration;
[SemanticConventionAttributes("http")]
internal static partial class HttpAttributes;
[SemanticConventionIncubatingAttributes("http")]
internal static partial class HttpIncubatingAttributes;
[SemanticConventionMetrics("http.server")]
internal static partial class HttpServerMetrics;
[SemanticConventionIncubatingEvents("session")]
internal static partial class SessionEvents;
[SemanticConventionMeters("http.server")]
internal static partial class HttpServerMeters;
[SemanticConventionActivities("http")]
internal static partial class HttpActivityExtensions;
// Generated:
// public const string AttributeHttpRequestMethod = "http.request.method";
// public static partial class HttpServerRequestDurationDescriptor { ... }
// public readonly record struct SessionStartPayload { ... }
// public static Histogram<double> CreateHttpServerRequestDurationHistogram(this Meter meter)
// public static Activity SetHttpRoute(this Activity activity, string value)
The marker attribute is itself generated (via RegisterPostInitializationOutput);
no runtime dependency is added by consuming this package.
Stable markers emit stable rows plus deprecated migration symbols. Incubating markers are supersets: stable + development/alpha/beta/release-candidate + deprecated. This mirrors Java/Python's incubating package behavior and avoids breaking consumers when conventions are promoted.
Choose one projection per prefix in normal consumer code. Incubating is a superset, so declaring both stable and incubating meter/activity helpers for the same prefix in the same namespace can make shared extension methods ambiguous. If a test fixture intentionally declares both, call the generated static helper class explicitly.
Event rows in semconv v1.41.0 do not carry an ActivityEvent-vs-Logger/Event discriminator. The generator emits event names and payload structs; the caller chooses the emission API at use-site. If upstream adds a discriminator later, the event emitter has a single routing point for that field.
Versioning
Tracks open-telemetry/semantic-conventions v1.41.0 (commit
e018fe6f91862f5ed63c082f87697cddac596784), embedded via Weaver v0.23.0.
The embedded registry is regenerated by scripts/generate.sh. The projection
preserves the resolved group surface across attribute groups, spans, entities,
metrics, and events, then exposes metric/event convenience arrays for the
signal-specific emitters.
The generated member shape is snapshot-tested per stability tier. Full-surface
consumer smoke builds cover net472, netstandard2.0, net6.0, net8.0,
net9.0, and net10.0.
Licensed under MIT (qyl); generated content is derived from OpenTelemetry semantic conventions, Apache-2.0.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Microsoft.CodeAnalysis.Analyzers (>= 5.3.0)
- Microsoft.CodeAnalysis.CSharp (>= 5.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.