lightprometheusreceiver

package
v0.82.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

README

Light Prometheus Receiver

Status
Stability development
Supported pipeline types metrics
Distributions splunk

Overview

Light Prometheus Receiver is a component that can scrape Prometheus metrics from a Prometheus exporter endpoint and convert them to OTLP metrics. It is intended to be used as a replacement for the Simple Prometheus Receiver as it is more efficient and has a smaller memory footprint.

The receiver is under active development which means that configuration interface can change.

Configuration

The following settings are required:

  • endpoint (no default): Address to request Prometheus metrics. This is the same endpoint that Prometheus scrapes to collect metrics. IMPORTANT: This receiver currently does require the metric path to be included in the endpoint. For example, if the endpoint is localhost:1234, the metrics path must be included, e.g. localhost:1234/metrics. This likely will be changed in the future.

The following settings can be optionally configured:

  • collection_interval (default = 30s): The internal at which metrics should be scraped by this receiver.
  • resource_attributes: Resource attributes to be added to all metrics emitted by this receiver. The following options are available to configure resource attributes:
    • service.name:
      • enabled: (default: true)
    • service.instance.id:
      • enabled: (default: true)
    • net.host.name:
      • enabled: (default: false)
    • net.host.port:
      • enabled: (default: false)
    • http.scheme:
      • enabled: (default: false)
  • HTTP Client Configuration options

The full list of configuration options exposed for this receiver are documented here with an example here.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() receiver.Factory

Types

type Config

type Config struct {
	confighttp.HTTPClientSettings           `mapstructure:",squash"`
	scraperhelper.ScraperControllerSettings `mapstructure:",squash"`
	// ResourceAttributes that added to scraped metrics.
	ResourceAttributes ResourceAttributesConfig `mapstructure:"resource_attributes"`
}

func (*Config) Validate added in v0.76.0

func (cfg *Config) Validate() error

type ResourceAttributeConfig added in v0.76.0

type ResourceAttributeConfig struct {
	Enabled bool `mapstructure:"enabled"`
}

ResourceAttributeConfig provides configuration for a resource attribute.

type ResourceAttributesConfig added in v0.76.0

type ResourceAttributesConfig struct {
	ServiceName       ResourceAttributeConfig `mapstructure:"service.name"`
	ServiceInstanceID ResourceAttributeConfig `mapstructure:"service.instance.id"`
	NetHostName       ResourceAttributeConfig `mapstructure:"net.host.name"`
	NetHostPort       ResourceAttributeConfig `mapstructure:"net.host.port"`
	HTTPScheme        ResourceAttributeConfig `mapstructure:"http.scheme"`
}

ResourceAttributesConfig allows users to configure the resource attributes.

Jump to

Keyboard shortcuts

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