resourcetotelemetry

package module
v0.96.0 Latest Latest
Warning

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

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

README

Resource to Telemetry

This is an exporter helper for converting resource attributes to telemetry attributes. This helper can be used to wrap other exporters.

⚠ This exporter helper should not be added to a service pipeline.

Configuration

The following configuration options can be modified:

  • resource_to_telemetry_conversion
    • enabled (default = false): If enabled is true, all the resource attributes will be converted to metric labels by default.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapMetricsExporter

func WrapMetricsExporter(set Settings, exporter exporter.Metrics) exporter.Metrics

WrapMetricsExporter wraps a given exporter.Metrics and based on the given settings converts incoming resource attributes to metrics attributes.

Types

type Settings

type Settings struct {
	// Enabled indicates whether to convert resource attributes to telemetry attributes. Default is `false`.
	Enabled bool `mapstructure:"enabled"`
}

Settings defines configuration for converting resource attributes to telemetry attributes. When used, it must be embedded in the exporter configuration:

type Config struct {
  // ...
  resourcetotelemetry.Settings `mapstructure:"resource_to_telemetry_conversion"`
}

Jump to

Keyboard shortcuts

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