event

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package event provides timestamped events that can be attached to trace spans.

Use this package to record significant occurrences during the execution of a traced operation. Events capture a point in time with a name and optional attributes for additional context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

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

Event represents a timestamped occurrence within a span.

func New

func New(name string, attrs ...*attribute.Attribute) *Event

New creates a new event with the given name and optional attributes.

func (*Event) Attributes

func (e *Event) Attributes() []*attribute.Attribute

Attributes returns a copy of the event's attributes.

func (*Event) Name

func (e *Event) Name() string

Name returns the event's name.

func (*Event) Timestamp

func (e *Event) Timestamp() time.Time

Timestamp returns when the event occurred.

Jump to

Keyboard shortcuts

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