Cohesive.Adapters.OpenTelemetry 0.1.0-alpha.91

This is a prerelease version of Cohesive.Adapters.OpenTelemetry.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Cohesive.Adapters.OpenTelemetry --version 0.1.0-alpha.91
                    
NuGet\Install-Package Cohesive.Adapters.OpenTelemetry -Version 0.1.0-alpha.91
                    
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="Cohesive.Adapters.OpenTelemetry" Version="0.1.0-alpha.91" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cohesive.Adapters.OpenTelemetry" Version="0.1.0-alpha.91" />
                    
Directory.Packages.props
<PackageReference Include="Cohesive.Adapters.OpenTelemetry" />
                    
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 Cohesive.Adapters.OpenTelemetry --version 0.1.0-alpha.91
                    
#r "nuget: Cohesive.Adapters.OpenTelemetry, 0.1.0-alpha.91"
                    
#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 Cohesive.Adapters.OpenTelemetry@0.1.0-alpha.91
                    
#: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=Cohesive.Adapters.OpenTelemetry&version=0.1.0-alpha.91&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Cohesive.Adapters.OpenTelemetry&version=0.1.0-alpha.91&prerelease
                    
Install as a Cake Tool

Cohesive.Adapters.OpenTelemetry

Cohesive.Adapters.OpenTelemetry interprets Cohesive's existing ActivitySource and Meter scopes through native OpenTelemetry builders. Core packages continue to emit standard .NET diagnostics without depending on OpenTelemetry. This adapter does not define another telemetry model and it does not select exporters, collectors, sampling, resources, propagation, processors, logging, or hosting.

Install

dotnet add package Cohesive.Adapters.OpenTelemetry

Register core instrumentation

Register all core scopes in an existing host pipeline:

using Cohesive.Adapters.OpenTelemetry;

services.AddOpenTelemetry()
    .WithTracing(tracing => tracing
        .AddCohesiveCoreInstrumentation())
    .WithMetrics(metrics => metrics
        .AddCohesiveCoreInstrumentation());

Core is explicit in the aggregate name because other adapter and provider scopes remain host selections. Trace and metric registration project the same internal paired core-scope membership, and conformance tests require the aggregate to remain behaviorally equivalent to the block helpers composed together. Register a smaller surface when the host does not use every core block:

services.AddOpenTelemetry()
    .WithTracing(tracing => tracing
        .AddCohesiveExecutionInstrumentation()
        .AddCohesiveRelationsInstrumentation())
    .WithMetrics(metrics => metrics
        .AddCohesiveExecutionInstrumentation()
        .AddCohesiveRelationsInstrumentation());

The extension methods operate on TracerProviderBuilder and MeterProviderBuilder; the same methods work with Sdk.CreateTracerProviderBuilder() and Sdk.CreateMeterProviderBuilder() outside dependency injection.

Scope authority and parentage

The instrumentation owner remains the source of truth for every name, activity, instrument, unit, status, and tag. This package copies no scope names. Its internal collection-membership list pairs the public activity-source and meter constants owned by each block so trace and metric registration cannot drift independently.

Owner Activity source Meter Responsibility
Cohesive.Execution Cohesive.Execution Cohesive.Execution Logical execution, Storage execution projections, checkpoints, Control, and materialization state
Cohesive.Relations Cohesive.Relations Cohesive.Relations Canonical relation compilation, realization, acquisition, interpretation, and mapping
Cohesive.Processes.Distribution Cohesive.Processes.Distribution Cohesive.Processes.Distribution Distributed work admission, claims, leases, worker turns, and settlement

Cohesive activities start beneath Activity.Current. In an ASP.NET host, the framework request activity is therefore the parent of logical Cohesive work. Provider SDK or HTTP activities started while a Cohesive activity is current are its children. Do not add a second wrapper activity around an already-instrumented provider call merely to measure the same interval.

Other adapter and provider scopes

The core-scope aggregate intentionally does not reference other adapter assemblies. A host registers only the adapters it selected, using the constants owned by those packages:

services.AddOpenTelemetry()
    .WithTracing(tracing => tracing
        .AddCohesiveCoreInstrumentation()
        .AddSource(CosmosRelationQueryTelemetry.InstrumentationName)
        .AddSource(CosmosClientFactory.OperationActivitySourceName))
    .WithMetrics(metrics => metrics
        .AddCohesiveCoreInstrumentation()
        .AddMeter(CosmosRelationQueryTelemetry.InstrumentationName));

The adapter deliberately does not offer typed helpers for these external scopes. Doing so here would pull every supported infrastructure adapter into one package; doing so in each adapter would make OpenTelemetry mandatory for all of that adapter's consumers. Hosts therefore use the selected package's compile-time constants with native AddSource and AddMeter calls.

Current adapter scopes are:

Owner Trace source Meter Notes
Cohesive.Adapters.Cosmos Cohesive.Adapters.Cosmos.Relations same Cohesive relation-adapter work
Microsoft.Azure.Cosmos Azure.Cosmos.Operation not publicly configurable in the current stable SDK Native database-client operations; query text is off by Cohesive default
Cohesive.Adapters.Postgres Cohesive.Adapters.Postgres.Relations same Cohesive relation-adapter work; register provider instrumentation separately
Cohesive.Adapters.Elastic Cohesive.Adapters.Elastic.Relations same Cohesive relation-adapter work
Cohesive.Adapters.Elastic Cohesive.Adapters.Elastic.Materialization same Target lifecycle, bulk operations, sizes, and outcomes

Attribute and metric safety

  • Metric dimensions must remain closed, bounded, and low-cardinality. Use only dimensions documented by the owning telemetry contract.
  • Exact request, process, attempt, generation, document, tenant, resource, payload, query, evidence, and fingerprint identities are trace-only unless the owner explicitly documents a bounded metric interpretation.
  • Query text, payload content, credentials, authorization material, raw exception messages, and connection strings are prohibited by default. Enable a provider's sensitive-data option only through that provider's native configuration and only with an explicit data-handling decision.
  • Static service, deployment, environment, region, and version attributes belong on the OpenTelemetry Resource, not on every activity or metric point.
  • Missing telemetry is not success evidence. Sampling, export failure, process loss, and inactive listeners remain distinct from a measured successful operation.

Cohesive.ServiceLevels can later bind stable semantic operation identities to objectives and indicators. This package only makes runtime evidence collectible; it does not define objectives or evaluate compliance.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.1.0-alpha.99 29 9/20/2026
0.1.0-alpha.98 32 9/19/2026
0.1.0-alpha.97 60 9/19/2026
0.1.0-alpha.96 58 9/19/2026
0.1.0-alpha.95 46 9/18/2026
0.1.0-alpha.94 40 9/18/2026
0.1.0-alpha.93 40 9/18/2026
0.1.0-alpha.92 44 9/18/2026
0.1.0-alpha.91 48 9/18/2026
0.1.0-alpha.90 47 9/18/2026
0.1.0-alpha.89 47 9/18/2026
0.1.0-alpha.88 50 9/18/2026
0.1.0-alpha.87 45 9/17/2026
0.1.0-alpha.86 48 9/17/2026
0.1.0-alpha.85 42 9/17/2026
0.1.0-alpha.84 40 9/17/2026
0.1.0-alpha.83 42 9/16/2026
0.1.0-alpha.82 48 9/16/2026
0.1.0-alpha.81 40 9/16/2026