Skip to content

feat: prefer observability telemetry in wfctl templates#776

Merged
intel352 merged 1 commit into
mainfrom
feat/observability-wfctl-templates
May 25, 2026
Merged

feat: prefer observability telemetry in wfctl templates#776
intel352 merged 1 commit into
mainfrom
feat/observability-wfctl-templates

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary\n- remove direct /metrics scaffolding from generated API/full-stack templates\n- add workflow-plugin-observability wiring so generated apps emit telemetry through the shared observability path\n- keep app-specific metric names out of generic workflow/plugin code\n\n## Dependency\n- Can merge after the observability core contracts PR lands: #775\n\n## Verification\n- GOWORK=off go test ./cmd/wfctl -run 'TestRunInit(APIService|FullStack)Template|TestKnownModuleTypesPopulated|TestRunTemplateValidate'\n- GOWORK=off go test ./cmd/wfctl

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 25, 2026

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:276: parsing iteration count: invalid syntax
baseline-bench.txt:350230: parsing iteration count: invalid syntax
baseline-bench.txt:694088: parsing iteration count: invalid syntax
baseline-bench.txt:1247130: parsing iteration count: invalid syntax
baseline-bench.txt:1583227: parsing iteration count: invalid syntax
baseline-bench.txt:1898294: parsing iteration count: invalid syntax
benchmark-results.txt:276: parsing iteration count: invalid syntax
benchmark-results.txt:407581: parsing iteration count: invalid syntax
benchmark-results.txt:742517: parsing iteration count: invalid syntax
benchmark-results.txt:1090506: parsing iteration count: invalid syntax
benchmark-results.txt:1403956: parsing iteration count: invalid syntax
benchmark-results.txt:1705904: parsing iteration count: invalid syntax
goos: linux
goarch: amd64
pkg: github.com/GoCodeAlone/workflow/dynamic
cpu: AMD EPYC 9V74 80-Core Processor                
                            │ baseline-bench.txt │
                            │       sec/op       │
InterpreterCreation-4               6.999m ± 63%
ComponentLoad-4                     3.472m ±  1%
ComponentExecute-4                  1.800µ ±  1%
PoolContention/workers-1-4          1.008µ ±  2%
PoolContention/workers-2-4          1.005µ ±  1%
PoolContention/workers-4-4          1.004µ ±  1%
PoolContention/workers-8-4          1.010µ ±  8%
PoolContention/workers-16-4         1.008µ ±  1%
ComponentLifecycle-4                3.506m ±  1%
SourceValidation-4                  2.085µ ±  2%
RegistryConcurrent-4                745.5n ±  4%
LoaderLoadFromString-4              3.552m ±  1%
geomean                             17.59µ

                            │ baseline-bench.txt │
                            │        B/op        │
InterpreterCreation-4               2.027Mi ± 0%
ComponentLoad-4                     2.180Mi ± 0%
ComponentExecute-4                  1.203Ki ± 0%
PoolContention/workers-1-4          1.203Ki ± 0%
PoolContention/workers-2-4          1.203Ki ± 0%
PoolContention/workers-4-4          1.203Ki ± 0%
PoolContention/workers-8-4          1.203Ki ± 0%
PoolContention/workers-16-4         1.203Ki ± 0%
ComponentLifecycle-4                2.183Mi ± 0%
SourceValidation-4                  1.984Ki ± 0%
RegistryConcurrent-4                1.133Ki ± 0%
LoaderLoadFromString-4              2.182Mi ± 0%
geomean                             15.25Ki

                            │ baseline-bench.txt │
                            │     allocs/op      │
InterpreterCreation-4                15.68k ± 0%
ComponentLoad-4                      18.02k ± 0%
ComponentExecute-4                    25.00 ± 0%
PoolContention/workers-1-4            25.00 ± 0%
PoolContention/workers-2-4            25.00 ± 0%
PoolContention/workers-4-4            25.00 ± 0%
PoolContention/workers-8-4            25.00 ± 0%
PoolContention/workers-16-4           25.00 ± 0%
ComponentLifecycle-4                 18.07k ± 0%
SourceValidation-4                    32.00 ± 0%
RegistryConcurrent-4                  2.000 ± 0%
LoaderLoadFromString-4               18.06k ± 0%
geomean                               183.3

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                            │ benchmark-results.txt │
                            │        sec/op         │
InterpreterCreation-4                  9.421m ± 66%
ComponentLoad-4                        3.597m ±  9%
ComponentExecute-4                     1.891µ ±  1%
PoolContention/workers-1-4             1.204µ ±  1%
PoolContention/workers-2-4             1.206µ ±  1%
PoolContention/workers-4-4             1.205µ ±  1%
PoolContention/workers-8-4             1.208µ ±  1%
PoolContention/workers-16-4            1.220µ ±  1%
ComponentLifecycle-4                   3.640m ±  1%
SourceValidation-4                     2.299µ ±  1%
RegistryConcurrent-4                   1.007µ ±  6%
LoaderLoadFromString-4                 3.653m ±  1%
geomean                                20.36µ

                            │ benchmark-results.txt │
                            │         B/op          │
InterpreterCreation-4                  2.027Mi ± 0%
ComponentLoad-4                        2.180Mi ± 0%
ComponentExecute-4                     1.203Ki ± 0%
PoolContention/workers-1-4             1.203Ki ± 0%
PoolContention/workers-2-4             1.203Ki ± 0%
PoolContention/workers-4-4             1.203Ki ± 0%
PoolContention/workers-8-4             1.203Ki ± 0%
PoolContention/workers-16-4            1.203Ki ± 0%
ComponentLifecycle-4                   2.183Mi ± 0%
SourceValidation-4                     1.984Ki ± 0%
RegistryConcurrent-4                   1.133Ki ± 0%
LoaderLoadFromString-4                 2.182Mi ± 0%
geomean                                15.25Ki

                            │ benchmark-results.txt │
                            │       allocs/op       │
InterpreterCreation-4                   15.68k ± 0%
ComponentLoad-4                         18.02k ± 0%
ComponentExecute-4                       25.00 ± 0%
PoolContention/workers-1-4               25.00 ± 0%
PoolContention/workers-2-4               25.00 ± 0%
PoolContention/workers-4-4               25.00 ± 0%
PoolContention/workers-8-4               25.00 ± 0%
PoolContention/workers-16-4              25.00 ± 0%
ComponentLifecycle-4                    18.07k ± 0%
SourceValidation-4                       32.00 ± 0%
RegistryConcurrent-4                     2.000 ± 0%
LoaderLoadFromString-4                  18.06k ± 0%
geomean                                  183.3

pkg: github.com/GoCodeAlone/workflow/middleware
cpu: AMD EPYC 9V74 80-Core Processor                
                                  │ baseline-bench.txt │
                                  │       sec/op       │
CircuitBreakerDetection-4                 303.8n ± 12%
CircuitBreakerExecution_Success-4         22.68n ±  0%
CircuitBreakerExecution_Failure-4         70.93n ±  0%
geomean                                   78.76n

                                  │ baseline-bench.txt │
                                  │        B/op        │
CircuitBreakerDetection-4                 144.0 ± 0%
CircuitBreakerExecution_Success-4         0.000 ± 0%
CircuitBreakerExecution_Failure-4         0.000 ± 0%
geomean                                              ¹
¹ summaries must be >0 to compute geomean

                                  │ baseline-bench.txt │
                                  │     allocs/op      │
CircuitBreakerDetection-4                 1.000 ± 0%
CircuitBreakerExecution_Success-4         0.000 ± 0%
CircuitBreakerExecution_Failure-4         0.000 ± 0%
geomean                                              ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                  │ benchmark-results.txt │
                                  │        sec/op         │
CircuitBreakerDetection-4                     457.6n ± 0%
CircuitBreakerExecution_Success-4             59.78n ± 0%
CircuitBreakerExecution_Failure-4             65.56n ± 2%
geomean                                       121.5n

                                  │ benchmark-results.txt │
                                  │         B/op          │
CircuitBreakerDetection-4                    144.0 ± 0%
CircuitBreakerExecution_Success-4            0.000 ± 0%
CircuitBreakerExecution_Failure-4            0.000 ± 0%
geomean                                                 ¹
¹ summaries must be >0 to compute geomean

                                  │ benchmark-results.txt │
                                  │       allocs/op       │
CircuitBreakerDetection-4                    1.000 ± 0%
CircuitBreakerExecution_Success-4            0.000 ± 0%
CircuitBreakerExecution_Failure-4            0.000 ± 0%
geomean                                                 ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/module
cpu: AMD EPYC 9V74 80-Core Processor                
                                 │ baseline-bench.txt │
                                 │       sec/op       │
IaCStateBackend_InProcess-4              294.9n ± 13%
IaCStateBackend_GRPC-4                   10.12m ± 14%
JQTransform_Simple-4                     613.8n ± 35%
JQTransform_ObjectConstruction-4         1.422µ ±  1%
JQTransform_ArraySelect-4                3.432µ ±  2%
JQTransform_Complex-4                    41.53µ ±  1%
JQTransform_Throughput-4                 1.754µ ±  0%
SSEPublishDelivery-4                     63.70n ±  1%
geomean                                  3.777µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
IaCStateBackend_InProcess-4             416.0 ±  0%
IaCStateBackend_GRPC-4                5.760Mi ± 13%
JQTransform_Simple-4                  1.273Ki ±  0%
JQTransform_ObjectConstruction-4      1.773Ki ±  0%
JQTransform_ArraySelect-4             2.625Ki ±  0%
JQTransform_Complex-4                 16.22Ki ±  0%
JQTransform_Throughput-4              1.984Ki ±  0%
SSEPublishDelivery-4                    0.000 ±  0%
geomean                                             ¹
¹ summaries must be >0 to compute geomean

                                 │ baseline-bench.txt │
                                 │     allocs/op      │
IaCStateBackend_InProcess-4              2.000 ± 0%
IaCStateBackend_GRPC-4                  6.859k ± 0%
JQTransform_Simple-4                     10.00 ± 0%
JQTransform_ObjectConstruction-4         15.00 ± 0%
JQTransform_ArraySelect-4                30.00 ± 0%
JQTransform_Complex-4                    324.0 ± 0%
JQTransform_Throughput-4                 17.00 ± 0%
SSEPublishDelivery-4                     0.000 ± 0%
geomean                                             ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                 │ benchmark-results.txt │
                                 │        sec/op         │
IaCStateBackend_InProcess-4                 347.2n ±  1%
IaCStateBackend_GRPC-4                      10.15m ± 30%
JQTransform_Simple-4                        689.4n ± 34%
JQTransform_ObjectConstruction-4            1.522µ ±  1%
JQTransform_ArraySelect-4                   3.290µ ±  0%
JQTransform_Complex-4                       36.29µ ±  0%
JQTransform_Throughput-4                    1.858µ ±  0%
SSEPublishDelivery-4                        76.30n ±  1%
geomean                                     3.977µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
IaCStateBackend_InProcess-4                416.0 ±  0%
IaCStateBackend_GRPC-4                   5.823Mi ± 14%
JQTransform_Simple-4                     1.273Ki ±  0%
JQTransform_ObjectConstruction-4         1.773Ki ±  0%
JQTransform_ArraySelect-4                2.625Ki ±  0%
JQTransform_Complex-4                    16.22Ki ±  0%
JQTransform_Throughput-4                 1.984Ki ±  0%
SSEPublishDelivery-4                       0.000 ±  0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

                                 │ benchmark-results.txt │
                                 │       allocs/op       │
IaCStateBackend_InProcess-4                 2.000 ± 0%
IaCStateBackend_GRPC-4                     6.877k ± 0%
JQTransform_Simple-4                        10.00 ± 0%
JQTransform_ObjectConstruction-4            15.00 ± 0%
JQTransform_ArraySelect-4                   30.00 ± 0%
JQTransform_Complex-4                       324.0 ± 0%
JQTransform_Throughput-4                    17.00 ± 0%
SSEPublishDelivery-4                        0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/schema
cpu: AMD EPYC 9V74 80-Core Processor                
                                    │ baseline-bench.txt │
                                    │       sec/op       │
SchemaValidation_Simple-4                    1.091µ ± 3%
SchemaValidation_AllFields-4                 1.644µ ± 4%
SchemaValidation_FormatValidation-4          1.566µ ± 2%
SchemaValidation_ManySchemas-4               1.596µ ± 1%
geomean                                      1.455µ

                                    │ baseline-bench.txt │
                                    │        B/op        │
SchemaValidation_Simple-4                   0.000 ± 0%
SchemaValidation_AllFields-4                0.000 ± 0%
SchemaValidation_FormatValidation-4         0.000 ± 0%
SchemaValidation_ManySchemas-4              0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

                                    │ baseline-bench.txt │
                                    │     allocs/op      │
SchemaValidation_Simple-4                   0.000 ± 0%
SchemaValidation_AllFields-4                0.000 ± 0%
SchemaValidation_FormatValidation-4         0.000 ± 0%
SchemaValidation_ManySchemas-4              0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                    │ benchmark-results.txt │
                                    │        sec/op         │
SchemaValidation_Simple-4                      1.033µ ± 30%
SchemaValidation_AllFields-4                   1.554µ ±  4%
SchemaValidation_FormatValidation-4            1.497µ ±  2%
SchemaValidation_ManySchemas-4                 1.510µ ±  4%
geomean                                        1.380µ

                                    │ benchmark-results.txt │
                                    │         B/op          │
SchemaValidation_Simple-4                      0.000 ± 0%
SchemaValidation_AllFields-4                   0.000 ± 0%
SchemaValidation_FormatValidation-4            0.000 ± 0%
SchemaValidation_ManySchemas-4                 0.000 ± 0%
geomean                                                   ¹
¹ summaries must be >0 to compute geomean

                                    │ benchmark-results.txt │
                                    │       allocs/op       │
SchemaValidation_Simple-4                      0.000 ± 0%
SchemaValidation_AllFields-4                   0.000 ± 0%
SchemaValidation_FormatValidation-4            0.000 ± 0%
SchemaValidation_ManySchemas-4                 0.000 ± 0%
geomean                                                   ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/store
cpu: AMD EPYC 9V74 80-Core Processor                
                                   │ baseline-bench.txt │
                                   │       sec/op       │
EventStoreAppend_InMemory-4                1.046µ ±  6%
EventStoreAppend_SQLite-4                  1.101m ±  3%
GetTimeline_InMemory/events-10-4           12.75µ ±  2%
GetTimeline_InMemory/events-50-4           71.48µ ±  5%
GetTimeline_InMemory/events-100-4          142.7µ ±  2%
GetTimeline_InMemory/events-500-4          586.2µ ± 21%
GetTimeline_InMemory/events-1000-4         1.192m ±  0%
GetTimeline_SQLite/events-10-4             85.57µ ±  2%
GetTimeline_SQLite/events-50-4             223.3µ ±  1%
GetTimeline_SQLite/events-100-4            391.5µ ±  0%
GetTimeline_SQLite/events-500-4            1.699m ±  2%
GetTimeline_SQLite/events-1000-4           3.341m ±  0%
geomean                                    201.4µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                  747.0 ± 5%
EventStoreAppend_SQLite-4                  1.984Ki ± 2%
GetTimeline_InMemory/events-10-4           7.953Ki ± 0%
GetTimeline_InMemory/events-50-4           46.62Ki ± 0%
GetTimeline_InMemory/events-100-4          94.48Ki ± 0%
GetTimeline_InMemory/events-500-4          472.8Ki ± 0%
GetTimeline_InMemory/events-1000-4         944.3Ki ± 0%
GetTimeline_SQLite/events-10-4             16.74Ki ± 0%
GetTimeline_SQLite/events-50-4             87.14Ki ± 0%
GetTimeline_SQLite/events-100-4            175.4Ki ± 0%
GetTimeline_SQLite/events-500-4            846.1Ki ± 0%
GetTimeline_SQLite/events-1000-4           1.639Mi ± 0%
geomean                                    67.03Ki

                                   │ baseline-bench.txt │
                                   │     allocs/op      │
EventStoreAppend_InMemory-4                  7.000 ± 0%
EventStoreAppend_SQLite-4                    53.00 ± 0%
GetTimeline_InMemory/events-10-4             125.0 ± 0%
GetTimeline_InMemory/events-50-4             653.0 ± 0%
GetTimeline_InMemory/events-100-4           1.306k ± 0%
GetTimeline_InMemory/events-500-4           6.514k ± 0%
GetTimeline_InMemory/events-1000-4          13.02k ± 0%
GetTimeline_SQLite/events-10-4               382.0 ± 0%
GetTimeline_SQLite/events-50-4              1.852k ± 0%
GetTimeline_SQLite/events-100-4             3.681k ± 0%
GetTimeline_SQLite/events-500-4             18.54k ± 0%
GetTimeline_SQLite/events-1000-4            37.29k ± 0%
geomean                                     1.162k

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                   │ benchmark-results.txt │
                                   │        sec/op         │
EventStoreAppend_InMemory-4                   1.122µ ±  3%
EventStoreAppend_SQLite-4                     946.5µ ±  4%
GetTimeline_InMemory/events-10-4              14.01µ ±  2%
GetTimeline_InMemory/events-50-4              77.56µ ±  3%
GetTimeline_InMemory/events-100-4             134.9µ ± 14%
GetTimeline_InMemory/events-500-4             628.3µ ±  1%
GetTimeline_InMemory/events-1000-4            1.284m ±  1%
GetTimeline_SQLite/events-10-4                84.77µ ±  1%
GetTimeline_SQLite/events-50-4                244.2µ ±  2%
GetTimeline_SQLite/events-100-4               443.9µ ±  2%
GetTimeline_SQLite/events-500-4               1.984m ±  2%
GetTimeline_SQLite/events-1000-4              3.900m ±  2%
geomean                                       213.4µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                    828.5 ± 10%
EventStoreAppend_SQLite-4                    1.988Ki ±  1%
GetTimeline_InMemory/events-10-4             7.953Ki ±  0%
GetTimeline_InMemory/events-50-4             46.62Ki ±  0%
GetTimeline_InMemory/events-100-4            94.48Ki ±  0%
GetTimeline_InMemory/events-500-4            472.8Ki ±  0%
GetTimeline_InMemory/events-1000-4           944.3Ki ±  0%
GetTimeline_SQLite/events-10-4               16.74Ki ±  0%
GetTimeline_SQLite/events-50-4               87.14Ki ±  0%
GetTimeline_SQLite/events-100-4              175.4Ki ±  0%
GetTimeline_SQLite/events-500-4              846.1Ki ±  0%
GetTimeline_SQLite/events-1000-4             1.639Mi ±  0%
geomean                                      67.62Ki

                                   │ benchmark-results.txt │
                                   │       allocs/op       │
EventStoreAppend_InMemory-4                     7.000 ± 0%
EventStoreAppend_SQLite-4                       53.00 ± 0%
GetTimeline_InMemory/events-10-4                125.0 ± 0%
GetTimeline_InMemory/events-50-4                653.0 ± 0%
GetTimeline_InMemory/events-100-4              1.306k ± 0%
GetTimeline_InMemory/events-500-4              6.514k ± 0%
GetTimeline_InMemory/events-1000-4             13.02k ± 0%
GetTimeline_SQLite/events-10-4                  382.0 ± 0%
GetTimeline_SQLite/events-50-4                 1.852k ± 0%
GetTimeline_SQLite/events-100-4                3.681k ± 0%
GetTimeline_SQLite/events-500-4                18.54k ± 0%
GetTimeline_SQLite/events-1000-4               37.29k ± 0%
geomean                                        1.162k

Benchmarks run with go test -bench=. -benchmem -count=6.
Regressions ≥ 20% are flagged. Results compared via benchstat.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@intel352 intel352 force-pushed the feat/observability-wfctl-templates branch from 75dcfeb to 2bb4a44 Compare May 25, 2026 01:54
@intel352 intel352 merged commit c0e27c4 into main May 25, 2026
22 checks passed
@intel352 intel352 deleted the feat/observability-wfctl-templates branch May 25, 2026 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant