Categorygithub.com/instana/go-sensor/instrumentation/instaecho
modulepackage
1.28.0
Repository: https://github.com/instana/go-sensor.git
Documentation: pkg.go.dev

# README

Instana instrumentation for Echo framework

This module contains middleware to instrument HTTP services written with github.com/labstack/echo.

PkgGoDev

Installation

To add the module to your go.mod file run the following command in your project directory:

$ go get github.com/instana/go-sensor/instrumentation/instaecho

Usage

// create an instana collector
collector := instana.InitCollector(&instana.Options{
    Service: "echo-app",
})

// init instrumented Echo
e := instaecho.New(collector)

// define API
e.GET("/foo", func(c echo.Context) error { /* ... */ })
// ...

Full example

# Functions

Middleware wraps Echo's handlers execution.
New returns an instrumented Echo.

# Constants

Version is the instrumentation module semantic version.