Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Latest commit

 

History

History
27 lines (24 loc) · 616 Bytes

README.md

File metadata and controls

27 lines (24 loc) · 616 Bytes

opentracing

Opentracing tracer for Hertz

Server usage

func main() {
    ...
    h := server.Default(server.WithTracer(hertz.NewTracer(ht, func(c *app.RequestContext) string {
        return "test.hertz.server" + "::" + c.FullPath()
    })))
    h.Use(hertz.ServerCtx())
    ...
}

Client usage

func main() {
    ...
    c, _ := client.NewClient()
    c.Use(hertz.ClientTraceMW, hertz.ClientCtx)
    ...
}

Example

Executable Example