telemetryplugin

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(cfg Config) error

Types

type Config

type Config struct {
	// Export even in the dev environment.
	ForceExport bool

	// The interval for exporting metric data.
	// The default is 60 seconds.
	MetricInterval time.Duration

	// The minimum level at which logs will be written.
	// Defaults to [slog.LevelInfo].
	LogLevel slog.Leveler
}

[START config]

type YourCustomHandler

type YourCustomHandler struct {
	Options *slog.HandlerOptions
}

func (YourCustomHandler) Enabled

Enabled implements slog.Handler.

func (YourCustomHandler) Handle

Handle implements slog.Handler.

func (YourCustomHandler) WithAttrs

func (y YourCustomHandler) WithAttrs(attrs []slog.Attr) slog.Handler

WithAttrs implements slog.Handler.

func (YourCustomHandler) WithGroup

func (y YourCustomHandler) WithGroup(name string) slog.Handler

WithGroup implements slog.Handler.

type YourCustomMetricExporter

type YourCustomMetricExporter struct{}

func (YourCustomMetricExporter) Aggregation

func (YourCustomMetricExporter) Export

func (YourCustomMetricExporter) ForceFlush

func (YourCustomMetricExporter) Shutdown

func (YourCustomMetricExporter) Temporality

type YourCustomSpanExporter

type YourCustomSpanExporter struct{}

func (YourCustomSpanExporter) ExportSpans

func (e YourCustomSpanExporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error

func (YourCustomSpanExporter) Shutdown

func (e YourCustomSpanExporter) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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