sentryutils

package
v2.0.54 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sentryutils reports Flyte operation counts and server-side failures to Sentry. The DSN is hardcoded and is not user configuration; DO_NOT_TRACK=1 opts out (FLYTE_DISABLE_TELEMETRY=true and the legacy FLYTE_DISABLE_SENTRY=true are honored too).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count

func Count(ctx context.Context, operation string, n int64)

Count records n successful occurrences of operation.

func Disabled

func Disabled() bool

Disabled honors the shared telemetry opt-out (DO_NOT_TRACK).

func Flush

func Flush()

Flush drains buffered events and metrics. Sentry sends async, so a service shutting down has to wait or lose whatever is still queued.

func Gauge added in v2.0.54

func Gauge(ctx context.Context, name string, value float64)

Gauge records the current value of the metric name. Unlike Count, each gauge is its own metric with no attributes. An empty name or a NaN or infinite value is dropped with a warning.

func Init

func Init(ctx context.Context, environment string) bool

Init initializes the process-wide Sentry client and reports whether reporting is on.

func Interceptor

func Interceptor(operations map[string]string) connect.UnaryInterceptorFunc

Interceptor counts one operation per call for each procedure in operations (keyed by procedure, valued by operation name) and reports server-side failures as exceptions. Client-caused errors (invalid argument, not found, ...) are intentionally not reported as exceptions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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