.NET API
ITraceStore
Tracon.Abstractions.dllThe store for persisted spans.
public interface ITraceStoreRemarks
Section titled “Remarks”An error from this store does not stop the run.
Observability must not break functionality; the caller
(RunTraceCollector) catches and logs errors.
The write path is sampled. Writing every span would bottleneck the
database at high volume; the sampling decision belongs to the caller
(TraconObservabilityOptions), not the store.
Tenant behavior is not uniform across this interface’s methods.
ITraceStore.WriteSpansAsync is EXPECTED tenant: it reads
TraceSpanBatch.TenantId, never the ambient tenant, for the
same reason IRunStore.AppendEventAsync does — the writing
thread may not belong to the trace’s own tenant.
ITraceStore.GetTraceByRunAsync is AMBIENT tenant: it takes no explicit
tenant parameter and filters by the current ITenantContext
internally.
Methods
Section titled “Methods”GetTraceByRunAsync(Guid, CancellationToken)
Section titled “ GetTraceByRunAsync(Guid, CancellationToken)”Fetches a run’s span tree.
ValueTask<RunTrace?> GetTraceByRunAsync(Guid runId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”runId Guid
The run identifier.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The trace; null if no record exists.
WriteSpansAsync(TraceSpanBatch, CancellationToken)
Section titled “ WriteSpansAsync(TraceSpanBatch, CancellationToken)”Writes a trace’s spans. Can be called multiple times for the same trace; spans are merged by identifier.
ValueTask WriteSpansAsync(TraceSpanBatch batch, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”batch TraceSpanBatch
The span set to write.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The completion task.