opentelemetry

package
v1.27.4 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 19 Imported by: 0

README

OpenTelemetry Output Plugin

This plugin sends metrics to OpenTelemetry servers and agents via gRPC.

Global configuration options

In addition to the plugin-specific configuration settings, plugins support additional global and plugin configuration settings. These settings are used to modify metrics, tags, and field or create aliases and configure ordering, etc. See the CONFIGURATION.md for more details.

Configuration

# Send OpenTelemetry metrics over gRPC
[[outputs.opentelemetry]]
  ## Override the default (localhost:4317) OpenTelemetry gRPC service
  ## address:port
  # service_address = "localhost:4317"

  ## Override the default (5s) request timeout
  # timeout = "5s"

  ## Optional TLS Config.
  ##
  ## Root certificates for verifying server certificates encoded in PEM format.
  # tls_ca = "/etc/telegraf/ca.pem"
  ## The public and private keypairs for the client encoded in PEM format.
  ## May contain intermediate certificates.
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"
  ## Use TLS, but skip TLS chain and host verification.
  # insecure_skip_verify = false
  ## Send the specified TLS server name via SNI.
  # tls_server_name = "foo.example.com"

  ## Override the default (gzip) compression used to send data.
  ## Supports: "gzip", "none"
  # compression = "gzip"

  ## Configuration options for the Coralogix dialect
  ## Enable the following section of you use this plugin with a Coralogix endpoint
  # [outputs.opentelemetry.coralogix]
  #   ## Your Coralogix private key (required).
  #   ## Please note that this is sensitive data!
  #   private_key = "your_coralogix_key"
  #
  #   ## Application and subsystem names for the metrics (required)
  #   application = "$NAMESPACE"
  #   subsystem = "$HOSTNAME"

  ## Additional OpenTelemetry resource attributes
  # [outputs.opentelemetry.attributes]
  # "service.name" = "demo"

  ## Additional gRPC request metadata
  # [outputs.opentelemetry.headers]
  # key1 = "value1"

Supported dialects

Coralogix

This plugins supports sending data to a Coralogix server by enabling the corresponding dialect by uncommenting the [output.opentelemetry.coralogix] section.

There, you can find the required setting to interact with the server.

  • The private_key is your Private Key, which you can find in Settings > Send Your Data.
  • The application, is your application name, which will be added to your metric attributes.
  • The subsystem, is your subsystem, which will be added to your metric attributes.

More information in the Getting Started page.

Schema

The InfluxDB->OpenTelemetry conversion schema and implementation are hosted on GitHub.

For metrics, two input schemata exist. Line protocol with measurement name prometheus is assumed to have a schema matching Prometheus input plugin when metric_version = 2. Line protocol with other measurement names is assumed to have schema matching Prometheus input plugin when metric_version = 1. If both schema assumptions fail, then the line protocol data is interpreted as:

  • Metric type = gauge (or counter, if indicated by the input plugin)
  • Metric name = [measurement]_[field key]
  • Metric value = line protocol field value, cast to float
  • Metric labels = line protocol tags

Also see the OpenTelemetry input plugin.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoralogixConfig added in v1.23.4

type CoralogixConfig struct {
	AppName    string `toml:"application"`
	SubSystem  string `toml:"subsystem"`
	PrivateKey string `toml:"private_key"`
}

type OpenTelemetry

type OpenTelemetry struct {
	ServiceAddress string `toml:"service_address"`

	tls.ClientConfig
	Timeout     config.Duration   `toml:"timeout"`
	Compression string            `toml:"compression"`
	Headers     map[string]string `toml:"headers"`
	Attributes  map[string]string `toml:"attributes"`
	Coralogix   *CoralogixConfig  `toml:"coralogix"`

	Log telegraf.Logger `toml:"-"`
	// contains filtered or unexported fields
}

func (*OpenTelemetry) Close

func (o *OpenTelemetry) Close() error

func (*OpenTelemetry) Connect

func (o *OpenTelemetry) Connect() error

func (*OpenTelemetry) SampleConfig

func (*OpenTelemetry) SampleConfig() string

func (*OpenTelemetry) Write

func (o *OpenTelemetry) Write(metrics []telegraf.Metric) error

Split metrics up by timestamp and send to Google Cloud Stackdriver

Jump to

Keyboard shortcuts

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