Table of Contents

Class S100Telemetry

Namespace
EncDotNet.S100.Diagnostics
Assembly
EncDotNet.S100.Core.dll

Helpers for creating the per-assembly ActivitySource and Meter instances used by EncDotNet.S100 libraries.

public static class S100Telemetry
Inheritance
S100Telemetry
Inherited Members

Remarks

Each EncDotNet.S100 library exposes a single internal static Telemetry class that holds its ActivitySource and Meter. By convention the source / meter name is the assembly name (e.g. EncDotNet.S100.Pipelines, EncDotNet.S100.Datasets.S101) so consumers can subscribe to the entire family with the wildcard EncDotNet.S100.*.

Versions track AssemblyInformationalVersionAttribute when present, falling back to the assembly's file version. Both ActivitySource and Meter are inert when no listener is attached, so libraries pay no measurable cost when observability is not wired up by the host.

Canonical instrument naming conventions:

  • Spans (activities): s100.<area>.<verb> for point-in-time events (e.g. s100.symbol.resolve, s100.lua.execute), and s100.<area>.<noun> for stage containers (e.g. s100.pipeline.vector.stage.xslt, s100.render.frame).
  • Histograms: s100.<area>.<measured>, e.g. s100.pipeline.duration, s100.render.frame.duration, s100.symbol.resolve.duration. Use ms for durations, {items} for counts.
  • Counters: s100.<area>.<event>.count, e.g. s100.symbol.cache.hit.count, s100.xslt.cache.miss.count.

All tags are defined in TelemetryTags. New instruments must follow these patterns so dashboards and queries stay uniform.

Methods

CreateActivitySource(Type)

Builds an ActivitySource whose name matches the caller's assembly name and whose version matches the assembly's informational version.

public static ActivitySource CreateActivitySource(Type markerType)

Parameters

markerType Type

A type from the assembly that owns the new source. Pass typeof(Telemetry) from the per-library holder class.

Returns

ActivitySource

CreateActivitySource(Type, string)

Builds an ActivitySource with an explicit name (for assemblies whose file name differs from their telemetry identity, such as a renamed application executable) and the informational version of markerType's assembly.

public static ActivitySource CreateActivitySource(Type markerType, string name)

Parameters

markerType Type

A type from the assembly that owns the new source; supplies the version.

name string

The source name to publish under.

Returns

ActivitySource

CreateMeter(Type)

Builds a Meter whose name matches the caller's assembly name and whose version matches the assembly's informational version.

public static Meter CreateMeter(Type markerType)

Parameters

markerType Type

Returns

Meter

CreateMeter(Type, string)

Builds a Meter with an explicit name and the informational version of markerType's assembly. See CreateActivitySource(Type, string).

public static Meter CreateMeter(Type markerType, string name)

Parameters

markerType Type

A type from the assembly that owns the new meter; supplies the version.

name string

The meter name to publish under.

Returns

Meter