Skip to content

fix: remove custom metrics endpoint#780

Merged
intel352 merged 1 commit into
mainfrom
fix/remove-metrics-endpoint
May 25, 2026
Merged

fix: remove custom metrics endpoint#780
intel352 merged 1 commit into
mainfrom
fix/remove-metrics-endpoint

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

  • remove observability plugin wiring for the custom metrics HTTP endpoint
  • remove metricsPath, MetricsCollector.Handler, and MetricsHTTPHandler from the metrics collector surface
  • keep metrics collection available through MetricsCollector.Gather() for telemetry/export integration without exposing /metrics
  • remove stale /metrics registry, OpenAPI, Docker Compose, and Helm ServiceMonitor config

TDD proof

With production fix reverted and tests kept:

$ GOWORK=off go test ./plugins/observability ./module -run 'TestWiringHooks|TestModuleSchemasValidFields|TestReflectValidation_MetricsCollectorConfig|TestMetricsCollector_Gather' -count=1
FAIL — MetricsCollector.Gather undefined; metrics.collector schema still exposes metricsPath; WiringHooks count = 6, want 5

With fix restored:

$ GOWORK=off go test ./plugins/observability ./module -run 'TestWiringHooks|TestModuleSchemasValidFields|TestReflectValidation_MetricsCollectorConfig|TestMetricsCollector_Gather' -count=1
ok github.com/GoCodeAlone/workflow/plugins/observability
ok github.com/GoCodeAlone/workflow/module

Verification

$ GOWORK=off go test ./... -count=1
PASS

$ helm template workflow ./deploy/helm/workflow >/tmp/workflow-helm.yaml
PASS

$ rg -n '(/metrics|metricsPath|MetricsPath|metrics-endpoint|MetricsHTTPHandler|MetricsCollector\.Handler|promhttp|metrics endpoint|Prometheus metrics endpoint)' -S -g'*.go' -g'*.yaml' -g'*.yml' -g'*.json' module plugins schema cmd data deploy docs/openapi.yaml e2e_execution_test.go
only negative test assertions for metricsPath remain

@github-actions
Copy link
Copy Markdown

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:282: parsing iteration count: invalid syntax
baseline-bench.txt:289990: parsing iteration count: invalid syntax
baseline-bench.txt:683933: parsing iteration count: invalid syntax
baseline-bench.txt:1002597: parsing iteration count: invalid syntax
baseline-bench.txt:1324936: parsing iteration count: invalid syntax
baseline-bench.txt:1693814: parsing iteration count: invalid syntax
benchmark-results.txt:282: parsing iteration count: invalid syntax
benchmark-results.txt:333436: parsing iteration count: invalid syntax
benchmark-results.txt:667376: parsing iteration count: invalid syntax
benchmark-results.txt:988164: parsing iteration count: invalid syntax
benchmark-results.txt:1317577: parsing iteration count: invalid syntax
benchmark-results.txt:1642442: parsing iteration count: invalid syntax
goos: linux
goarch: amd64
pkg: github.com/GoCodeAlone/workflow/dynamic
cpu: AMD EPYC 9V74 80-Core Processor                
                            │ benchmark-results.txt │
                            │        sec/op         │
InterpreterCreation-4                  5.703m ± 76%
ComponentLoad-4                        3.481m ±  5%
ComponentExecute-4                     1.829µ ±  2%
PoolContention/workers-1-4             1.015µ ±  2%
PoolContention/workers-2-4             1.024µ ±  1%
PoolContention/workers-4-4             1.034µ ±  1%
PoolContention/workers-8-4             1.028µ ±  1%
PoolContention/workers-16-4            1.026µ ±  3%
ComponentLifecycle-4                   3.507m ±  1%
SourceValidation-4                     2.091µ ±  0%
RegistryConcurrent-4                   769.7n ±  5%
LoaderLoadFromString-4                 3.567m ±  1%
geomean                                17.51µ

                            │ 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

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                            │ baseline-bench.txt │
                            │       sec/op       │
InterpreterCreation-4               8.674m ± 65%
ComponentLoad-4                     3.454m ±  1%
ComponentExecute-4                  1.855µ ±  0%
PoolContention/workers-1-4          1.190µ ±  1%
PoolContention/workers-2-4          1.186µ ±  1%
PoolContention/workers-4-4          1.199µ ±  2%
PoolContention/workers-8-4          1.199µ ±  2%
PoolContention/workers-16-4         1.195µ ±  4%
ComponentLifecycle-4                3.506m ±  2%
SourceValidation-4                  2.286µ ±  1%
RegistryConcurrent-4                904.2n ±  7%
LoaderLoadFromString-4              3.553m ±  1%
geomean                             19.72µ

                            │ 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

pkg: github.com/GoCodeAlone/workflow/middleware
cpu: AMD EPYC 9V74 80-Core Processor                
                                  │ benchmark-results.txt │
                                  │        sec/op         │
CircuitBreakerDetection-4                     297.2n ± 3%
CircuitBreakerExecution_Success-4             22.68n ± 0%
CircuitBreakerExecution_Failure-4             70.93n ± 0%
geomean                                       78.19n

                                  │ 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

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                  │ baseline-bench.txt │
                                  │       sec/op       │
CircuitBreakerDetection-4                  451.5n ± 1%
CircuitBreakerExecution_Success-4          59.74n ± 0%
CircuitBreakerExecution_Failure-4          64.94n ± 0%
geomean                                    120.5n

                                  │ 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

pkg: github.com/GoCodeAlone/workflow/module
cpu: AMD EPYC 9V74 80-Core Processor                
                                 │ benchmark-results.txt │
                                 │        sec/op         │
IaCStateBackend_InProcess-4                 303.2n ±  2%
IaCStateBackend_GRPC-4                      10.22m ±  9%
JQTransform_Simple-4                        633.5n ± 34%
JQTransform_ObjectConstruction-4            1.442µ ±  1%
JQTransform_ArraySelect-4                   3.467µ ±  1%
JQTransform_Complex-4                       41.43µ ±  0%
JQTransform_Throughput-4                    1.782µ ±  1%
SSEPublishDelivery-4                        65.49n ±  1%
geomean                                     3.842µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
IaCStateBackend_InProcess-4                416.0 ±  0%
IaCStateBackend_GRPC-4                   5.772Mi ± 11%
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.862k ± 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
                                 │ baseline-bench.txt │
                                 │       sec/op       │
IaCStateBackend_InProcess-4              351.0n ± 26%
IaCStateBackend_GRPC-4                   9.792m ±  2%
JQTransform_Simple-4                     716.8n ± 29%
JQTransform_ObjectConstruction-4         1.524µ ±  1%
JQTransform_ArraySelect-4                3.272µ ±  1%
JQTransform_Complex-4                    36.46µ ±  1%
JQTransform_Throughput-4                 1.835µ ±  2%
SSEPublishDelivery-4                     76.30n ±  8%
geomean                                  3.978µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
IaCStateBackend_InProcess-4             416.0 ±  0%
IaCStateBackend_GRPC-4                5.693Mi ± 10%
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.878k ± 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                
                                    │ benchmark-results.txt │
                                    │        sec/op         │
SchemaValidation_Simple-4                      1.090µ ± 21%
SchemaValidation_AllFields-4                   1.639µ ±  5%
SchemaValidation_FormatValidation-4            1.581µ ±  1%
SchemaValidation_ManySchemas-4                 1.587µ ±  2%
geomean                                        1.455µ

                                    │ 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

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                    │ baseline-bench.txt │
                                    │       sec/op       │
SchemaValidation_Simple-4                   1.024µ ± 33%
SchemaValidation_AllFields-4                1.526µ ±  2%
SchemaValidation_FormatValidation-4         1.494µ ±  1%
SchemaValidation_ManySchemas-4              1.498µ ±  3%
geomean                                     1.367µ

                                    │ 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

pkg: github.com/GoCodeAlone/workflow/store
cpu: AMD EPYC 9V74 80-Core Processor                
                                   │ benchmark-results.txt │
                                   │        sec/op         │
EventStoreAppend_InMemory-4                   1.015µ ± 37%
EventStoreAppend_SQLite-4                     1.074m ±  2%
GetTimeline_InMemory/events-10-4              12.53µ ±  1%
GetTimeline_InMemory/events-50-4              69.38µ ±  2%
GetTimeline_InMemory/events-100-4             118.0µ ± 19%
GetTimeline_InMemory/events-500-4             560.0µ ±  1%
GetTimeline_InMemory/events-1000-4            1.139m ±  3%
GetTimeline_SQLite/events-10-4                84.82µ ±  2%
GetTimeline_SQLite/events-50-4                219.4µ ±  1%
GetTimeline_SQLite/events-100-4               381.4µ ±  0%
GetTimeline_SQLite/events-500-4               1.662m ±  0%
GetTimeline_SQLite/events-1000-4              3.226m ±  0%
geomean                                       193.3µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                    751.5 ± 10%
EventStoreAppend_SQLite-4                    1.985Ki ±  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.07Ki

                                   │ 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

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                   │ baseline-bench.txt │
                                   │       sec/op       │
EventStoreAppend_InMemory-4                1.126µ ± 16%
EventStoreAppend_SQLite-4                  1.078m ±  4%
GetTimeline_InMemory/events-10-4           13.11µ ±  4%
GetTimeline_InMemory/events-50-4           71.51µ ± 16%
GetTimeline_InMemory/events-100-4          116.1µ ±  1%
GetTimeline_InMemory/events-500-4          588.6µ ±  1%
GetTimeline_InMemory/events-1000-4         1.196m ±  1%
GetTimeline_SQLite/events-10-4             80.79µ ±  1%
GetTimeline_SQLite/events-50-4             233.0µ ±  3%
GetTimeline_SQLite/events-100-4            419.3µ ±  1%
GetTimeline_SQLite/events-500-4            1.862m ±  1%
GetTimeline_SQLite/events-1000-4           3.658m ±  1%
geomean                                    203.3µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                 830.5 ± 10%
EventStoreAppend_SQLite-4                 1.983Ki ±  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

                                   │ 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

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 merged commit e70ab55 into main May 25, 2026
29 checks passed
@intel352 intel352 deleted the fix/remove-metrics-endpoint branch May 25, 2026 09:15
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