mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-10-14 05:18:54 +00:00
Add exerciseLatencyMetrics, proving the new upstream-latency histograms render correctly under the real Yaegi interpreter, not merely that a compiled go test accepts the same bytes. Compiled tests have repeatedly passed on this codebase while the interpreted shape failed, which is exactly what this probe caught: two bugs in the core feature commit, found and fixed only because this harness exists. Parse the rendered body with prometheus/common/expfmt's real TextParser, the same library a real Prometheus server's scrape loop uses, instead of this project's own hand-rolled parser. A malformed histogram fails to parse outright under a real parser, matching the failure mode a live scrape target actually hits, rather than merely failing one hand-written assertion. No new traffic is driven here: the existing exerciseAttemptAccounting sub-probe already posts one real, non-streaming chat completion against the openai provider, so the duration histogram already carries a real observation by the time this probe runs. Add github.com/prometheus/common/expfmt as a dependency of this harness module only, isolated from the plugin's own stdlib-only go.mod by design (this package's own doc comment). Go raised this module's go directive from 1.22 to 1.25.0 to satisfy the new dependency; the plugin module itself is untouched.
11 lines
939 B
Plaintext
11 lines
939 B
Plaintext
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
|
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
|
|
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
|
|
github.com/prometheus/common v0.70.1 h1:1HvjP4D5oL3t8RsPlwxA9onvvStjtIHYE5XuuwOi/PY=
|
|
github.com/prometheus/common v0.70.1/go.mod h1:VdFUQDMZK3VLkurFUVhia6uys/0suUp86TJz5qbJRhc=
|
|
github.com/traefik/yaegi v0.16.1 h1:f1De3DVJqIDKmnasUF6MwmWv1dSEEat0wcpXhD2On3E=
|
|
github.com/traefik/yaegi v0.16.1/go.mod h1:4eVhbPb3LnD2VigQjhYbEJ69vDRFdT2HQNrXx8eEwUY=
|
|
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
|
|
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|