servicelogger

package
v1.120.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 11 Imported by: 1 module, 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

Index

Constants

View Source
const Dev = "dev"

Variables

This section is empty.

Functions

func EmptyLogger

func EmptyLogger() *log.Helper

func InitZapLogger

func InitZapLogger(env string) (log.Logger, error)

func LogAndMaskErr

func LogAndMaskErr(in error, logger *log.Helper) error

LogAndMaskErr records an error but masks it with a generic one to avoid leaking sensitive information

func ScopedHelper

func ScopedHelper(logger log.Logger, scope string) *log.Helper

ScopedHelper returns a new helper with information about the current component

func SentryBeforeSend added in v1.104.6

func SentryBeforeSend(event *sentry.Event, hint *sentry.EventHint) *sentry.Event

SentryBeforeSend enriches Sentry error events so issues are distinguishable at a glance and group deterministically by failure mode:

  • A structured discriminator extends Sentry's default fingerprint
  • A generic wrapper type on the primary exception is rewritten to the root-cause type
  • Tags expose the root-cause metadata for search

Events without an original error to analyze (messages, transactions) and errors without a structured discriminator are left untouched, preserving Sentry's default grouping. Joined multi-errors (errors.Join) also keep default grouping: bundling independent failures makes any single fingerprint misleading, though their metadata is tagged.

Types

This section is empty.

Jump to

Keyboard shortcuts

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