tracelog

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Operation = "logging.googleapis.com/operation"
	SpanId    = "logging.googleapis.com/spanId"
	Id        = "logging.googleapis.com/trace"
	Sampled   = "logging.googleapis.com/trace_sampled"
)

Variables

This section is empty.

Functions

func New

func New() func(ctx context.Context, req *http.Request) tracing.Tracing

func Setup

func Setup()

func WithTrace

func WithTrace(ctx context.Context, event *zerolog.Event) *zerolog.Event

Types

type LogEntryOperation

type LogEntryOperation struct {
	Id       string `json:"id"`
	Producer string `json:"producer,omitempty"`
	First    *bool  `json:"first,omitempty"`
	Last     *bool  `json:"last,omitempty"`
}

func (LogEntryOperation) MarshalZerologObject

func (o LogEntryOperation) MarshalZerologObject(e *zerolog.Event)

type TracingContext

type TracingContext struct {
	Path      string
	ClientIP  string
	RequestID string
	Service   string
	Producer  string
}

func (*TracingContext) Dump

func (tc *TracingContext) Dump(ctx context.Context, log *zerolog.Event) *zerolog.Event

func (*TracingContext) WithTrace

func (tc *TracingContext) WithTrace(ctx context.Context, event *zerolog.Event) *zerolog.Event

Jump to

Keyboard shortcuts

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