helpers

package
v0.0.0-...-a73014c Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddGormCallbacks

func AddGormCallbacks(db *gorm.DB, dbTracer *tracing.JaegerTracer)

AddGormCallbacks adds callbacks for tracing, you should call SetSpanToGorm to make them work

func GetChildSpanFromContext

func GetChildSpanFromContext(ctx context.Context, operation string, tags map[string]interface{}) (opentracing.Span, context.Context)

Creates a new operational child span from the golang context with attributes/tagging. Use this to create spans from existing go context object

func GetChildSpanFromGinContext

func GetChildSpanFromGinContext(c *gin.Context, operation string, tags map[string]interface{}) (opentracing.Span, context.Context)

Creates a new operational child span from the gin context with attributes/tagging. Use this to create spans from gin controllers

func SetSpanToGorm

func SetSpanToGorm(ctx context.Context, db *gorm.DB) *gorm.DB

SetSpanToGorm sets span to gorm settings, returns cloned DB

func StartRedisSpanFromContext

func StartRedisSpanFromContext(ctx context.Context, operation string, tags map[string]interface{}) (opentracing.Span, context.Context)

Creates a new operational child span from the golang context, specifically for redis operations

Types

This section is empty.

Jump to

Keyboard shortcuts

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