Cohesive.Adapters.OpenTelemetry 0.1.0-alpha.120

This is a prerelease version of Cohesive.Adapters.OpenTelemetry.
dotnet add package Cohesive.Adapters.OpenTelemetry --version 0.1.0-alpha.120
                    
NuGet\Install-Package Cohesive.Adapters.OpenTelemetry -Version 0.1.0-alpha.120
                    
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.120" />
                    
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.120" />
                    
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.120
                    
#r "nuget: Cohesive.Adapters.OpenTelemetry, 0.1.0-alpha.120"
                    
#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.120
                    
#: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.120&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Cohesive.Adapters.OpenTelemetry&version=0.1.0-alpha.120&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.

Service export conformance

The adapter tests invoke a real declared transition-backed service through a native OpenTelemetry provider and processor. Both successful and failed exporter responses preserve the successful commit and canonical trace fingerprint. Exported service evidence retains caller parentage and excludes fixture tenant, subject and business values from tags. These tests establish local SDK collection/export behavior; they do not establish remote collector delivery, retention or authorized inspection. Listener-owning tests share one collection because native diagnostic listeners are process-wide.

Service bindings also emit cohesive.execution.invocations (counter) and cohesive.execution.invocation.duration (seconds histogram) through the existing execution meter. These measure each service invocation boundary, including Process admission/result reads; they do not measure the entire asynchronous Process lifetime. Only the closed activity-family and outcome dimensions are attached. No service, tenant, entity or invocation identifiers become metric labels. Metrics are independent of trace sampling and retain best-effort listener-failure isolation. Existing activation histograms are authoritative status snapshots and are not interchangeable with invocation counts.

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.120 0 9/29/2026
0.1.0-alpha.119 0 9/29/2026
0.1.0-alpha.118 26 9/29/2026
0.1.0-alpha.117 50 9/27/2026
0.1.0-alpha.116 43 9/26/2026
0.1.0-alpha.115 73 9/26/2026
0.1.0-alpha.114 63 9/24/2026
0.1.0-alpha.113 59 9/24/2026
0.1.0-alpha.112 60 9/23/2026
0.1.0-alpha.111 56 9/23/2026
0.1.0-alpha.110 53 9/23/2026
0.1.0-alpha.109.1 55 9/23/2026
0.1.0-alpha.109 54 9/23/2026
0.1.0-alpha.108 60 9/21/2026
0.1.0-alpha.107 50 9/21/2026
0.1.0-alpha.106 57 9/21/2026
0.1.0-alpha.105 50 9/21/2026
0.1.0-alpha.104 57 9/21/2026
0.1.0-alpha.103 58 9/21/2026
0.1.0-alpha.102 58 9/21/2026
Loading failed