Skip to content

v0.4.0

Latest

Choose a tag to compare

@ranger-ross ranger-ross released this 27 Oct 13:10
c5a4b2a

What's Changed

This release is relatively large and contains breaking changes.

The primary change is adopting OpenTelemetry Semantic Conventions

The motivation is to use standardized metric names and labels to have better compatibility in the greater observability ecosystem. OTEL has become the defacto standard for web applications and most tools support OTEL semantic conventions.

This release contains multiple new metrics+labels:

Breaking Changes

  • Dropped http_requests_total
    • This is redundant with http.server.request.duration as the total count be be calculated by summing the buckets. If you are using the prometheus exporter you should have a http_server_request_duration_count which can be used as a direct replacement.
  • Renamed labels to follow OTEL semconv
    • endpoint -> http.route
    • method -> http.request.method
    • status -> http.response.status_code
    • http version (user defined, no default provided) -> network.protocol.version
    • NOTE: label names are still overridable.
  • Units in metric names (seconds / bytes) are moved to metrics.rs's unit system.
    • Exporters will now use this unit as needed. Though some exporters like the prometheus exporter require some configuration

Note about breakage

I am sorry about the breaking changes. I suggest testing any alerting/dashboards/ect when upgrading.
I am hopeful this will be the last big breaking change for this crate going forward.
Depending on when/if the metrics crate publishes a 1.0.0, I plan to publish a 1.0.0 for actix-web-metrics as I believe this crate is largely stable and production ready.

Full Changelog: v0.3.0...v0.4.0