cloudtrace

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: MIT Imports: 17 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 added in v0.1.0

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

func ProjectId added in v0.0.5

func ProjectId() string

func Setup added in v0.1.0

func Setup(opt ...tracelog.Option)

func TracerProviderOptions

func TracerProviderOptions(ctx context.Context, attrs ...attribute.KeyValue) ([]sdktrace.TracerProviderOption, error)

TracerProviderOptions returns a slice of TracerProviderOption for configuring the OpenTelemetry TracerProvider. Deprecated: use tracing.TracerProviderOptions instead.

func WithExporter added in v0.0.5

func WithExporter(projectId string) tracing.TracerProviderOption

func WithResource added in v0.0.5

func WithResource(attrs ...attribute.KeyValue) tracing.TracerProviderOption

func WithServiceName

func WithServiceName(name string) tracing.KeyValueOption

func WithVersion

func WithVersion(version string) tracing.KeyValueOption

Types

type LogEntryOperation added in v0.1.0

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 added in v0.1.0

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

type TracingContext added in v0.1.0

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

func Context added in v0.1.0

func Context(ctx context.Context) *TracingContext

func (*TracingContext) Dump added in v0.1.0

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

func (*TracingContext) WithTrace added in v0.1.0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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