elsa-workflows / elsa-workflows/elsa-core
Exception logs do not include TenantId when multitenancy is enabled
- Dominant language
- C#
- Stars
- 7.9k
- Forks
- 1.5k
- Avg merge
- 15h 22m
- Merged PRs (30d)
- 114
Description
## Description
When running Elsa with multitenancy enabled, logged exceptions do not appear to include the current `TenantId`.
In a multitenant application, this makes it difficult to identify which tenant caused the failure. Since the same workflow/application instance can serve multiple tenants, exception logs should ideally include tenant context whenever a tenant is available.
## Expected Behavior
When an exception is logged while executing in a tenant context, the log entry should include the tenant id, for example as a structured logging property:
```text
TenantId:
Contributor guide
Research direction
Start by tracing exception logging during workflow execution and how the current tenant context is accessed. Reproduce an exception with multitenancy enabled, then verify that the log entry includes a structured TenantId when a tenant is available and remains valid without tenant context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100