feat: expose assault metrics via Micrometer/Prometheus (#46) - #51
Merged
Merged
Conversation
Add an optional quarkus-goblin-metrics module that surfaces the assault activity as Micrometer metrics on any backend: - new AssaultObserver SPI on the engine, notified on every recorded assault and on every active-state change (observers errors are never propagated); reused later by the OpenTelemetry and assertion work. - GoblinMetricsObserver bean registers goblin_active (functional gauge), goblin_assaults_total (counter, tags type+source) and goblin_latency_injected_seconds (latency histogram, tag source). - source tag derived from the history identifier: server, rest-client, webclient. Documentation: new metrics page, README sections, compatibility note and roadmap tick; integration tests cover the live Prometheus scrape.
Add dedicated engine unit tests showing that an observer throwing on notification never breaks recordAssault or setActive, and that healthy observers still receive their notifications alongside failing ones. Also clarify in the metrics docs that Micrometer names keep dots while the Prometheus export sanitizes them to underscores.
ErwanLT
deleted the
46-feat-expose-metrics-via-micrometer-prometheus
branch
September 22, 2026 06:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #46
Optional
quarkus-goblin-metricsmodule exposing the assault activity as Micrometer metrics.What's included
AssaultObserverSPI on the engine, notified on every recorded assault and on every active-state change. Observer failures are caught and never alter the request path — reused later by the OpenTelemetry (feat: OpenTelemetry tracing integration #47) and post-assault assertions (feat: post-assault assertions (resilience verification) #50) work.GoblinMetricsObserverbean registering:goblin_active— functional gauge overengine.isActive()(1/0),goblin_assaults_total— counter taggedtype+source(server,rest-client,webclient),goblin_latency_injected_seconds— latency histogram taggedsource(p99/min/max derivable from the_bucketseries).sourceis derived from the history identifier.PT1Sstep).metricspage, README sections, compatibility note, roadmap tick.Notes
quarkus-micrometer-registry-prometheusbecausequarkus-micrometeralone does not provide a backend._maxis interval-based by design (likehttp_server_requests_seconds_max); documented in the metrics page.Build verified:
./mvnw clean verify(runtime · runtime-dev · metrics · integration-tests · docs), formatter clean.