telemetry

package
v0.9.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureException

func CaptureException(err error, tags map[string]string, extra map[string]interface{})

CaptureException captures an exception with additional context

func CaptureMessage

func CaptureMessage(message string, level sentry.Level, tags map[string]string)

CaptureMessage captures a message with additional context

func Close

func Close()

Close closes the global telemetry client

func EndCommand

func EndCommand(command string, success bool, duration time.Duration)

EndCommand ends tracking a command for release health

func Initialize

func Initialize(segmentWriteKey, sentryDSN string)

Initialize sets up the global telemetry client

func StartCommand

func StartCommand(command string)

StartCommand starts tracking a command for release health

func StartTransaction

func StartTransaction(name, operation string) *sentry.Span

StartTransaction starts a Sentry transaction for performance monitoring

func Track

func Track(event string, properties map[string]interface{})

Track tracks custom events

func TrackCommand

func TrackCommand(command string, duration time.Duration, success bool)

TrackCommand tracks command execution

func TrackError

func TrackError(err error, command string, properties map[string]interface{})

TrackError tracks errors

func WrapCommand

func WrapCommand(cmd *cobra.Command, originalRun func(cmd *cobra.Command, args []string) error)

WrapCommand wraps a cobra command with telemetry tracking

func WrapCommandNoError

func WrapCommandNoError(cmd *cobra.Command, originalRun func(cmd *cobra.Command, args []string))

WrapCommandNoError wraps a cobra command that doesn't return an error

Types

type Client

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

func NewClient

func NewClient(userSegmentKey, userSentryDSN string) *Client

func (*Client) CaptureException

func (c *Client) CaptureException(err error, tags map[string]string, extra map[string]interface{})

CaptureException captures an exception with additional context

func (*Client) CaptureMessage

func (c *Client) CaptureMessage(message string, level sentry.Level, tags map[string]string)

CaptureMessage captures a message with additional context

func (*Client) Close

func (c *Client) Close()

func (*Client) EndCommand

func (c *Client) EndCommand(command string, success bool, duration time.Duration)

EndCommand ends tracking a command execution

func (*Client) StartCommand

func (c *Client) StartCommand(command string)

StartCommand starts tracking a command execution for release health

func (*Client) StartTransaction

func (c *Client) StartTransaction(name, operation string) *sentry.Span

StartTransaction starts a Sentry transaction for performance monitoring

func (*Client) Track

func (c *Client) Track(event string, properties map[string]interface{})

func (*Client) TrackCommand

func (c *Client) TrackCommand(command string, duration time.Duration, success bool)

func (*Client) TrackError

func (c *Client) TrackError(err error, command string, properties map[string]interface{})

Jump to

Keyboard shortcuts

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