Qyl.OpenTelemetry.SemanticConventions.Analyzers 3.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Qyl.OpenTelemetry.SemanticConventions.Analyzers --version 3.0.2
                    
NuGet\Install-Package Qyl.OpenTelemetry.SemanticConventions.Analyzers -Version 3.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers" Version="3.0.2">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers" Version="3.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Qyl.OpenTelemetry.SemanticConventions.Analyzers">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Qyl.OpenTelemetry.SemanticConventions.Analyzers --version 3.0.2
                    
#r "nuget: Qyl.OpenTelemetry.SemanticConventions.Analyzers, 3.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Qyl.OpenTelemetry.SemanticConventions.Analyzers@3.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Qyl.OpenTelemetry.SemanticConventions.Analyzers&version=3.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Qyl.OpenTelemetry.SemanticConventions.Analyzers&version=3.0.2
                    
Install as a Cake Tool

Qyl.OpenTelemetry.SemanticConventions

NuGet Qyl.OpenTelemetry.SemanticConventions NuGet Qyl.OpenTelemetry.SemanticConventions.Incubating NuGet Qyl.OpenTelemetry.SemanticConventions.SourceGeneration NuGet Qyl.OpenTelemetry.SemanticConventions.Analyzers NuGet Qyl.OpenTelemetry.SemanticConventions.Nuke CI .NET License: Apache 2.0

Five .NET packages covering the OpenTelemetry semantic-conventions lifecycle end to end — from the upstream registry, through Weaver-generated attribute-key constants and Roslyn source generation, to compile-time analyzers that keep consumer telemetry conformant. The Weaver and TypeSpec build pipeline ships as a reusable Nuke component.

Compatible with: OpenTelemetry Semantic Conventions v1.41.0 Targets: net10.0, netstandard2.0

Channel Package Contents
stable Qyl.OpenTelemetry.SemanticConventions Stable attribute-key constants, pre-generated by Weaver against the registry pinned at SemConvSchemaVersion, plus the embedded resolved schema.
stable Qyl.OpenTelemetry.SemanticConventions.Incubating Incubating attribute-key constants in a separate package — opt in to instability deliberately; breaking between minor versions.
stable Qyl.OpenTelemetry.SemanticConventions.SourceGeneration Roslyn incremental source generator. Emits typed attribute constants, Activity tag setters, metric descriptors, Meter factories, and event payloads from the embedded resolved registry, driven by [SemanticConvention*] marker attributes at consumer build time.
stable Qyl.OpenTelemetry.SemanticConventions.Analyzers Roslyn diagnostic analyzers + code fixes — flag deprecated semconv usage, missing required attributes, and schema-URL omission.
stable Qyl.OpenTelemetry.SemanticConventions.Nuke Nuke build component (IUpstreamConventions, IDomainConventionsApi, LockstepPolicy) exposing the Weaver and TypeSpec pipelines.

Analyzer reference: index · per-rule pages · migration catalog · SARIF v2.1.0 manifest · editorconfig profiles

Configuring analyzer severity

Switch the whole QYL00xx band from one MSBuild property instead of dropping editorconfig files:

<PropertyGroup>
  <OtelSemConvAnalysisMode>AllAsErrors</OtelSemConvAnalysisMode>
</PropertyGroup>
Value Effect
Default Descriptor-defined severities.
AllAsErrors Whole band as errors (strict CI).
Disabled Silence the band.
unset No editorconfig injection; consumer-side editorconfig stays authoritative.

The knob ships via buildTransitive/Qyl.OpenTelemetry.SemanticConventions.Analyzers.props in the NuGet. The name is deliberately not the bare <AnalysisMode> — that one is owned by Microsoft.CodeAnalysis.NetAnalyzers.

Build and regeneration

eng/build/ is a Nuke host; ./build.sh runs Compile — every project in the solution, with TreatWarningsAsErrors. Other targets:

  • GenerateDocs — re-render docs/Qyl.OpenTelemetry.SemanticConventions.Analyzers.md from the analyzer assembly.
  • CheckDocs — CI guard; fails when the committed markdown drifts from what the generator would emit.
  • AuditDocs — print analyzer-catalog statistics (no file I/O).
  • EnforceIds — verify each analyzer's class name, XML-doc summary, and DiagnosticId const agree with the runtime descriptor it registers.
  • EnforceIdsApply — rewrite analyzer sources to realign those after an intentional rule-id change.
  • VerifyAttributesHash — hash the committed Attributes/**/*.g.cs against eng/semconv/attributes.lock.sha256; drift fails the build.
  • SeedAttributesHash — refresh that lock after an intentional regeneration.

Attribute constants are regenerated out of band: a human runs Weaver against the OTel registry pinned at SemConvSchemaVersion, commits the new .g.cs, then runs SeedAttributesHash. The build itself never invokes Weaver — the committed .g.cs is the source of truth, guarded in CI by VerifyAttributesHash.

Upstream path

If the upstream OpenTelemetry .NET source-generator effort (open-telemetry/opentelemetry-dotnet-contrib#4424) lands, the SourceGeneration, Analyzers, and Nuke packages ship as one cohesive unit. Type identities are preserved, so the only consumer-side change is the PackageReference id.

Siblings: ANcpLua.Agents · ANcpLua.Roslyn.Utilities · ANcpLua.NET.Sdk · ANcpLua.Analyzers

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

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
3.4.0 0 7/11/2026
3.3.0 81 7/8/2026
3.2.0 83 7/7/2026
3.1.0 134 6/26/2026
3.0.2 108 6/24/2026
3.0.1 109 6/4/2026
3.0.0 106 5/25/2026
2.0.1 112 5/25/2026
2.0.0 112 5/24/2026
1.11.0 115 4/24/2026