Amazon DynamoDB · Types · Other public types
ArxDiagnostics
Definition
- Namespace
ARX.SDK.Services- Package
ARX.SDK
public static class ArxDiagnosticsARX's tracing and metrics, on .NET's own instruments, so OpenTelemetry (AddSource("ARX.SDK"), AddMeter("ARX.SDK")) or any ActivityListener and MeterListener read them:
- an activity per operation (
Create,RetrieveMultiple, …), kind Client, named "operation table", taggeddb.system.name,db.operation.name,db.collection.nameandarx.provider; on failure the status Error,error.typeandarx.error.code; arx.operation.duration(a histogram, in seconds) andarx.operation.errors(a counter), with the same tags.
Values are never recorded, only names. Without a listener, each operation costs a check.
Properties
const string SourceNameThe name of ARX's
ActivitySourceandMeter:ARX.SDK.static readonly ActivitySource SourceThe source of ARX's activities.
static readonly Meter MeterThe meter of ARX's metrics.
Methods
static Task<T> TraceAsync<T>(string provider, string dbSystem, string operation, string table, Func<Task<T>> work)Traces one operation of a provider. For the providers' use: applications read the activities and metrics instead.
Parameter Type Description providerstringThe provider's name ("PostgreSQL"). dbSystemstringThe database, as OpenTelemetry names it ("postgresql", "microsoft.sql_server", "mysql", "mongodb", "aws.dynamodb"). operationstringThe operation ("Create", "RetrieveMultiple", …). tablestringThe table or entity, when known. workFunc<Task<T>>The operation itself. static Task TraceAsync(string provider, string dbSystem, string operation, string table, Func<Task> work)As
TraceAsync{T}, for an operation without a result.Parameter Type Description providerstringThe provider's name ("PostgreSQL"). dbSystemstringThe database, as OpenTelemetry names it ("postgresql", "microsoft.sql_server", "mysql", "mongodb", "aws.dynamodb"). operationstringThe operation ("Create", "RetrieveMultiple", …). tablestringThe table or entity, when known. workFunc<Task>The operation itself.
Usage
A line from a verified sample; the full, runnable code is on its page.
ShouldListenTo = source => source.Name == ArxDiagnostics.SourceName,Set the service up for production, scenario 3
Used in: