Skip to content

Releases: labstack/echo-otel

v5.0.0

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

v4.0.0

Choose a tag to compare

@vishr vishr released this 28 Sep 19:04
Immutable release. Only release title and notes can be modified.
v4.0.0
6b31fe9

github.com/labstack/echo-otel/v4 is the OpenTelemetry middleware for Echo v4, maintained on the v4 branch.

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

It has the same API and telemetry as v5.0.0, with echo.Context. It is a drop-in path off the deprecated otelecho for applications that stay on Echo v4; see Migrating from otelecho.

  • The minimum Echo version is v4.15.4, the same as otelecho.
  • Status codes resolve the same way as Echo v4's DefaultHTTPErrorHandler (echootel.ResolveResponseStatus).
  • For a custom HTTPErrorHandler, set OnNextError: func(c echo.Context, err error) { c.Error(err) }.

v0.0.4 (deprecated)

Choose a tag to compare

@vishr vishr released this 28 Sep 19:04
Immutable release. Only release title and notes can be modified.
v0.0.4
847c77b

Deprecated. This project is now labstack/echo-otel. Use:

  • github.com/labstack/echo-otel/v5 for Echo v5
  • github.com/labstack/echo-otel/v4 for Echo v4

This release is v0.0.3 plus a // Deprecated: comment in go.mod, so go get -u and go list -m -u point to the new module paths. It contains no code changes. v0.0.1 to v0.0.3 stay available, and existing builds keep working.

v0.0.3

Choose a tag to compare

@aldas aldas released this 12 Jul 20:07
Immutable release. Only release title and notes can be modified.
3014fd5

What's Changed

  • Update deps by @aldas in #15
  • Leave span status unset for 4xx responses on server spans by @suzuki-safie in #17
  • bump dependency versions and library version by @aldas in #18

New Contributors

Full Changelog: v0.0.2...v0.0.3

fixed Span.Status handling

Choose a tag to compare

@aldas aldas released this 05 Mar 21:06
a137939

What's Changed

  • Improve docs by @aldas in #8
  • Added various Append* methods to Values struct to help preallocate/reuse attributes slice by @aldas in #9
  • Set span status to Error when http status is >= 500 by @vadimi in #12
  • Improve span status code handling and docs by @aldas in #13
  • bump version to 0.0.2 by @aldas in #14

New Contributors

Full Changelog: v0.0.1...v0.0.2

First release

Choose a tag to compare

@aldas aldas released this 18 Feb 09:49
b45ae8f

First release of OpenTelemetry middleware