The GitHub Actions job "Benchmarks" on texera.git/obs/pr2/backend-emit has 
failed.
Run started by GitHub user Ma77Ball (triggered by Ma77Ball).

Head commit for run:
be6cf3208d636ea0980ec5aadbcf959d8a0333c3 / Matthew Ball <[email protected]>
feat(observability): backend metrics + tracing primitives

Build on the logging foundation (PR 1) with the backend emit path: workflow 
lifecycle metrics and a run-level setup trace span, plus the tracing/metrics 
primitives they use. This is PR 2 of the observability stack.

Primitives (common/observability):
- TexeraTracer: lazy accessor for the process tracer off GlobalOpenTelemetry.
- SpanAttrs: typed AttributeKey constants so span attributes use standard keys 
rather than ad hoc strings.
- WorkflowMetrics: the OTel instruments (start/completion/failure/cancellation 
counters and run-duration histogram) keyed by workflow kind.
- TraceparentValidator: validates W3C traceparent headers before use.

Emit path (amber):
- WorkflowMetricsRecorder: single owner of the metric instruments. init() wires 
them once; onStart stamps a run's start; onStateChange records terminal 
counters and duration exactly once on the first transition into a terminal 
state (idempotent, safe to call on every transition).
- WorkflowService.initExecutionService runs inside a run-level setup span so 
setup-path logs carry its trace id. The span covers only the synchronous setup; 
synchronous setup failures are recorded on it in the catch block, and the span 
is ended in finally. The async errorHandler deliberately does not touch the 
span: it is invoked after setup returns and the span has ended, so the failure 
is surfaced through the metadata store instead.
- ExecutionStateStore.updateWorkflowState is the single chokepoint that feeds 
every state transition to WorkflowMetricsRecorder.onStateChange.
- ComputingUnitMaster initializes the recorder at startup.

All observability sources live under common/observability (the module from PR 
1); the tracing/metrics classes are not duplicated into common/config.

Tests: WorkflowMetricsSpec, SpanAttrsSpec, and TraceparentValidatorSpec, plus 
TexeraTracerSpec (the tracer accessor and current-context passthrough) and 
WorkflowMetricsRecorderSpec (the state-to-metric mapping against an in-memory 
meter: starts increment the start counter, COMPLETED and FAILED record a 
completion and a duration sample, KILLED records a cancellation with no 
duration, and non-terminal or already-terminal transitions record nothing).

Review follow-ups addressed: span attributes use SpanAttrs keys instead of 
plain strings; the error handler no longer records onto a span that may have 
already ended (documented and handled via the metadata store).

Stacked on PR 1 (obs/pr1/foundations).

Report URL: https://github.com/apache/texera/actions/runs/39934816895

With regards,
GitHub Actions via GitBox

Reply via email to