Commit graph

23 commits

Author SHA1 Message Date
Sipke Schoorstra 9b0aa9d922
Remove redundant span tags for activity and workflow incidents
The tags "activity.incidents" and "workflow.incidents" were removed as they are unnecessary and provide no additional value. This change simplifies the middleware implementation while retaining essential telemetry data.
2025-03-17 15:05:24 +01:00
Sipke Schoorstra 2d485d253d
Remove redundant status setting in telemetry middleware.
The `SetStatus(ActivityStatusCode.Ok)` calls were unnecessary as the default behavior already sets the appropriate status. This cleanup simplifies the code and avoids redundant operations, improving maintainability.
2025-03-17 15:01:37 +01:00
Sipke Schoorstra 83253b2fae
Add support for starting new trace contexts in workflows
Introduced `StartNewTrace` input to workflows and updated OpenTelemetry middleware to support initiating new trace contexts. This helps improve trace isolation and linking when desired, enhancing observability during workflow execution.
2025-03-15 21:14:10 +01:00
Sipke Schoorstra 5f74a83a77
Remove redundant status handling in tracing middleware
This commit eliminates unused status checks ("running" and "pending") from OpenTelemetry tracing middlewares. The changes simplify the codebase and improve maintainability by removing unnecessary logic.
2025-03-15 20:07:15 +01:00
Sipke Schoorstra 39932a6f09
Refactor OpenTelemetry tracing and improve span tagging.
Introduced new span tags for activities and workflows to enhance trace analysis. Optimized error handling in activity tracing by selecting the first applicable handler. Removed unused manual tracing configuration and commented out console exporters in server setup.
2025-03-14 23:55:02 +01:00
Sipke Schoorstra b624b2b4af
Refactor error span handling with prioritization and predicates
Introduce `Order` property and `CanHandle` method in `IErrorSpanHandler` to enable prioritized and conditional processing of error spans. Update handler implementations to utilize these properties and streamline logic. This enhances flexibility and improves the extensibility of error span handling.
2025-03-14 23:37:46 +01:00
Sipke Schoorstra e393cca031
Update error status and exception type handling
Enhanced error status to include detailed message when the workflow is faulted, providing better context in logs. Fixed the retrieval of exception type by replacing `GetType()` with `.Type` for improved accuracy in incident tagging.
2025-03-14 23:27:16 +01:00
Sipke Schoorstra fd31b5b605
Update OTEL fields and tags
Added and updated multiple package references, including OpenTelemetry, Datadog.Trace.Bundle, and various Microsoft.Extensions libraries. This ensures compatibility with the latest dependencies and introduces enhanced features for resilience and tracing.
2025-03-14 23:17:54 +01:00
Sipke Schoorstra 7261cd8443
Add OpenTelemetry tracing and error handling enhancements
Introduced OpenTelemetry tracing with AlwaysOnSampler and console exporter, integrated into the Elsa framework. Added error handling capabilities via custom `IErrorSpanHandler` implementations. Updated project dependencies to include OpenTelemetry-related packages.
2025-02-20 20:34:07 +01:00
Sipke Schoorstra 07119c8ff5
Add OpenTelemetry error span handling infrastructure
Introduce infrastructure for handling error spans with OpenTelemetry, including `DefaultErrorSpanHandler` and `FaultExceptionErrorSpanHandler`. Define core abstractions (`ErrorSpanHandlerBase`, `IErrorSpanHandler`) and utilities for customizing OpenTelemetry integration. This enables improved error tracing and categorization in workflows.
2025-02-20 20:33:55 +01:00
Sipke Schoorstra 58f0c48f66 Refactor workflow management to utilize mediator requests.
Replaced direct store interactions in workflow management with mediator-based requests using `IMediator`, improving consistency and modularity. Added new handlers and requests for workflow definition operations, and updated existing services to align with mediator patterns.
2025-02-12 22:08:09 +01:00
Sipke Schoorstra 06b7ba43e5
Merge pull request #6083 from jdevillard/enh/tenants/otel-props
[Feat: OTEL + Tenants] : Add TenantId Property to Span
2024-12-11 10:42:40 +01:00
AlmightyLks 153397e63c
Fix all broken summary xml docs (#6123)
* Add proper summary tags back

* Apply suggestions from code review

Co-authored-by: Robin Sue <robinsue@live.de>

* 69 more files fixed

---------

Co-authored-by: Robin Sue <robinsue@live.de>
2024-11-18 13:41:27 +01:00
Jérémie DEVILLARD 5c3770d389 Add TenantId Property to Span 2024-10-31 11:01:19 +01:00
Sipke Schoorstra f3961c0af5 Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
Sipke Schoorstra 02f1b56eb1 Add tracing for trigger activities in workflow execution
Enhanced the OpenTelemetry tracing middleware to include detailed information about the triggered activity within the workflow execution. This change adds tags for the activity ID, name, and type to provide better observability and debugging insights.
2024-10-07 10:15:35 +02:00
Sipke Schoorstra 078f34fd79 Remove obsolete tag settings and correct tag schemas
Eliminated redundant `correlationId` tag setting. Adjusted `workflowInstance` and `activityInstance` tag schemas for better clarity. Simplified the processors list in `otel-collector-config.yaml`.
2024-10-05 14:12:00 +02:00
Sipke Schoorstra 54624aea77 Refactor tracing to enhance span details
Renamed variables from 'activity' to 'span' for clarity and consistency. Added additional span tags for start and end times, status updates, and detailed error information for improved traceability and debugging.
2024-10-05 13:48:59 +02:00
Sipke Schoorstra 458181c5ce Refactor activity events with status tags helper method
Replaced inline tag creation with a helper method to streamline code and ensure consistency in status tags for activity events. This change also includes a minor comment for clarity on null activity handling.
2024-10-05 13:39:58 +02:00
Sipke Schoorstra 2aa312850d Refactor incident tagging logic in tracing middleware
Reorganized the logic for setting tags when incidents are present in `OpenTelemetryTracingWorkflowExecutionMiddleware`. The new structure ensures consistent tag setting for error status and incidents, improving code readability and maintainability.
2024-10-05 11:19:02 +02:00
Sipke Schoorstra df827b0fda Update Datadog config, add incident error serialization
Enhanced the Datadog tracing configuration to include priority sampling, rate limits, and sampling rules in the docker-compose-datadog.yml. Updated the agent image version and improved error message serialization in OpenTelemetry middleware to use custom JSON serializer options. Adjusted Dockerfile path to correct bundle location.
2024-09-24 00:27:51 +02:00
Sipke Schoorstra adf36927dc Update Docker and k8s configs, enhance OTEL tracing
Updated `docker-compose-datadog.yml` with new environment variables and updated image versions, enhancing trace sampling and service autodiscovery. Added Kubernetes deployment, service, and role files for `elsa-server`, `elsa-studio`, `plant-uml`, `postgres`, and `trace-lens`, improving the project's infrastructure. Enhanced OpenTelemetry middleware for better error handling and detailed tracing of activity and workflow executions.
2024-09-23 23:35:30 +02:00
Sipke Schoorstra 79b5bfc378 Add OpenTelemetry support for tracing workflow execution
This commit introduces the Elsa.OpenTelemetry module to provide OpenTelemetry sources for tracing workflow and activity execution. Additionally, it updates the program to include default workflow and activity execution pipelines with tracing middleware, and improves pipeline builder extensions to support middleware insertion.
2024-09-23 11:35:43 +02:00