Bsft.Instrumentation
2.2.0
dotnet add package Bsft.Instrumentation --version 2.2.0
NuGet\Install-Package Bsft.Instrumentation -Version 2.2.0
<PackageReference Include="Bsft.Instrumentation" Version="2.2.0" />
<PackageVersion Include="Bsft.Instrumentation" Version="2.2.0" />
<PackageReference Include="Bsft.Instrumentation" />
paket add Bsft.Instrumentation --version 2.2.0
#r "nuget: Bsft.Instrumentation, 2.2.0"
#:package Bsft.Instrumentation@2.2.0
#addin nuget:?package=Bsft.Instrumentation&version=2.2.0
#tool nuget:?package=Bsft.Instrumentation&version=2.2.0
Bsft.Instrumentation
The vendor-neutral instrumentation layer every emitting Bsft.* package uses: a named pairing of an
ActivitySource and a Meter, the provider that hands one out, and the registration record a
collector discovers a source through — with no OpenTelemetry dependency of any kind.
Install
dotnet add package Bsft.Instrumentation
No Bsft packages at all. It takes Microsoft.Extensions.Diagnostics for the meter factory,
System.Diagnostics.DiagnosticSource for the activity source and
Microsoft.Extensions.DependencyInjection.Abstractions for the registration surface. Bsft.Observability reads what this
package advertises; a host that never installs a collector still compiles and runs, because emission
is a no-op while nobody is listening.
Register
services.AddBsftInstrumentationSource("MyApp.Orders");
// traces only
services.AddBsftInstrumentationSource("MyApp.Orders", ObservabilitySignals.Traces);
Nothing else is required. The call advertises one source and idempotently ensures the meter factory
and IInstrumentationSourceProvider are present, so there is no separate package-wide entry point to
call first. Calling it twice for the same name registers the advertisement once, so a collector's
discovery is free of duplicates.
Configure
None. The package binds no configuration section and exposes no options type; what is collected is
decided by BsftObservabilityOptions in Bsft.Observability.
| Option | Default | Effect |
|---|---|---|
| — | — | — |
Validation: AddBsftInstrumentationSource rejects a blank source name, and so does
ObservabilitySourceRegistration. Neither is configuration.
Extend
IInstrumentationSourceProvider (resolves a name to a source, caching one per name) is registered
with TryAdd, so a host that registered its own provider keeps it. IInstrumentationSource (starts
activities and caches counter and histogram instruments on a meter) is the type a *Telemetry class
injects. ObservabilitySignals decides whether a source is advertised for traces, metrics or both.
Every name these take is a static one the code decides. A source is cached for the life of the provider and an instrument name becomes a series in whatever backend collects it, so a name built from a tenant, a user or an entity id grows both without bound. Request data goes on an activity as a tag, where the deployment decides what a tag may carry.
Documentation
Topic page: docs/observability.md. Conventions: docs/package-conventions.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Diagnostics (>= 10.0.12)
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.19)
- Microsoft.Extensions.Diagnostics (>= 9.0.19)
- System.Diagnostics.DiagnosticSource (>= 9.0.19)
NuGet packages (9)
Showing the top 5 NuGet packages that depend on Bsft.Instrumentation:
| Package | Downloads |
|---|---|
|
Bsft.Data
BSFT Framework data layer: query filtering, full-text search, pagination, multi-tenancy |
|
|
Bsft.Mediator
BSFT Framework CQRS mediator: IMediator, commands, queries, notifications, pipeline behaviors |
|
|
Bsft.Hosting
BSFT Framework hosting defaults, health checks, and startup validation |
|
|
Bsft.Idempotency
BSFT Framework idempotent unsafe endpoints: an Idempotency-Key header, a request fingerprint, replay of the first response and a pluggable record store |
|
|
Bsft.Messaging
BSFT Framework messaging: in-memory message bus, integration event staging and the transactional outbox dispatcher. |
GitHub repositories
This package is not used by any popular GitHub repositories.