extractmetricsprocessor

package module
v0.0.0-...-7fcf5b9 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 36 Imported by: 0

README

extracemetricsprocessor

This processor will, given rules obtained via a chqconfig extension, convert log content into metrics. this allows extracting time and other information from a defined log line shape, such as HTTP server logs or other common log outputs.

Computing metrics from logs often saves on log processing and storage costs while retaining the useful data they contain.

Configuration

processors:
  extractmetrics:
    configuration_extension: chqconfig
    route: someroute

exporters:
  route/someroute: {}

The route is a receiver that the generated metrics is sent to.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() processor.Factory

func OrgIdFromResource

func OrgIdFromResource(resource pcommon.Map) string

Types

type Config

type Config struct {
	confighttp.ClientConfig `mapstructure:",squash"`
	Route                   string        `mapstructure:"route"`
	ConfigurationExtension  *component.ID `mapstructure:"configuration_extension"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Emittable

type Emittable struct {
	MetricName string
	MetricType string            // e.g. "count", "gauge", "sum"
	Tags       map[string]string // flat map, includes resource + dp attrs
	IntervalMs int64             // unix ms timestamp
	Value      *float64
}

type ResourcesKey

type ResourcesKey struct {
	OrganizationID string
	ServiceName    string
	ClusterName    string
	NamespaceName  string
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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