Repository navigation
v2.2.0
Moves chapkit onto servicekit 3. HTTP metrics now come from FastAPI's built-in OpenTelemetry, and /metrics is on by default. Chapkit's own API is unchanged, but /metrics series names change for anyone scraping them.
Changed
- Requires
servicekit>=3.0.0,<4(previously>=2.0.3,<3), which brings infastapi>=0.142.2. servicekit 3 replacesopentelemetry-instrumentation-fastapiwith FastAPI's built-in OpenTelemetry. See the servicekit v3.0.0 release notes for the full list. (#128) - HTTP metric series on
/metricsare renamed to the stable OpenTelemetry semantic conventions:http_server_duration_milliseconds_*becomeshttp_server_request_duration_seconds_*, with labelshttp_request_method,http_response_status_codeandhttp_route. Durations are in seconds. - Monitoring is on by default. Every
ServiceBuilder/MLServiceBuilderservice exposes/metricseven without.with_monitoring(). Scaffolded projects already call it, so generated services behave the same. - Web console Monitoring page reads the new metric names for request rate and average latency, and still shows latency in ms.
Added
- OTLP export through FastAPI OpenTelemetry. Setting
OTEL_EXPORTER_OTLP_ENDPOINT(and optionallyOTEL_SERVICE_NAME) sends request traces, metrics and logs to an OpenTelemetry collector, in addition to Prometheus scraping.
Upgrading
- Model services: bump to
chapkit>=2.2.0,<3. No code changes needed. - Prometheus queries, Grafana panels and alerts on chapkit services need the new metric and label names. Millisecond thresholds must be divided by 1000.
- To expose no metrics endpoint, use
.with_monitoring(enabled=False). Removing the.with_monitoring()call no longer turns it off. - If a deployment sets
OTEL_*variables for other tools, the service will now export over OTLP too. Use.with_monitoring(enabled=False)orOTEL_SDK_DISABLED=trueif that is not wanted.
What's Changed
- chore: bump version to 2.2.0.dev0 by @mortenoh in #127
- chore: require servicekit 3 and read its HTTP metric names in the console by @mortenoh in #128
- chore: release 2.2.0 by @mortenoh in #129
Full Changelog: v2.1.3...v2.2.0