# README

Tracing

[!WARNING] Deprecated: This package is deprecated and will not be maintained.

Please use go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin instead.


This middleware provides tracing capabilities for your application.

It is based on the OpenTelmetry specification and can be used with any OpenTelemetry compatible tracing backend.

Usage Example

package main

import (
	"context"

	"github.com/gin-gonic/gin"

	"github.com/go-kratos-ecosystem/components/v2/gin/middleware/tracing"
)

func main() {
	router := gin.Default()
	router.Use(tracing.New())
	router.GET("/ping", func(c *gin.Context) {
		c.JSON(200, gin.H{
			"message": "pong",
		})
	})

	if err := router.Run(":8000"); err != nil {
		panic(err)
	}
}

# Functions

New returns a new tracing middleware.
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author