Skip to content

Observability

Conveyor.Batch emits OpenTelemetry traces and metrics natively via System.Diagnostics.ActivitySource and System.Diagnostics.Metrics — no Conveyor.Batch-specific telemetry package is needed, just standard OpenTelemetry wiring in your host.

Wiring OpenTelemetry

csharp
using OpenTelemetry.Metrics;
using OpenTelemetry.Trace;

builder.Services.AddOpenTelemetry()
    .WithTracing(tracing => tracing.AddSource("Conveyor.Batch"))
    .WithMetrics(metrics => metrics.AddMeter("Conveyor.Batch"));

Both the ActivitySource and the Meter are named "Conveyor.Batch".

Activities

Activity nameEmitted byKey tags
conveyor.batch.job.executeJob launcherbatch.job.name, batch.job.execution_id, batch.job.status
conveyor.batch.step.executeStep executionbatch.step.name, batch.step.execution_id, batch.step.status
conveyor.batch.chunk.commitChunk engine, per committed chunkbatch.chunk.size

Metrics

InstrumentTypeDescription
conveyor.batch.jobs.completedCounter<long>Jobs that completed successfully
conveyor.batch.jobs.failedCounter<long>Jobs that failed
conveyor.batch.job.durationHistogram<double>Job duration, milliseconds
conveyor.batch.items.readCounter<long>Items read across all steps
conveyor.batch.items.writtenCounter<long>Items written across all steps
conveyor.batch.items.skippedCounter<long>Items skipped via a skip policy
conveyor.batch.chunk.sizeHistogram<int>Size of each committed chunk
conveyor.batch.chunks.committedCounter<long>Chunks committed across all steps

When to use

Wire this in any production deployment to get job- and step-level spans plus chunk-level metrics without adding any extra Conveyor.Batch package — it composes with whatever OpenTelemetry exporter (OTLP, Prometheus, Application Insights, etc.) your host already uses.