tracing

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 2 Imported by: 0

README

Open Tracing Context

Wrapping Service Dependencies with opentracing

Wraping Handler

This middleware wraps handler with opentracing context along with any identified request_id, path params, and query params.

handlerTracing := middleware.NewHandlerTracing()

r := chi.NewRouter()
r.Use(handlerTracing)

// put your routings below

Plase read middleware readme.md to know more about handler tracing middleware usage example.

Wraping go-redis

redisClient := redis.WrapRedisClient(ctx, redisClient)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FunctionName

func FunctionName() string

FunctionName get function name programmatically. It will return function name complete from the package and method receiver name. This function should called when you start span.

Do this: span, ctx := opentracing.StartSpanFromContext(ctx, FunctionName())

Instead of: span, ctx := opentracing.StartSpanFromContext(ctx, "Service.Brand.Create")

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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