build

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPrometheusBlock

func NewPrometheusBlock(block *builder.Block, name []string, label string, summary string, detail string) prometheusBlock

Types

type PrometheusBlocks

type PrometheusBlocks struct {
	DiscoveryBlocks             []prometheusBlock
	DiscoveryRelabelBlocks      []prometheusBlock
	PrometheusScrapeBlocks      []prometheusBlock
	PrometheusRelabelBlocks     []prometheusBlock
	PrometheusRemoteWriteBlocks []prometheusBlock
}

PrometheusBlocks is a type for categorizing Alloy blocks before appending them to an Alloy file. This gives control over the order they are written versus appending them in the order the Blocks are created.

func NewPrometheusBlocks

func NewPrometheusBlocks() *PrometheusBlocks

func (*PrometheusBlocks) AppendToBody

func (pb *PrometheusBlocks) AppendToBody(body *builder.Body)

AppendToBody attaches prometheus blocks in a specific order.

Order of blocks: 1. Discovery component(s) 2. Discovery relabel component(s) (if any) 3. Prometheus scrape component(s) 4. Prometheus relabel component(s) (if any) 5. Prometheus remote_write

func (*PrometheusBlocks) GetScrapeInfo

func (pb *PrometheusBlocks) GetScrapeInfo() diag.Diagnostics

Jump to

Keyboard shortcuts

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