Table of Contents

Class ActivityExtensions

Namespace
FlowOrchestrator.Core.Observability
Assembly
FlowOrchestrator.Core.dll

Helpers for the System.Diagnostics activity API used by the engine.

public static class ActivityExtensions
Inheritance
ActivityExtensions
Inherited Members

Remarks

Implemented manually rather than depending on the OpenTelemetry.ApiActivity.RecordException extension so FlowOrchestrator.Core stays free of any OpenTelemetry runtime dependency. The event shape (event name "exception" with exception.type, exception.message, exception.stacktrace tags) matches the OpenTelemetry semantic convention so APMs treat it identically.

Methods

RecordError(Activity?, Exception)

Records ex on the activity following the OpenTelemetry exception semantic convention and marks the activity status as Error. Safe to call with a null activity.

public static void RecordError(this Activity? activity, Exception ex)

Parameters

activity Activity

The current activity, or null when tracing is disabled.

ex Exception

The exception to record.