src

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitPrometheus

func InitPrometheus()

func InitSentry

func InitSentry() func()

func InitTelemetry

func InitTelemetry()

Types

type LokiClient

type LokiClient struct {
	URL    string
	Client *http.Client
}

LokiClient handles sending log messages to Loki.

func NewLokiClient

func NewLokiClient(url string) *LokiClient

NewLokiClient creates a new instance of LokiClient.

func (*LokiClient) SendLog

func (c *LokiClient) SendLog(level, message string) error

type LokiLogEntry

type LokiLogEntry struct {
	Ts   string `json:"ts"`
	Line string `json:"line"`
}

type LokiPayload

type LokiPayload struct {
	Streams []LokiStream `json:"streams"`
}

type LokiStream

type LokiStream struct {
	Stream map[string]string `json:"stream"`
	Values [][]string        `json:"values"`
}

Jump to

Keyboard shortcuts

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