ginsentrytracing

package module
v0.0.0-...-f99867c Latest Latest
Warning

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

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

README

Distributed tracing for Gin with Sentry Go Reference

Example: _example/simple/main.go

Documentation

Index

Constants

Variables

This section is empty.

Functions

func AttachSpan

func AttachSpan(opts ...Options) gin.HandlerFunc

func FromHTTPStatusToSentryStatus

func FromHTTPStatusToSentryStatus(code int) sentry.SpanStatus

Convert HTTP Status to Sentry status, rewrite from Sentry Python SDK's tracing.py

func StartSpanFromGinContext

func StartSpanFromGinContext(ctx *gin.Context, op string) *sentry.Span

Types

type Option

type Option struct {
	GetTraceIDFromRequest func(*gin.Context) string
	GetBaggageFromRequest func(*gin.Context) string
}

func NewDefaultOption

func NewDefaultOption() *Option

type Options

type Options = func(*Option)

Directories

Path Synopsis
_example

Jump to

Keyboard shortcuts

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