Table of Contents

Class TcgDexActivity

Namespace
TcgDex.Diagnostics
Assembly
TcgDex.CSharpSdk.dll

Distributed-tracing spans for SDK operations.

public static class TcgDexActivity

Inheritance

Inherited Members

Remarks

Exposed as a plain System.Diagnostics.ActivitySource, which is .NET's built-in tracing primitive and what OpenTelemetry consumes. Subscribing is one line in the consumer's application:

builder.Services.AddOpenTelemetry()
    .WithTracing(t => t.AddSource(TcgDexActivity.SourceName));

When nothing subscribes, starting an activity returns null and the cost is a null check — so this is free for consumers who do not want it.

Spans cover SDK operations ("get a card"), not raw HTTP. HttpClient already emits its own spans, so a request made through AddTcgDex nests naturally underneath these rather than duplicating them.

Fields

SourceName

The activity source name to subscribe to. Stable across versions.

public const string SourceName = "TcgDex.CSharpSdk"

Field Value

string