Documentation ¶
Overview ¶
Example ¶
This example shows how to instrument an HTTP server that uses github.com/labstack/echo with Instana
sensor := instana.NewSensor("my-web-server") // Use instaecho.New() to create a new instance of Echo. The returned instance is instrumented // with Instana and will create an entry HTTP span for each incoming request. engine := instaecho.New(sensor) // Use the instrumented instance as usual engine.GET("/myendpoint", func(c echo.Context) error { return c.JSON(200, map[string]string{ "message": "pong", }) }) log.Fatalln(engine.Start(":0"))
Output:
Index ¶
Examples ¶
Constants ¶
View Source
const Version = "1.22.0"
Version is the instrumentation module semantic version
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
func Middleware(sensor instana.TracerLogger) echo.MiddlewareFunc
Middleware wraps Echo's handlers execution. Adds tracing context and handles entry span. It should be added as a first Middleware to the Echo, before defining handlers.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.