Commit graph

47 commits

Author SHA1 Message Date
Sipke Schoorstra 70b8582b23
Add OpenTelemetry module (#5810)
* Add OpenTelemetry integration for workflow tracing

Introduced a new module, Elsa.OpenTelemetry, to provide OpenTelemetry sources for tracing workflow and activity execution. Updated various components and pipeline extensions to support OpenTelemetry tracing throughout the workflow execution process.

* Refactor workflow execution pipelines

Deleted `WorkflowsFeatureExtensions` and migrated methods to `PipelineWorkflowsFeatureExtensions` with added configurability. Enhanced `ActivityExecutionMiddlewareExtensions` and `ActivityExecutionPipelinePipelineBuilder` to support middleware insertion. Added comprehensive tracing to `OpenTelemetryTracingWorkflowExecutionMiddleware`.

* Add OpenTelemetry tracing to activity execution

Introduced `OpenTelemetryTracingActivityExecutionMiddleware` to capture tracing information for activity execution within workflows. This middleware logs activity execution start and end events, attaching pertinent activity tags. Added extension method to register this middleware in the workflow execution pipeline.

* Set `PYTHONNET_PYDLL` consistently and update workflow pipelines

Update Dockerfiles to set the `PYTHONNET_PYDLL` environment variable consistently without spaces. Additionally, refactor `Program.cs` to streamline workflow and activity execution pipeline configurations by using the `WithDefaultWorkflowExecutionPipeline` and `WithDefaultActivityExecutionPipeline` methods.

* Enhance OpenTelemetry Tracing Middleware Implementation

Add missing activity tags and events to improve telemetry data. Simplify middleware installation syntax for both workflow and activity execution tracing pipelines, ensuring consistent and clear tracing across modules.
2024-07-22 14:36:33 +02:00
Sipke Schoorstra b4cd4dd465
Replace custom webhooks implementation with WebhooksCore (#5811)
* Replace custom webhooks implementation with WebhooksCore

Replaced the existing custom webhooks registration and dispatching system with the WebhooksCore library. This involved removing all previous custom webhook classes and interfaces, updating project dependencies, and modifying appsettings and program files to use the new configuration. The update simplifies the webhook handling architecture and leverages the features provided by WebhooksCore.

* Hide API key in Datadog Docker compose file

This change replaces the exposed Datadog API key with a placeholder "<HIDDEN>". This enhances security by preventing the API key from being visible in the version control system.
2024-07-21 16:48:38 +02:00
Sipke Schoorstra 7c34f22d56 Remove commented OTEL_DOTNET_AUTO_TRACES_ADDITIONAL_SOURCES
Deleted an unused commented configuration line in docker-compose-datadog.yml to improve readability and maintainability. This change does not affect the existing tracing configuration or application behavior.
2024-07-20 00:05:49 +02:00
Sipke Schoorstra 8acf9b7212 Add pull_policy and environment variables for Datadog
Added `pull_policy: always` to `elsa-server` and `elsa-studio` services in the Docker Compose file to ensure the latest images are always pulled. Updated `elsa-server` environment variables to improve Datadog tracing and monitoring. Adjusted the Dockerfile path for the `elsa-studio` service.
2024-07-19 23:51:46 +02:00
Sipke Schoorstra 6924bd0770 Update build paths, add Datadog tracing, and adjust versions
Corrected Dockerfile paths for Elsa.Server and Elsa.Studio, and added Datadog tracing and related environment variables. Included Datadog.Trace package in Elsa.Server.Web project and updated Elsa.Studio package versions to 3.3.0-preview.466.
2024-07-19 23:36:31 +02:00
Sipke Schoorstra 107d660210 Update Dockerfile paths for consistency
Changed paths from "bundles" to "apps" in multiple Dockerfiles to standardize the directory structure. This ensures all Dockerfiles use a consistent directory naming convention across the project.
2024-07-19 21:01:46 +02:00
Sipke Schoorstra 283824fcfd
Enable Proto Actor Tracing for TraceLens (#5800)
* Add database initialization script and update dependencies

Added a script to initialize the 'tracelens' database and modified the Docker setup to include this script. Refactored and improved the ProtoActorFeature class, added OpenTelemetry dependencies, and updated project settings.

* Enable OpenTelemetry integration for Proto.Actor

Added OpenTelemetry environment configuration details to the README and included the Proto.OpenTelemetry package in the project file. Updated the ProtoActorFeature to apply tracing with OpenTelemetry to WorkflowInstanceActor.

* Refactor VariablePersistenceManager to use primary constructor

This refactor simplifies the VariablePersistenceManager by moving the storageDriverManager initialization into the primary constructor. It removes the redundant field and constructor, aligning with the concise nature of modern C# syntax, and ensures consistency in accessing the storageDriverManager throughout the class.

* Remove unused Open Telemetry code from Program.cs

The code for configuring Open Telemetry was commented out but not removed, cluttering the file. This commit cleans up Program.cs by deleting these unused lines, maintaining a cleaner and more readable codebase.

* Add metrics and tracing configurations for ProtoActorFeature

Introduced methods to enable metrics and tracing in ProtoActorFeature. Removed redundant properties and updated the workflow runtime to utilize the new configurations.

* Add Directory.Build.props for shared project settings

Introduce Directory.Build.props to centralize common project settings and dependencies. Consolidate target framework, language version, and package references to reduce duplication. Remove redundant property definitions from Elsa.Server.Web.csproj.

* Move apps from bundles to apps folder and Elsa module to modules folder
2024-07-19 20:23:32 +02:00
Sipke Schoorstra 9b9454403b
Minor improvements and bug fixes following the 3.1 release (#5168)
* Move DynamicActivity.cs to Activities directory

The DynamicActivity.cs file has been moved from the Models directory to the Activities directory. This reorganization aims to ensure that the file's location correctly reflects its namespace.

* Add GetOutput method in ActivityExtensions

A new GetOutput method has been added to the ActivityExtensions.cs file. This method allows the retrieval of output with a specific name from an activity. Useful for handling complex types in workflow activities.

* Add feature check and refactor dependencies in Elsa

The commit introduces a new feature check in the `Module` class and refactors the dependencies in MassTransit features. Specifically, it enables querying for a specific feature before configuring the dispatcher endpoints, increasing flexibility and control. In addition, the responsibility for creating `IEndpointChannelFormatter` has been shifted from `MassTransitWorkflowDispatcherFeature` to `MassTransitFeature`, aligning with responsibility distribution.

Fixes #5165

* Add HasFeature method to IModule interface

The IModule interface has been updated to include two methods, HasFeature<T>() and HasFeature(Type featureType). These methods are designed to check if a specific type of feature has been configured, enhancing the functionality provided by the interface.

* Add WorkflowRuntimeFeature dependency

Removed unused namespaces from WorkflowsApiFeature class and added a new dependency on WorkflowRuntimeFeature. This change enhances the code cleanliness and ensures all required dependencies are correctly linked.

* Add activity completion functionality to multiple contexts

This commit introduces multiple methods to handle activity completion across various contexts, including ActivityExecutionContext and ActivityCompletedContext. It also includes updates to bookmark serialization and the WorkflowRuntime. The resulting changes should improve handling of activity outcomes and status updates in the application flow.

* Handle null options in DefaultWorkflowRuntime

Added null-conditional operators to prevent potential NullReferenceExceptions in DefaultWorkflowRuntime. This change ensures that even if the 'options' object is null, the code will not throw an exception and will instead use default values where applicable.

* Add ElsaDbContextOptions to DbContextOptionsBuilder

A line of code is added to enable applying ElsaDbContextOptions as default in DbContextOptionsBuilder within PersistenceFeatureBase. This change specifies the use of ElsaDbContextOptions when configuring the context options, enhancing the database context setup in the EntityFrameworkCore.Common module.

* Remove whitespace in Elsa.Server.Web.csproj

This commit removes unnecessary whitespaces at the end of the ProjectReference and PackageReference elements, in the Elsa.Server.Web.csproj file. This improves the readability and alignment of the code and follows the best practice for XML file format.

* Add MongoDB to docker-compose.yml

A MongoDB service has been added to the docker-compose file. The configuration includes port mapping and volume mapping for MongoDB data storage. This allows more flexibility in our environment setup with MongoDB now being spun up automatically.

* Add collection check in MongoDbStore before bulk save

Adjusted code structure, and divided longer lines of code into smaller, multi-line chunks for better readability. This refactoring makes the underlying operations and structuring of the code more apparent, aiding in future code maintenance and understanding.

* Change target branch in packages.yml workflow

This commit modifies the Github actions workflow for packaging. The branch from which to fetch changes is now specified explicitly as 'origin/patch/3.1.1' instead of the default 'origin/main'. This adjustment is specific for package creation under certain conditions.
2024-04-02 07:41:46 +02:00
Sipke Schoorstra 83dd776233 Add new docker-compose files, new activities and services
Create new docker-compose files for non-data dog and data dog services. New services include Postgres, cockroachdb, rabbitmq, redis, and elsa-server. Along with the services, a new bash script for migration and various new activities and endpoints are also added for the Elsa server. This set of changes broadens the operational environment of Elsa.
2024-03-24 20:28:19 +01:00
Sipke Schoorstra b553ffe0d9 Add Docker build script for Elsa Studio
This commit introduces a Dockerfile for the Elsa Studio application and a corresponding GitHub workflow for building and deploying the Docker image. These make it possible to automatically build and deploy Elsa Studio as a Docker image.
2023-12-27 22:15:57 +01:00
Sipke Schoorstra e0b9356c47 Update Dockerfiles for Python 3.11 installation
Added lines in Dockerfiles to install Python 3.11 and set the PYTHONNET_PYDLL environment variable. This enhancement helps to ensure compatibility with recent Python updates and improves general performance.
2023-12-27 21:45:01 +01:00
Sipke Schoorstra 062158b4d2 Update Dockerfiles and add Python 3.11
Working directories in both ElsaServer.Dockerfile and ElsaServerAndStudio.Dockerfile have been updated for better consistency. Additionally, Python 3.11 has been installed in the ElsaServer.Dockerfile, accompanied by relevant environment variables and symbolic links to improve interoperability.
2023-12-27 20:44:28 +01:00
Sipke Schoorstra f17966c592 Refactor project structure and Docker configurations
The changes included in this commit are made to refactor the project structure and Docker configurations. Previously, the application was structured around the AllInOneWeb solution, but it has been split into Server.Web and ServerAndStudio.Web solutions for better separation of concerns. Additionally, the Docker configurations have been updated to reflect the new structure, which should streamline the build and deployment process.
2023-12-27 20:30:33 +01:00
Sipke Schoorstra 0146a8aeb0 Update AllInOne dockerfile 2023-12-04 14:25:34 +01:00
Sipke Schoorstra f5962501bc Update targets 2023-11-27 20:20:22 +01:00
Sipke Schoorstra 86ffcfab5d Update Dockerfile 2023-11-27 20:03:50 +01:00
Sipke Schoorstra bec8cbc322
Target .NET 8 (#4660) 2023-11-27 11:26:16 +01:00
Sipke Schoorstra cb08cad32b
Replace Stencil dashboard with Blazor in AllInOne.Web project (#4554) 2023-10-19 01:03:55 +02:00
Sipke Schoorstra ab53ba4d8b Update All In One dockerfile to build client assets 2023-04-01 10:50:52 +02:00
Sipke Schoorstra f31a950d68 Try --platform=$BUILDPLATFORM 2022-12-30 19:42:52 +01:00
Sipke Schoorstra 3017804980 Try Node 19.0.0 2022-12-30 19:36:56 +01:00
Sipke Schoorstra 01c70e5563 Update docker things 2022-12-30 19:29:34 +01:00
Sipke Schoorstra 42ce946d64 Reset 2022-01-04 09:38:11 +01:00
Mohamed Ali aad15cbb7d revent docker to amd64 2021-12-29 22:22:37 +03:00
Yopi Cahya 4933a2e81e
Upgrade all projects to .NET6.0 (#2616)
* Upgrade all projects to .NET6.0

* Add compatibility NET5.0

* Add compatibility NET Core 3.1

* Update appveyor.yml

* Update packages

* Update src/activities/Elsa.Activities.Http/Elsa.Activities.Http.csproj

Remove common Authorization package

* Update src/activities/Elsa.Activities.Http/Elsa.Activities.Http.csproj

reimplement fix for #1568

* reimplement fix for #1611

* add missing .netcoreapp3.1 references to persistence packages

* fix Jint reference

* change samples and tests to target .NET 6

* cleanup multi-targeting conditions in samples/tests

* revert Elsa and Elsa.Temporal.Common to .netstandard2.1 only

* Update docker files to use net6.0 SDK

* Fix docker poor performance on arm64

* Update Elsa.sln

* Update Elsa.Activities.RabbitMq.csproj

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
Co-authored-by: Mohamed Ali <antivirus.cs@gmail.com>
2021-12-26 22:31:35 +01:00
Sipke Schoorstra 0dd7575a75 Update docker files 2021-12-23 11:12:08 +01:00
Sipke Schoorstra 0b98dca4bf Update docker-compose.yaml
Fixes #2623
2021-12-23 10:38:15 +01:00
Sipke Schoorstra 9307df687c Fix monolith dockerfile 2021-11-22 22:38:34 +01:00
Sipke Schoorstra 3e7bd44d01 Fix Dockerfiles 2021-11-22 22:16:54 +01:00
Sipke Schoorstra 0df2269df5 Fix Dockerfiles to apply custom Nuget.Config 2021-11-22 22:03:44 +01:00
Sipke Schoorstra d1b0465b0d Fix docker readme + compose file 2021-08-24 11:52:45 +02:00
Jens Willmer 3e298413a0
Speed up docker build for dashboard (#1287)
* speed up docker build for dashboard

* Revert stencil.config

* Update docker files

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
2021-07-20 13:44:35 +02:00
Sipke Schoorstra fbd0d45f53 Update docker files to target specific framework 2021-06-14 15:41:43 +02:00
Sipke Schoorstra 1b9e8078e3 Update Dockerfile-elsa-dashboard 2021-06-03 16:12:08 +02:00
Sipke Schoorstra 7ae29a4c24 Update docker files 2021-05-15 11:59:57 +02:00
Sipke Schoorstra f02ec47109 Add elsa server docker GH workflow 2021-05-14 13:59:28 +02:00
Sipke Schoorstra 32043acb59 Add Elsa Dashboard project + dockerfile
Fixes #981
2021-05-14 12:34:51 +02:00
Sipke Schoorstra 1fd1501a6d Update Dockerfile-with-npm 2021-04-27 13:54:48 +02:00
Jens Willmer 91bf6b43bc
Docker changes to speed up github build 2021-04-16 16:23:26 +02:00
Jens Willmer a084fa4bf4 NPM install 2021-04-15 18:45:04 +02:00
Jens Willmer 7eb908459d Revert back to .NET Core 5 and include docker build in dashboard
Debugging support of docker container is not working on .NET 6 (preview)
2021-04-15 18:45:04 +02:00
Jens Willmer 184c96043f
.NET 6.0 update for docker build 2021-04-14 14:29:24 +02:00
Jens Willmer 3e386d0529
Switch docker build to AspNetCore.Monolith 2021-04-14 11:29:22 +02:00
Jens Willmer 762c220889
Update docker-compose.yaml 2021-04-06 13:48:05 +02:00
Jens Willmer a2916d86c4
Update Dockerfile 2021-04-05 18:17:59 +02:00
Jens Willmer 78b210cda9 Refactored docker build scripts 2021-03-31 21:47:57 +02:00
Sipke Schoorstra cb05f36919 Add docker files for ElsaDashboard.Samples.Monolith app 2021-03-17 22:13:05 +01:00