middleware

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EchoTracingMiddleware

func EchoTracingMiddleware() interface{}

EchoTracingMiddleware Echo 框架的追踪中间件

func ExtractTraceFromContext

func ExtractTraceFromContext(ctx context.Context) (traceID, spanID, requestID string)

ExtractTraceFromContext 从任意 context 提取追踪信息的辅助函数

func GinTracingMiddleware

func GinTracingMiddleware() interface{}

GinTracingMiddleware Gin 框架的追踪中间件 使用示例:

r := gin.Default()
r.Use(middleware.GinTracingMiddleware())

func TracingMiddleware

func TracingMiddleware(next http.Handler) http.Handler

TracingMiddleware HTTP 追踪中间件 自动为每个请求生成 trace_id 和 request_id,并注入到 context

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL