diff --git a/README.md b/README.md index d682a19..a7f1873 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ ## Deprecations / alternatives 1. Prometheus middleware has a new separate repository - https://github.com/labstack/echo-prometheus -2. Jaeger middleware is deprecated, use [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + [OTLP exporters](https://opentelemetry.io/docs/languages/go/exporters/). -3. Zipkin middleware is deprecated, use [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + [OTLP exporters](https://opentelemetry.io/docs/languages/go/exporters/). +2. Jaeger middleware is deprecated, use [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + [OTLP exporters](https://opentelemetry.io/docs/languages/go/exporters/). +3. Zipkin middleware is deprecated, use [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + [OTLP exporters](https://opentelemetry.io/docs/languages/go/exporters/). ## Usage diff --git a/echoprometheus/README.md b/echoprometheus/README.md index e7f3bb4..33bc5dc 100644 --- a/echoprometheus/README.md +++ b/echoprometheus/README.md @@ -1,6 +1,6 @@ # Usage -Deprecated: use new repository [echo-prometheus middleware](https://github.com/labstack/echo-prometheus) or [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters +Deprecated: use new repository [echo-prometheus middleware](https://github.com/labstack/echo-prometheus) or [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters ```go package main diff --git a/echoprometheus/prometheus.go b/echoprometheus/prometheus.go index cb275e0..5e4327a 100644 --- a/echoprometheus/prometheus.go +++ b/echoprometheus/prometheus.go @@ -4,7 +4,7 @@ /* Package echoprometheus provides middleware to add Prometheus metrics. -Deprecated: use new repository [echo-prometheus middleware](https://github.com/labstack/echo-prometheus) or [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters +Deprecated: use new repository [echo-prometheus middleware](https://github.com/labstack/echo-prometheus) or [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters */ package echoprometheus @@ -118,7 +118,7 @@ type PushGatewayConfig struct { // NewHandler creates new instance of Handler using Prometheus default registry. // -// Deprecated: use new repository [echo-prometheus middleware](https://github.com/labstack/echo-prometheus) or [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters +// Deprecated: use new repository [echo-prometheus middleware](https://github.com/labstack/echo-prometheus) or [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters func NewHandler() echo.HandlerFunc { return NewHandlerWithConfig(HandlerConfig{}) } @@ -142,14 +142,14 @@ func NewHandlerWithConfig(config HandlerConfig) echo.HandlerFunc { // NewMiddleware creates new instance of middleware using Prometheus default registry. // -// Deprecated: use new repository [echo-prometheus middleware](https://github.com/labstack/echo-prometheus) or [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters +// Deprecated: use new repository [echo-prometheus middleware](https://github.com/labstack/echo-prometheus) or [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters func NewMiddleware(subsystem string) echo.MiddlewareFunc { return NewMiddlewareWithConfig(MiddlewareConfig{Subsystem: subsystem}) } // NewMiddlewareWithConfig creates new instance of middleware using given configuration. // -// Deprecated: use [echo-prometheus middleware](https://github.com/labstack/echo-prometheus) or [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters +// Deprecated: use [echo-prometheus middleware](https://github.com/labstack/echo-prometheus) or [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters func NewMiddlewareWithConfig(config MiddlewareConfig) echo.MiddlewareFunc { mw, err := config.ToMiddleware() if err != nil { @@ -160,7 +160,7 @@ func NewMiddlewareWithConfig(config MiddlewareConfig) echo.MiddlewareFunc { // ToMiddleware converts configuration to middleware or returns an error. // -// Deprecated: use new repository [echo-prometheus middleware](https://github.com/labstack/echo-prometheus) or [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters +// Deprecated: use new repository [echo-prometheus middleware](https://github.com/labstack/echo-prometheus) or [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters func (conf MiddlewareConfig) ToMiddleware() (echo.MiddlewareFunc, error) { if conf.timeNow == nil { conf.timeNow = time.Now @@ -397,7 +397,7 @@ func computeApproximateRequestSize(r *http.Request) int { // // ``` // -// Deprecated: use new repository [echo-prometheus middleware](https://github.com/labstack/echo-prometheus) or [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters +// Deprecated: use new repository [echo-prometheus middleware](https://github.com/labstack/echo-prometheus) or [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters func RunPushGatewayGatherer(ctx context.Context, config PushGatewayConfig) error { if config.PushGatewayURL == "" { return errors.New("push gateway URL is missing") diff --git a/jaegertracing/jaegertracing.go b/jaegertracing/jaegertracing.go index a0ab3be..b8c3139 100644 --- a/jaegertracing/jaegertracing.go +++ b/jaegertracing/jaegertracing.go @@ -25,7 +25,7 @@ import ( ``` -Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters. Read this: https://github.com/jaegertracing/jaeger-client-go +Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters. Read this: https://github.com/jaegertracing/jaeger-client-go */ package jaegertracing @@ -93,7 +93,7 @@ var ( // New creates an Opentracing tracer and attaches it to Echo middleware. // Returns Closer do be added to caller function as `defer closer.Close()` // -// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters. Read this: https://github.com/jaegertracing/jaeger-client-go +// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters. Read this: https://github.com/jaegertracing/jaeger-client-go func New(e *echo.Echo, skipper middleware.Skipper) io.Closer { // Add Opentracing instrumentation defcfg := config.Configuration{ @@ -127,7 +127,7 @@ func New(e *echo.Echo, skipper middleware.Skipper) io.Closer { // Trace returns a Trace middleware. // Trace middleware traces http requests and reporting errors. // -// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters. Read this: https://github.com/jaegertracing/jaeger-client-go +// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters. Read this: https://github.com/jaegertracing/jaeger-client-go func Trace(tracer opentracing.Tracer) echo.MiddlewareFunc { c := DefaultTraceConfig c.Tracer = tracer @@ -138,7 +138,7 @@ func Trace(tracer opentracing.Tracer) echo.MiddlewareFunc { // TraceWithConfig returns a Trace middleware with config. // See: `Trace()`. // -// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters. Read this: https://github.com/jaegertracing/jaeger-client-go +// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters. Read this: https://github.com/jaegertracing/jaeger-client-go func TraceWithConfig(config TraceConfig) echo.MiddlewareFunc { if config.Tracer == nil { panic("echo: trace middleware requires opentracing tracer") @@ -288,7 +288,7 @@ func defaultOperationName(c *echo.Context) string { // TraceFunction wraps funtion with opentracing span adding tags for the function name and caller details // -// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters. Read this: https://github.com/jaegertracing/jaeger-client-go +// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters. Read this: https://github.com/jaegertracing/jaeger-client-go func TraceFunction(ctx *echo.Context, fn interface{}, params ...interface{}) (result []reflect.Value) { // Get function name name := runtime.FuncForPC(reflect.ValueOf(fn).Pointer()).Name() @@ -325,7 +325,7 @@ func TraceFunction(ctx *echo.Context, fn interface{}, params ...interface{}) (re // CreateChildSpan creates a new opentracing span adding tags for the span name and caller details. // User must call defer `sp.Finish()` // -// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters. Read this: https://github.com/jaegertracing/jaeger-client-go +// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters. Read this: https://github.com/jaegertracing/jaeger-client-go func CreateChildSpan(ctx *echo.Context, name string) opentracing.Span { parentSpan := opentracing.SpanFromContext(ctx.Request().Context()) sp := opentracing.StartSpan( @@ -346,7 +346,7 @@ func CreateChildSpan(ctx *echo.Context, name string) opentracing.Span { // NewTracedRequest generates a new traced HTTP request with opentracing headers injected into it // -// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters. Read this: https://github.com/jaegertracing/jaeger-client-go +// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters. Read this: https://github.com/jaegertracing/jaeger-client-go func NewTracedRequest(method string, url string, body io.Reader, span opentracing.Span) (*http.Request, error) { req, err := http.NewRequest(method, url, body) if err != nil { diff --git a/zipkintracing/README.md b/zipkintracing/README.md index 43e8579..84b41bf 100644 --- a/zipkintracing/README.md +++ b/zipkintracing/README.md @@ -1,6 +1,6 @@ # Tracing Library for Go -> Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters. Read this: https://github.com/openzipkin-contrib/zipkin-otel and https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter +> Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters. Read this: https://github.com/openzipkin-contrib/zipkin-otel and https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter > `Go app -> OTLP -> OpenTelemetry Collector -> Zipkin` This library provides tracing for go using [Zipkin](https://zipkin.io/) diff --git a/zipkintracing/tracing.go b/zipkintracing/tracing.go index caaadd1..456a705 100644 --- a/zipkintracing/tracing.go +++ b/zipkintracing/tracing.go @@ -52,7 +52,7 @@ var ( // DoHTTP is a http zipkin tracer implementation of HTTPDoer // -// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters. Read this: https://github.com/openzipkin-contrib/zipkin-otel and https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter +// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters. Read this: https://github.com/openzipkin-contrib/zipkin-otel and https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter func DoHTTP(c *echo.Context, r *http.Request, client *zipkinhttp.Client) (*http.Response, error) { req := r.WithContext(c.Request().Context()) return client.DoWithAppSpan(req, req.Method) @@ -60,7 +60,7 @@ func DoHTTP(c *echo.Context, r *http.Request, client *zipkinhttp.Client) (*http. // TraceFunc wraps function call with span so that we can trace time taken by func, eventContext only provided if we want to store trace headers // -// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters. Read this: https://github.com/openzipkin-contrib/zipkin-otel and https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter +// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters. Read this: https://github.com/openzipkin-contrib/zipkin-otel and https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter func TraceFunc(c *echo.Context, spanName string, spanTags Tags, tracer *zipkin.Tracer) func() { span, _ := tracer.StartSpanFromContext(c.Request().Context(), spanName) for key, value := range spanTags(c) { @@ -76,7 +76,7 @@ func TraceFunc(c *echo.Context, spanName string, spanTags Tags, tracer *zipkin.T // TraceProxy middleware that traces reverse proxy // -// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters. Read this: https://github.com/openzipkin-contrib/zipkin-otel and https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter +// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters. Read this: https://github.com/openzipkin-contrib/zipkin-otel and https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter func TraceProxy(tracer *zipkin.Tracer) echo.MiddlewareFunc { config := DefaultTraceProxyConfig config.Tracer = tracer @@ -85,7 +85,7 @@ func TraceProxy(tracer *zipkin.Tracer) echo.MiddlewareFunc { // TraceProxyWithConfig middleware that traces reverse proxy // -// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters. Read this: https://github.com/openzipkin-contrib/zipkin-otel and https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter +// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters. Read this: https://github.com/openzipkin-contrib/zipkin-otel and https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter func TraceProxyWithConfig(config TraceProxyConfig) echo.MiddlewareFunc { return func(next echo.HandlerFunc) echo.HandlerFunc { return func(c *echo.Context) error { @@ -125,7 +125,7 @@ func TraceProxyWithConfig(config TraceProxyConfig) echo.MiddlewareFunc { // TraceServer middleware that traces server calls // -// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters. Read this: https://github.com/openzipkin-contrib/zipkin-otel and https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter +// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters. Read this: https://github.com/openzipkin-contrib/zipkin-otel and https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter func TraceServer(tracer *zipkin.Tracer) echo.MiddlewareFunc { config := DefaultTraceServerConfig config.Tracer = tracer @@ -134,7 +134,7 @@ func TraceServer(tracer *zipkin.Tracer) echo.MiddlewareFunc { // TraceServerWithConfig middleware that traces server calls // -// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-opentelemetry) instead + OTLP exporters. Read this: https://github.com/openzipkin-contrib/zipkin-otel and https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter +// Deprecated: use [OpenTelemetry middleware](https://github.com/labstack/echo-otel) instead + OTLP exporters. Read this: https://github.com/openzipkin-contrib/zipkin-otel and https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/zipkinexporter func TraceServerWithConfig(config TraceServerConfig) echo.MiddlewareFunc { return func(next echo.HandlerFunc) echo.HandlerFunc { return func(c *echo.Context) error {