MarbleSoft.FlowModule.TraceFinalizer
1.3.3
See the version list below for details.
dotnet add package MarbleSoft.FlowModule.TraceFinalizer --version 1.3.3
NuGet\Install-Package MarbleSoft.FlowModule.TraceFinalizer -Version 1.3.3
<PackageReference Include="MarbleSoft.FlowModule.TraceFinalizer" Version="1.3.3" />
<PackageVersion Include="MarbleSoft.FlowModule.TraceFinalizer" Version="1.3.3" />
<PackageReference Include="MarbleSoft.FlowModule.TraceFinalizer" />
paket add MarbleSoft.FlowModule.TraceFinalizer --version 1.3.3
#r "nuget: MarbleSoft.FlowModule.TraceFinalizer, 1.3.3"
#:package MarbleSoft.FlowModule.TraceFinalizer@1.3.3
#addin nuget:?package=MarbleSoft.FlowModule.TraceFinalizer&version=1.3.3
#tool nuget:?package=MarbleSoft.FlowModule.TraceFinalizer&version=1.3.3
MarbleSoft.FlowModule.TraceFinalizer
TraceFinalizer closes open flow entries in an existing trace context.
It looks for the currently open flow entry matching the resolved runtime flow id and flow version, sets flowEndTimeUtc and duration_ms, and can optionally close the full trace when all flow entries are closed.
Settings
The settings are defined in TraceFinalizerSettings.cs.
- Source
- Type: string
- Required: yes
- Validation: min length 1, max length 256
- Default: data.headers.traces.flowChain
- Purpose: input path used to read existing trace context
- Target
- Type: string
- Required: yes
- Validation: min length 1, max length 256
- Default: data.headers.traces.flowChain
- Purpose: output path used to write trace context
- Close Trace
- Type: bool
- Required: no
- Default: true
- Purpose: when enabled, endTimeUtc and duration_ms are set if all flow entries are closed
- MQTT publish settings (optional)
- Enable MQTT Publish: bool, default true
- MQTT Source Property: string path, default data, if empty the full message/trace payload is used
- MQTT Topic: string, required when MQTT is enabled
- MQTT Brokers: comma or line separated host:port list, default localhost:1883
- MQTT Protocol Version: enum V311 or V500
- Use TLS: bool, default true
- SSL Protocol: enum None, Tls12, Tls13
- Allow Untrusted Certificates: bool
- ClientId: optional string, generated automatically when empty
- CA Certificate: optional Crosser Certificate credential selector
- Client Certificate: optional Crosser Certificate credential selector
- MQTT User Credential: optional Crosser UsernamePassword credential selector
- QoS: AtMostOnce, AtLeastOnce, ExactlyOnce
- Retain: bool
- Last Will Topic/Payload/QoS/Retain: available as settings (currently retained for forward-compatible API mapping)
Flow and module metadata are resolved programmatically at runtime. The module attempts runtime values first and then environment-variable fallbacks, for example FLOW_ID, FLOW_VERSION, FLOW_NAME, FLOW_DEFINITION_ID, FLOW_DEPLOYMENT_ID, MODULE_ID.
Runtime behavior
Input lookup:
- Reads trace from configured Source path
- Falls back to legacy paths header.trace and trace when available
If no trace is found:
- Message is forwarded unchanged
If trace exists:
- Ensures flows list exists
- Finds the last open matching entry where:
- flowId matches resolved runtime flow id (case-insensitive)
- flowVersion matches resolved runtime flow version (case-insensitive)
- flowEndTimeUtc is empty
- If found, sets flowEndTimeUtc and calculates duration_ms
- Updates sequence to at least flows.Count + 1
- If Close Trace is true and all entries are closed, sets endTimeUtc and trace duration_ms
- Writes updated trace back to configured Target path only when changes occurred
MQTT behavior:
- MQTT client is initialized on module start when Enable MQTT Publish is true
- Broker failover is applied in configured order from MQTT Brokers
- For each processed message, the configured source payload is published to MQTT Topic with configured QoS/Retain
- On successful publish, the latest flow entry gets mqttOutTopic populated
Minimal configuration example
Source: data.headers.traces.flowChain Target: data.headers.traces.flowChain Close Trace: true
Output structure excerpt
{
"data": {
"headers": {
"traces": {
"flowChain": {
"id": "9b2a59dc-18b4-4acb-8381-8b3c7b915ae7",
"startTimeUtc": "2026-06-11T11:39:28.7473848Z",
"endTimeUtc": "2026-06-11T11:39:29.9459869Z",
"duration_ms": 1199.21,
"createdByModule": "0d454d32-348f-4383-b610-afd6697b1195",
"createdByFlow": "02f68cf5-f5c4-48c3-9d3d-62229a378889",
"name": "JobManagement",
"flows": [
{
"flowId": "02f68cf5-f5c4-48c3-9d3d-62229a378889",
"flowRunId": "de6a8eee-2c6f-4ddb-877c-2e1c6982d779",
"flowStartTimeUtc": "2026-06-11T11:39:28.7473940Z",
"flowEndTimeUtc": "2026-06-11T11:39:28.9459869Z",
"duration_ms": 198.21,
"flowVersion": "13",
"sequence": 1
}
]
}
}
}
}
}
Build and pack
From repository root:
Build dotnet build crosser-trace-initializer.sln -c Debug
Pack TraceFinalizer dotnet pack MarbleSoft.FlowModule.TraceFinalizer/Module/MarbleSoft.FlowModule.TraceFinalizer.csproj
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Crosser.EdgeNode.Flows (>= 5.0.0)
- MQTTnet (>= 4.0.0.167)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.6.1 | 23 | 9/15/2026 |
| 1.6.0 | 36 | 9/15/2026 |
| 1.5.9 | 48 | 9/14/2026 |
| 1.5.8 | 56 | 9/14/2026 |
| 1.5.7 | 46 | 9/14/2026 |
| 1.5.6 | 55 | 9/11/2026 |
| 1.5.5 | 51 | 9/11/2026 |
| 1.5.4 | 49 | 9/11/2026 |
| 1.5.3 | 57 | 9/11/2026 |
| 1.5.2 | 73 | 9/10/2026 |
| 1.5.1 | 68 | 9/10/2026 |
| 1.5.0 | 71 | 9/10/2026 |
| 1.4.3 | 107 | 7/30/2026 |
| 1.4.1 | 102 | 7/21/2026 |
| 1.4.0 | 100 | 7/21/2026 |
| 1.3.6 | 106 | 7/3/2026 |
| 1.3.5 | 98 | 7/3/2026 |
| 1.3.4 | 102 | 7/3/2026 |
| 1.3.3 | 101 | 7/3/2026 |
| 1.3.2 | 104 | 7/3/2026 |
N/A