tracing

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 17 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init added in v1.0.8

The `Init` function initializes an OpenTelemetry tracer with a specified configuration, exporter, and resource.

func Shutdown added in v1.2.0

func Shutdown(ctx context.Context, traceProvider *trace.TracerProvider)

Shutdown gracefully shuts down the trace provider, ensuring all spans are flushed.

Types

type Config added in v1.1.0

type Config struct {
	HostMetricsEnabled     bool          `json:"host_metrics_enabled"`     // HostMetricsEnabled specifies whether host metrics are enabled. Default is false.
	HostMetricsInterval    time.Duration `json:"host_metrics_interval"`    // HostMetricsInterval specifies the interval at which host metrics are collected. Default is 2 seconds.
	RuntimeMetricsEnabled  bool          `json:"runtime_metrics_enabled"`  // RuntimeMetricsEnabled specifies whether runtime metrics are enabled. Default is false.
	RuntimeMetricsInterval time.Duration `json:"runtime_metrics_interval"` // RuntimeMetricsInterval specifies the interval at which runtime metrics are collected. Default is 2 seconds.
}

The Config type is used to configure whether host metrics are enabled or not. @property {bool} HostMetricsEnabled - A boolean value that indicates whether host metrics are enabled or not.

Jump to

Keyboard shortcuts

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