Table of Contents

Class DocToolkitTelemetry

Namespace
DocToolkit
Assembly
DocToolkit.dll

The names to subscribe to for DocToolkit's telemetry.

builder.Services.AddOpenTelemetry()
    .WithTracing(t => t.AddSource(DocToolkitTelemetry.ActivitySourceName))
    .WithMetrics(m => m.AddMeter(DocToolkitTelemetry.MeterName));

Only the opt-in remote-image fetch is instrumented, and that is a deliberate scope rather than a first instalment. Every other call in this package is one synchronous, in-process, stateless operation that throws a typed exception on failure — a caller can time and log around it and learn everything a span would tell them. The fetch path is the exception: it is the only place this library reaches the network, the decision to allow or refuse a host happens deep inside HtmlToOpenXml's pipeline, and a refused fetch is deliberately silent — the image is skipped and the document still succeeds. Without this, a consumer who enabled remote images had no way to find out that an image never arrived, or why.

public static class DocToolkitTelemetry
Inheritance
DocToolkitTelemetry
Inherited Members

Fields

ActivitySourceName

The ActivitySource name. Matches the package id.

public const string ActivitySourceName = "Ank.DocToolkit"

Field Value

string

MeterName

The Meter name. Matches the package id.

public const string MeterName = "Ank.DocToolkit"

Field Value

string