Skip to content

v5.0.0

Latest

Choose a tag to compare

@vishr vishr released this 28 Sep 19:04
Immutable release. Only release title and notes can be modified.
v5.0.0
24685b4

First release under the new name. github.com/labstack/echo-otel/v5 is the OpenTelemetry middleware for Echo v5. It replaces github.com/labstack/echo-opentelemetry (v0.0.x), which is now deprecated.

go get github.com/labstack/echo-otel/v5

The MAJOR version tracks the Echo version, as in echo-jwt. For Echo v4, use github.com/labstack/echo-otel/v4 from the v4 branch.

Migrating from echo-opentelemetry

Change the import path to github.com/labstack/echo-otel/v5. The API is the same, except that a ServerName without a host (for example :8080) is now rejected. The README lists every telemetry change compared to v0.0.3: Migrating from echo-opentelemetry.

What's changed

  • error.type on spans and metrics, per the HTTP semantic conventions (#10).
    • 5xx responses report the status code.
    • Other errors report their Go type. fmt.Errorf wrappers are unwrapped, and an ErrorType() method is used when present.
    • 4xx responses are not errors.
  • http.route and the span name are set when the middleware is added with Echo.Pre. The route always comes from Echo.
  • Metrics carry only low-cardinality attributes. server.address, server.port and http.request.method_original stay on spans only.
  • A panic in a handler is recorded with error.type panic and then re-panicked.
  • Body sizes are no longer set on spans; the body size metrics stay. network.protocol.version is 2 for HTTP/2, not 2.0.
  • Semantic conventions v1.40.0 and OpenTelemetry v1.46.0. The minimum Echo version is still v5.2.1.
  • Migration guide from otelecho, which is deprecated and has been removed from opentelemetry-go-contrib.

Full Changelog: v0.0.3...v5.0.0