Table of Contents

Class NpgsqlTracingOptions

Namespace
Npgsql
Assembly
Npgsql.dll

Options to configure Npgsql's support for OpenTelemetry tracing.

public class NpgsqlTracingOptions
Inheritance
NpgsqlTracingOptions
Inherited Members

Properties

EnableFirstResponseEvent

Gets or sets a value indicating whether to enable the "time-to-first-read" event. Default is true to preserve existing behavior.

public bool EnableFirstResponseEvent { get; set; }

Property Value

bool

EnrichWithBatch

Gets or sets an action to enrich an Activity with NpgsqlBatch.

public Action<Activity, NpgsqlBatch>? EnrichWithBatch { get; set; }

Property Value

Action<Activity, NpgsqlBatch>

EnrichWithCommand

Gets or sets an action to enrich an Activity with NpgsqlCommand.

public Action<Activity, NpgsqlCommand>? EnrichWithCommand { get; set; }

Property Value

Action<Activity, NpgsqlCommand>

FilterBatch

Gets or sets a filter function that determines whether or not to collect telemetry on a per NpgsqlBatch basis.

public Func<NpgsqlBatch, bool>? FilterBatch { get; set; }

Property Value

Func<NpgsqlBatch, bool>

FilterCommand

Gets or sets a filter function that determines whether or not to collect telemetry on a per NpgsqlCommand basis.

public Func<NpgsqlCommand, bool>? FilterCommand { get; set; }

Property Value

Func<NpgsqlCommand, bool>

ProvideSpanNameForBatch

Gets or sets a function that provides a span's name on a per NpgsqlBatch basis.

public Func<NpgsqlBatch, string?>? ProvideSpanNameForBatch { get; set; }

Property Value

Func<NpgsqlBatch, string>

ProvideSpanNameForCommand

Gets or sets a function that provides a span's name on a per NpgsqlCommand basis.

public Func<NpgsqlCommand, string?>? ProvideSpanNameForCommand { get; set; }

Property Value

Func<NpgsqlCommand, string>