trace

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSafe

func NewSafe(repo trace.Repository, logger *slog.Logger) trace.Repository

NewSafe wraps a trace.Repository so that Save errors are logged as warnings instead of being returned. This prevents trace storage failures from affecting agent execution.

Types

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

Repository implements trace.Repository for GCS backend storage.

func New

func New(ctx context.Context, bucket string, opts ...option.ClientOption) (*Repository, error)

New creates a new GCS Trace Repository.

func (*Repository) Close

func (r *Repository) Close() error

Close closes the underlying GCS client.

func (*Repository) Save

func (r *Repository) Save(ctx context.Context, t *trace.Trace) error

Save persists trace data to GCS as JSON.

func (*Repository) WithPrefix

func (r *Repository) WithPrefix(prefix string) *Repository

WithPrefix sets the object prefix for trace data.

Jump to

Keyboard shortcuts

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