Releases: labstack/echo-otel
Release list
v5.0.0
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/v5The 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.typeon spans and metrics, per the HTTP semantic conventions (#10).- 5xx responses report the status code.
- Other errors report their Go type.
fmt.Errorfwrappers are unwrapped, and anErrorType()method is used when present. - 4xx responses are not errors.
http.routeand the span name are set when the middleware is added withEcho.Pre. The route always comes from Echo.- Metrics carry only low-cardinality attributes.
server.address,server.portandhttp.request.method_originalstay on spans only. - A panic in a handler is recorded with
error.typepanicand then re-panicked. - Body sizes are no longer set on spans; the body size metrics stay.
network.protocol.versionis2for HTTP/2, not2.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
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/v4It 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, setOnNextError: func(c echo.Context, err error) { c.Error(err) }.
v0.0.4 (deprecated)
Deprecated. This project is now labstack/echo-otel. Use:
github.com/labstack/echo-otel/v5for Echo v5github.com/labstack/echo-otel/v4for 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
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
- @suzuki-safie made their first contribution in #17
Full Changelog: v0.0.2...v0.0.3
fixed Span.Status handling
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
First release of OpenTelemetry middleware