sdmon

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: MIT Imports: 15 Imported by: 0

README

sdmon

Stackdriver Monitor (Internal Use)

Documentation

Overview

Package sdmon is the singleton for internal monitor to cloud operation

Index

Constants

Variables

This section is empty.

Functions

func Close

func Close()

Close closes clients

func Init

func Init(googleProjectID, serviceName, googleServiceAccountJSON string)

Init inits stack driver monitor

func Log

func Log(severity Severity, payload interface{})

Log logs payload, payload can be string or can marshal into json

func LogCritical

func LogCritical(payload interface{})

LogCritical logs payload with critical severity

func LogCriticalf

func LogCriticalf(s string, v ...interface{})

LogCriticalf logs string with critical severity

func LogDebug

func LogDebug(payload interface{})

LogDebug logs payload with debug severity

func LogDebugf

func LogDebugf(s string, v ...interface{})

LogDebugf logs string with debug severity

func LogError

func LogError(payload interface{})

LogError logs payload with error severity

func LogErrorf

func LogErrorf(s string, v ...interface{})

LogErrorf logs string with error severity

func LogInfo

func LogInfo(payload interface{})

LogInfo logs payload with info severity

func LogInfof

func LogInfof(s string, v ...interface{})

LogInfof logs string with info severity

func LogWarning

func LogWarning(payload interface{})

LogWarning logs payload with warning severity

func LogWarningf

func LogWarningf(s string, v ...interface{})

LogWarningf logs string with warning severity

func Logf

func Logf(severity Severity, s string, v ...interface{})

Logf logs string

func Report

func Report(err interface{}, r *http.Request, user string, stack []byte)

Report reports error (non-blocking) request, user, stack can be empty

func Reportf added in v0.1.3

func Reportf(format string, v ...interface{})

Reportf reports error (non-blocking) using fmt.Errorf

func Trace

func Trace(samplingProbability float64) func(h http.Handler) http.Handler

Trace returns trace middleware with given sampling probability (0-1)

Types

type Severity

type Severity logging.Severity

Jump to

Keyboard shortcuts

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