elsa-core/doc/wiki
Sipke Schoorstra 2e712d367a
Add OpenTelemetry workflow instrumentation (#7514)
* Add OpenTelemetry workflow instrumentation

* Fix workflow telemetry metric tags

* Tighten telemetry test listeners

* Refine workflow telemetry boundaries

* Address telemetry review feedback

* Complete workflow telemetry coverage

* Address telemetry instrumentation review feedback

* Handle cancelled workflow telemetry

* Refine workflow activity telemetry tags

* Address telemetry review feedback

* Document OpenTelemetry extension coexistence

Agent-Logs-Url: https://github.com/elsa-workflows/elsa-core/sessions/33211c71-c3c9-424c-b7eb-a13ebd4713a3

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Address telemetry PR review comments

* Address telemetry review follow-ups

* Preserve workflow executing status transition order

* Address telemetry review feedback

* Refine workflow telemetry review fixes

* Address telemetry review feedback

* Address workflow instrumentation review feedback

* Fix faulted workflow telemetry tags

* Restrict workflow exception mutation

* Fix canceled activity telemetry status

* Clarify workflow exception access

* Cover HTTP trace context propagation

* Report cancelled workflow telemetry consistently

* Refine telemetry cancellation classification

* Record thrown workflow exceptions on context

* Tighten workflow telemetry exception handling

* Preserve first workflow exception

* Handle workflow cancellation separately

* Clarify workflow telemetry enum references

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
2026-05-22 01:17:05 +02:00
..
activities-and-authoring.md Refresh codebase wiki (#7464) 2026-05-19 00:49:27 +02:00
architecture.md Add ingress rate limiting hooks (#7512) 2026-05-22 00:13:11 +02:00
build-run-operate.md Merge origin/main into codex/security-health-checks 2026-05-20 22:33:42 +02:00
diagnostics-console-logs.md Refresh codebase wiki (#7466) 2026-05-19 09:03:59 +02:00
diagnostics-structured-logs.md Refresh codebase wiki (#7464) 2026-05-19 00:49:27 +02:00
expressions-and-scripting.md [codex] Harden C# expression host-code execution (#7519) 2026-05-21 00:50:25 +02:00
extension-guide.md Add ingress rate limiting hooks (#7512) 2026-05-22 00:13:11 +02:00
health-checks.md Address health check review feedback 2026-05-21 02:13:19 +02:00
http-scheduling-resilience.md [codex] Add codebase wiki (#7453) 2026-05-16 11:54:27 +02:00
identity-tenancy-security.md Add ingress rate limiting hooks (#7512) 2026-05-22 00:13:11 +02:00
module-system.md [codex] Add codebase wiki (#7453) 2026-05-16 11:54:27 +02:00
opentelemetry-workflows.md Add OpenTelemetry workflow instrumentation (#7514) 2026-05-22 01:17:05 +02:00
persistence.md [codex] Add codebase wiki (#7453) 2026-05-16 11:54:27 +02:00
README.md Add Elsa runtime readiness health checks 2026-05-20 13:34:25 +02:00
repository-map.md Refresh codebase wiki (#7464) 2026-05-19 00:49:27 +02:00
specs-and-adrs.md Refresh codebase wiki (#7464) 2026-05-19 00:49:27 +02:00
testing-guide.md Refresh codebase wiki (#7466) 2026-05-19 09:03:59 +02:00
workflow-api.md Add ingress rate limiting hooks (#7512) 2026-05-22 00:13:11 +02:00
workflow-core.md Refresh codebase wiki (#7466) 2026-05-19 09:03:59 +02:00
workflow-management.md [codex] Add codebase wiki (#7453) 2026-05-16 11:54:27 +02:00
workflow-runtime.md Add workflow dispatch transactional outbox (#7517) 2026-05-22 00:13:16 +02:00

Elsa Core Wiki

This wiki is a repo-local, code-grounded map of Elsa Core. It is intended for contributors who need the same kind of fast orientation that a DeepWiki-style generated wiki gives: what the system is, where the important code lives, how the pieces connect, and how to safely extend or test them.

The source of truth is still the code, specs, ADRs, and tests. Each page links back to the relevant files so you can jump from explanation to implementation.

Start Here

Elsa Core is a modular .NET workflow engine. The main solution is Elsa.sln. Production code lives under src, tests under test, specifications under specs, and architecture decisions under doc/adr.

The shortest mental model:

  1. An application calls services.AddElsa(...).
  2. Elsa builds an IModule and configures feature objects.
  3. Features register services, activities, API endpoints, middleware, hosted services, and persistence stores.
  4. Workflow definitions are created by code, JSON, imported files, or providers.
  5. The runtime starts, resumes, dispatches, and persists workflow instances.
  6. APIs, SignalR hubs, HTTP endpoint activities, diagnostics, and persistence packages layer around that core.
flowchart LR
    App["Host app"] --> Module["Elsa module system"]
    Module --> Core["Workflow core"]
    Module --> Management["Workflow management"]
    Module --> Runtime["Workflow runtime"]
    Module --> Api["Workflow API"]
    Module --> Extensions["HTTP, Scheduling, Expressions, Identity, Tenants"]
    Management --> Persistence["Stores / EF Core providers"]
    Runtime --> Persistence
    Runtime --> Logs["Execution logs and diagnostics"]
    Api --> Studio["Elsa Studio / API clients"]

Page Map

Page Use it for
Repository Map Top-level folders, projects, and where to look first.
Architecture The main system layers and request/execution flow.
Module System How IModule, FeatureBase, feature dependencies, and shell features work.
Workflow Core Activities, execution contexts, pipelines, variables, bookmarks, graphs, and flowchart execution.
Workflow Management Workflow definitions, instances, import/export, materializers, validation, and activity descriptors.
Workflow Runtime Dispatch, triggers, bookmarks, queues, background activity scheduling, graceful shutdown, and recovery.
Workflow API FastEndpoints, route prefixing, API categories, SignalR, and client-facing contracts.
Activities And Authoring How workflows are authored in C#, JSON, ElsaScript, and host methods.
Expressions And Scripting Expression evaluators and language feature packages.
HTTP, Scheduling, And Resilience Inbound HTTP workflows, outbound HTTP, scheduled triggers, and resilience strategies.
Persistence In-memory stores, EF Core stores, provider packages, migrations, and multi-provider rules.
Diagnostics Structured Logs ILogger capture, live feed, REST/SignalR surface, redaction, and SQLite persistence.
Diagnostics Console Logs Raw stdout/stderr capture, live feed, REST/SignalR surface, and redaction.
Health Checks Elsa runtime readiness probes, liveness/readiness mapping, and Kubernetes probe guidance.
Identity, Tenancy, And Security Users, applications, roles, API keys, tenant resolution, and authorization touch points.
Testing Guide Test project layout, fixture choices, and targeted commands.
Extension Guide How to add features, activities, expression providers, stores, endpoints, and ingress sources.
Specs And ADRs How current specs and ADRs explain design intent.
Build, Run, And Operate Build commands, sample hosts, runtime knobs, Docker notes, and operational endpoints.

Source Landmarks

Contributor Workflow

Use targeted reads first, then targeted tests. For most changes, start with the relevant module page, inspect the linked feature class and contracts, add or update tests in the matching test/unit, test/integration, or test/component project, and run the narrowest dotnet test command that proves the behavior.

When changing public behavior, update the related README, spec quickstart, or wiki page in the same PR. This repository is strongly modular, so the best changes keep ownership boundaries clear.