exporters

package
v0.0.0-...-c72a958 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDatadogContext

func GetDatadogContext(cfg *config.DatadogConfig) context.Context

Types

type DatadogMetricsExporter

type DatadogMetricsExporter struct {
	// contains filtered or unexported fields
}

func NewDatadogMetricsExporter

func NewDatadogMetricsExporter(
	datadogCtx context.Context,
	cfg *config.DatadogConfig,
	enableLogging bool,
) (*DatadogMetricsExporter, error)

Use GetDatadogContext to create a context with the Datadog API keys.

func (*DatadogMetricsExporter) EmitMetric

func (dme *DatadogMetricsExporter) EmitMetric(metric telemetry.MetricRecording) error

func (*DatadogMetricsExporter) RegisterMetric

func (dme *DatadogMetricsExporter) RegisterMetric(registration telemetry.MetricRegistration) error

No-op. No need to register metrics for the Datadog exporter. An exporter is managed through a MetricsRegistry in lspwatch, which takes care of managing enabled/disabled metrics from the config.

func (*DatadogMetricsExporter) Release

func (dme *DatadogMetricsExporter) Release() error

func (*DatadogMetricsExporter) SetGlobalTags

func (dme *DatadogMetricsExporter) SetGlobalTags(tags ...telemetry.Tag)

func (*DatadogMetricsExporter) Shutdown

func (dme *DatadogMetricsExporter) Shutdown() error

func (*DatadogMetricsExporter) Start

func (dme *DatadogMetricsExporter) Start() error

func (*DatadogMetricsExporter) Wait

func (dme *DatadogMetricsExporter) Wait()

type MetricsOTelExporter

type MetricsOTelExporter struct {
	// contains filtered or unexported fields
}

func (*MetricsOTelExporter) EmitMetric

func (ome *MetricsOTelExporter) EmitMetric(metricRecording telemetry.MetricRecording) error

func (*MetricsOTelExporter) RegisterMetric

func (ome *MetricsOTelExporter) RegisterMetric(registration telemetry.MetricRegistration) error

This method does not actually "register" the metric when called. It just stores the registration for later use. For some reason, in the OTel SDK you can only create instruments (e.g histogram recorders) after the exporter has "started". We should perhaps rework the metrics registry/exporter inteface to better suit this reality, but for now we will defer registration to the Start() method.

func (*MetricsOTelExporter) Release

func (ome *MetricsOTelExporter) Release() error

func (*MetricsOTelExporter) SetGlobalTags

func (ome *MetricsOTelExporter) SetGlobalTags(tags ...telemetry.Tag)

func (*MetricsOTelExporter) Shutdown

func (ome *MetricsOTelExporter) Shutdown() error

NOTE: Might have to rework this into invoking a function stored in the struct.

func (*MetricsOTelExporter) Start

func (ome *MetricsOTelExporter) Start() error

func (*MetricsOTelExporter) Wait

func (ome *MetricsOTelExporter) Wait()

Jump to

Keyboard shortcuts

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