metadata

package
v3.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsStability = component.StabilityLevelBeta
)

Variables

View Source
var (
	Type      = component.MustNewType("nginxplus")
	ScopeName = "otelcol/nginxplusreceiver"
)

MapAttributeNginxCacheOutcome is a helper map of string to AttributeNginxCacheOutcome attribute value.

MapAttributeNginxConnectionsOutcome is a helper map of string to AttributeNginxConnectionsOutcome attribute value.

View Source
var MapAttributeNginxHealthCheck = map[string]AttributeNginxHealthCheck{
	"UNHEALTHY": AttributeNginxHealthCheckUNHEALTHY,
	"FAIL":      AttributeNginxHealthCheckFAIL,
}

MapAttributeNginxHealthCheck is a helper map of string to AttributeNginxHealthCheck attribute value.

View Source
var MapAttributeNginxIoDirection = map[string]AttributeNginxIoDirection{
	"receive":  AttributeNginxIoDirectionReceive,
	"transmit": AttributeNginxIoDirectionTransmit,
}

MapAttributeNginxIoDirection is a helper map of string to AttributeNginxIoDirection attribute value.

MapAttributeNginxLimitConnOutcome is a helper map of string to AttributeNginxLimitConnOutcome attribute value.

MapAttributeNginxLimitReqOutcome is a helper map of string to AttributeNginxLimitReqOutcome attribute value.

MapAttributeNginxPeerState is a helper map of string to AttributeNginxPeerState attribute value.

MapAttributeNginxSlabSlotAllocationResult is a helper map of string to AttributeNginxSlabSlotAllocationResult attribute value.

MapAttributeNginxSslHandshakeReason is a helper map of string to AttributeNginxSslHandshakeReason attribute value.

View Source
var MapAttributeNginxSslStatus = map[string]AttributeNginxSslStatus{
	"FAILED": AttributeNginxSslStatusFAILED,
	"REUSE":  AttributeNginxSslStatusREUSE,
}

MapAttributeNginxSslStatus is a helper map of string to AttributeNginxSslStatus attribute value.

MapAttributeNginxSslVerifyFailureReason is a helper map of string to AttributeNginxSslVerifyFailureReason attribute value.

MapAttributeNginxStatusRange is a helper map of string to AttributeNginxStatusRange attribute value.

View Source
var MapAttributeNginxZoneType = map[string]AttributeNginxZoneType{
	"SERVER":   AttributeNginxZoneTypeSERVER,
	"LOCATION": AttributeNginxZoneTypeLOCATION,
}

MapAttributeNginxZoneType is a helper map of string to AttributeNginxZoneType attribute value.

View Source
var MetricsInfo = metricsInfo{
	NginxCacheBytesRead: metricInfo{
		Name: "nginx.cache.bytes_read",
	},
	NginxCacheMemoryLimit: metricInfo{
		Name: "nginx.cache.memory.limit",
	},
	NginxCacheMemoryUsage: metricInfo{
		Name: "nginx.cache.memory.usage",
	},
	NginxCacheResponses: metricInfo{
		Name: "nginx.cache.responses",
	},
	NginxConfigReloads: metricInfo{
		Name: "nginx.config.reloads",
	},
	NginxHTTPConnectionCount: metricInfo{
		Name: "nginx.http.connection.count",
	},
	NginxHTTPConnections: metricInfo{
		Name: "nginx.http.connections",
	},
	NginxHTTPLimitConnRequests: metricInfo{
		Name: "nginx.http.limit_conn.requests",
	},
	NginxHTTPLimitReqRequests: metricInfo{
		Name: "nginx.http.limit_req.requests",
	},
	NginxHTTPRequestCount: metricInfo{
		Name: "nginx.http.request.count",
	},
	NginxHTTPRequestDiscarded: metricInfo{
		Name: "nginx.http.request.discarded",
	},
	NginxHTTPRequestIo: metricInfo{
		Name: "nginx.http.request.io",
	},
	NginxHTTPRequestProcessingCount: metricInfo{
		Name: "nginx.http.request.processing.count",
	},
	NginxHTTPRequests: metricInfo{
		Name: "nginx.http.requests",
	},
	NginxHTTPResponseCount: metricInfo{
		Name: "nginx.http.response.count",
	},
	NginxHTTPResponseStatus: metricInfo{
		Name: "nginx.http.response.status",
	},
	NginxHTTPResponses: metricInfo{
		Name: "nginx.http.responses",
	},
	NginxHTTPUpstreamKeepaliveCount: metricInfo{
		Name: "nginx.http.upstream.keepalive.count",
	},
	NginxHTTPUpstreamPeerConnectionCount: metricInfo{
		Name: "nginx.http.upstream.peer.connection.count",
	},
	NginxHTTPUpstreamPeerCount: metricInfo{
		Name: "nginx.http.upstream.peer.count",
	},
	NginxHTTPUpstreamPeerFails: metricInfo{
		Name: "nginx.http.upstream.peer.fails",
	},
	NginxHTTPUpstreamPeerHeaderTime: metricInfo{
		Name: "nginx.http.upstream.peer.header.time",
	},
	NginxHTTPUpstreamPeerHealthChecks: metricInfo{
		Name: "nginx.http.upstream.peer.health_checks",
	},
	NginxHTTPUpstreamPeerIo: metricInfo{
		Name: "nginx.http.upstream.peer.io",
	},
	NginxHTTPUpstreamPeerRequests: metricInfo{
		Name: "nginx.http.upstream.peer.requests",
	},
	NginxHTTPUpstreamPeerResponseTime: metricInfo{
		Name: "nginx.http.upstream.peer.response.time",
	},
	NginxHTTPUpstreamPeerResponses: metricInfo{
		Name: "nginx.http.upstream.peer.responses",
	},
	NginxHTTPUpstreamPeerState: metricInfo{
		Name: "nginx.http.upstream.peer.state",
	},
	NginxHTTPUpstreamPeerUnavailables: metricInfo{
		Name: "nginx.http.upstream.peer.unavailables",
	},
	NginxHTTPUpstreamQueueLimit: metricInfo{
		Name: "nginx.http.upstream.queue.limit",
	},
	NginxHTTPUpstreamQueueOverflows: metricInfo{
		Name: "nginx.http.upstream.queue.overflows",
	},
	NginxHTTPUpstreamQueueUsage: metricInfo{
		Name: "nginx.http.upstream.queue.usage",
	},
	NginxHTTPUpstreamZombieCount: metricInfo{
		Name: "nginx.http.upstream.zombie.count",
	},
	NginxSlabPageFree: metricInfo{
		Name: "nginx.slab.page.free",
	},
	NginxSlabPageLimit: metricInfo{
		Name: "nginx.slab.page.limit",
	},
	NginxSlabPageUsage: metricInfo{
		Name: "nginx.slab.page.usage",
	},
	NginxSlabPageUtilization: metricInfo{
		Name: "nginx.slab.page.utilization",
	},
	NginxSlabSlotAllocations: metricInfo{
		Name: "nginx.slab.slot.allocations",
	},
	NginxSlabSlotFree: metricInfo{
		Name: "nginx.slab.slot.free",
	},
	NginxSlabSlotUsage: metricInfo{
		Name: "nginx.slab.slot.usage",
	},
	NginxSslCertificateVerifyFailures: metricInfo{
		Name: "nginx.ssl.certificate.verify_failures",
	},
	NginxSslHandshakes: metricInfo{
		Name: "nginx.ssl.handshakes",
	},
	NginxStreamConnectionAccepted: metricInfo{
		Name: "nginx.stream.connection.accepted",
	},
	NginxStreamConnectionDiscarded: metricInfo{
		Name: "nginx.stream.connection.discarded",
	},
	NginxStreamConnectionProcessingCount: metricInfo{
		Name: "nginx.stream.connection.processing.count",
	},
	NginxStreamIo: metricInfo{
		Name: "nginx.stream.io",
	},
	NginxStreamSessionStatus: metricInfo{
		Name: "nginx.stream.session.status",
	},
	NginxStreamUpstreamPeerConnectionCount: metricInfo{
		Name: "nginx.stream.upstream.peer.connection.count",
	},
	NginxStreamUpstreamPeerConnectionTime: metricInfo{
		Name: "nginx.stream.upstream.peer.connection.time",
	},
	NginxStreamUpstreamPeerConnections: metricInfo{
		Name: "nginx.stream.upstream.peer.connections",
	},
	NginxStreamUpstreamPeerCount: metricInfo{
		Name: "nginx.stream.upstream.peer.count",
	},
	NginxStreamUpstreamPeerFails: metricInfo{
		Name: "nginx.stream.upstream.peer.fails",
	},
	NginxStreamUpstreamPeerHealthChecks: metricInfo{
		Name: "nginx.stream.upstream.peer.health_checks",
	},
	NginxStreamUpstreamPeerIo: metricInfo{
		Name: "nginx.stream.upstream.peer.io",
	},
	NginxStreamUpstreamPeerResponseTime: metricInfo{
		Name: "nginx.stream.upstream.peer.response.time",
	},
	NginxStreamUpstreamPeerState: metricInfo{
		Name: "nginx.stream.upstream.peer.state",
	},
	NginxStreamUpstreamPeerTtfbTime: metricInfo{
		Name: "nginx.stream.upstream.peer.ttfb.time",
	},
	NginxStreamUpstreamPeerUnavailables: metricInfo{
		Name: "nginx.stream.upstream.peer.unavailables",
	},
	NginxStreamUpstreamZombieCount: metricInfo{
		Name: "nginx.stream.upstream.zombie.count",
	},
}

Functions

This section is empty.

Types

type AttributeNginxCacheOutcome

type AttributeNginxCacheOutcome int

AttributeNginxCacheOutcome specifies the value nginx.cache.outcome attribute.

const (
	AttributeNginxCacheOutcomeBYPASS AttributeNginxCacheOutcome
	AttributeNginxCacheOutcomeEXPIRED
	AttributeNginxCacheOutcomeHIT
	AttributeNginxCacheOutcomeMISS
	AttributeNginxCacheOutcomeREVALIDATED
	AttributeNginxCacheOutcomeSTALE
	AttributeNginxCacheOutcomeUPDATING
)

func (AttributeNginxCacheOutcome) String

func (av AttributeNginxCacheOutcome) String() string

String returns the string representation of the AttributeNginxCacheOutcome.

type AttributeNginxConnectionsOutcome

type AttributeNginxConnectionsOutcome int

AttributeNginxConnectionsOutcome specifies the value nginx.connections.outcome attribute.

const (
	AttributeNginxConnectionsOutcomeACCEPTED AttributeNginxConnectionsOutcome
	AttributeNginxConnectionsOutcomeACTIVE
	AttributeNginxConnectionsOutcomeDROPPED
	AttributeNginxConnectionsOutcomeIDLE
)

func (AttributeNginxConnectionsOutcome) String

String returns the string representation of the AttributeNginxConnectionsOutcome.

type AttributeNginxHealthCheck

type AttributeNginxHealthCheck int

AttributeNginxHealthCheck specifies the value nginx.health_check attribute.

const (
	AttributeNginxHealthCheckUNHEALTHY AttributeNginxHealthCheck
	AttributeNginxHealthCheckFAIL
)

func (AttributeNginxHealthCheck) String

func (av AttributeNginxHealthCheck) String() string

String returns the string representation of the AttributeNginxHealthCheck.

type AttributeNginxIoDirection

type AttributeNginxIoDirection int

AttributeNginxIoDirection specifies the value nginx.io.direction attribute.

const (
	AttributeNginxIoDirectionReceive AttributeNginxIoDirection
	AttributeNginxIoDirectionTransmit
)

func (AttributeNginxIoDirection) String

func (av AttributeNginxIoDirection) String() string

String returns the string representation of the AttributeNginxIoDirection.

type AttributeNginxLimitConnOutcome

type AttributeNginxLimitConnOutcome int

AttributeNginxLimitConnOutcome specifies the value nginx.limit_conn.outcome attribute.

const (
	AttributeNginxLimitConnOutcomePASSED AttributeNginxLimitConnOutcome
	AttributeNginxLimitConnOutcomeREJECTED
	AttributeNginxLimitConnOutcomeREJECTEDDRYRUN
)

func (AttributeNginxLimitConnOutcome) String

String returns the string representation of the AttributeNginxLimitConnOutcome.

type AttributeNginxLimitReqOutcome

type AttributeNginxLimitReqOutcome int

AttributeNginxLimitReqOutcome specifies the value nginx.limit_req.outcome attribute.

const (
	AttributeNginxLimitReqOutcomePASSED AttributeNginxLimitReqOutcome
	AttributeNginxLimitReqOutcomeREJECTED
	AttributeNginxLimitReqOutcomeREJECTEDDRYRUN
	AttributeNginxLimitReqOutcomeDELAYED
	AttributeNginxLimitReqOutcomeDELAYEDDRYRUN
)

func (AttributeNginxLimitReqOutcome) String

String returns the string representation of the AttributeNginxLimitReqOutcome.

type AttributeNginxPeerState

type AttributeNginxPeerState int

AttributeNginxPeerState specifies the value nginx.peer.state attribute.

const (
	AttributeNginxPeerStateCHECKING AttributeNginxPeerState
	AttributeNginxPeerStateDOWN
	AttributeNginxPeerStateDRAINING
	AttributeNginxPeerStateUNAVAILABLE
	AttributeNginxPeerStateUNHEALTHY
	AttributeNginxPeerStateUP
)

func (AttributeNginxPeerState) String

func (av AttributeNginxPeerState) String() string

String returns the string representation of the AttributeNginxPeerState.

type AttributeNginxSlabSlotAllocationResult

type AttributeNginxSlabSlotAllocationResult int

AttributeNginxSlabSlotAllocationResult specifies the value nginx.slab.slot.allocation.result attribute.

const (
	AttributeNginxSlabSlotAllocationResultFAILURE AttributeNginxSlabSlotAllocationResult
	AttributeNginxSlabSlotAllocationResultSUCCESS
)

func (AttributeNginxSlabSlotAllocationResult) String

String returns the string representation of the AttributeNginxSlabSlotAllocationResult.

type AttributeNginxSslHandshakeReason

type AttributeNginxSslHandshakeReason int

AttributeNginxSslHandshakeReason specifies the value nginx.ssl.handshake.reason attribute.

const (
	AttributeNginxSslHandshakeReasonNOCOMMONPROTOCOL AttributeNginxSslHandshakeReason
	AttributeNginxSslHandshakeReasonNOCOMMONCIPHER
	AttributeNginxSslHandshakeReasonTIMEOUT
	AttributeNginxSslHandshakeReasonCERTREJECTED
)

func (AttributeNginxSslHandshakeReason) String

String returns the string representation of the AttributeNginxSslHandshakeReason.

type AttributeNginxSslStatus

type AttributeNginxSslStatus int

AttributeNginxSslStatus specifies the value nginx.ssl.status attribute.

const (
	AttributeNginxSslStatusFAILED AttributeNginxSslStatus
	AttributeNginxSslStatusREUSE
)

func (AttributeNginxSslStatus) String

func (av AttributeNginxSslStatus) String() string

String returns the string representation of the AttributeNginxSslStatus.

type AttributeNginxSslVerifyFailureReason

type AttributeNginxSslVerifyFailureReason int

AttributeNginxSslVerifyFailureReason specifies the value nginx.ssl.verify_failure.reason attribute.

const (
	AttributeNginxSslVerifyFailureReasonNOCERT AttributeNginxSslVerifyFailureReason
	AttributeNginxSslVerifyFailureReasonEXPIREDCERT
	AttributeNginxSslVerifyFailureReasonREVOKEDCERT
	AttributeNginxSslVerifyFailureReasonHOSTNAMEMISMATCH
	AttributeNginxSslVerifyFailureReasonOTHER
)

func (AttributeNginxSslVerifyFailureReason) String

String returns the string representation of the AttributeNginxSslVerifyFailureReason.

type AttributeNginxStatusRange

type AttributeNginxStatusRange int

AttributeNginxStatusRange specifies the value nginx.status_range attribute.

const (
	AttributeNginxStatusRange1xx AttributeNginxStatusRange
	AttributeNginxStatusRange2xx
	AttributeNginxStatusRange3xx
	AttributeNginxStatusRange4xx
	AttributeNginxStatusRange5xx
)

func (AttributeNginxStatusRange) String

func (av AttributeNginxStatusRange) String() string

String returns the string representation of the AttributeNginxStatusRange.

type AttributeNginxZoneType

type AttributeNginxZoneType int

AttributeNginxZoneType specifies the value nginx.zone.type attribute.

const (
	AttributeNginxZoneTypeSERVER AttributeNginxZoneType
	AttributeNginxZoneTypeLOCATION
)

func (AttributeNginxZoneType) String

func (av AttributeNginxZoneType) String() string

String returns the string representation of the AttributeNginxZoneType.

type MetricBuilderOption

type MetricBuilderOption interface {
	// contains filtered or unexported methods
}

MetricBuilderOption applies changes to default metrics builder.

func WithStartTime

func WithStartTime(startTime pcommon.Timestamp) MetricBuilderOption

WithStartTime sets startTime on the metrics builder.

type MetricConfig

type MetricConfig struct {
	Enabled bool `mapstructure:"enabled"`
	// contains filtered or unexported fields
}

MetricConfig provides common config for a particular metric.

func (*MetricConfig) Unmarshal

func (ms *MetricConfig) Unmarshal(parser *confmap.Conf) error

type MetricsBuilder

type MetricsBuilder struct {
	// contains filtered or unexported fields
}

MetricsBuilder provides an interface for scrapers to report metrics while taking care of all the transformations required to produce metric representation defined in metadata and user config.

func NewMetricsBuilder

func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.Settings, options ...MetricBuilderOption) *MetricsBuilder

func (*MetricsBuilder) Emit

func (mb *MetricsBuilder) Emit(options ...ResourceMetricsOption) pmetric.Metrics

Emit returns all the metrics accumulated by the metrics builder and updates the internal state to be ready for recording another set of metrics. This function will be responsible for applying all the transformations required to produce metric representation defined in metadata and user config, e.g. delta or cumulative.

func (*MetricsBuilder) EmitForResource

func (mb *MetricsBuilder) EmitForResource(options ...ResourceMetricsOption)

EmitForResource saves all the generated metrics under a new resource and updates the internal state to be ready for recording another set of data points as part of another resource. This function can be helpful when one scraper needs to emit metrics from several resources. Otherwise calling this function is not required, just `Emit` function can be called instead. Resource attributes should be provided as ResourceMetricsOption arguments.

func (*MetricsBuilder) NewResourceBuilder

func (mb *MetricsBuilder) NewResourceBuilder() *ResourceBuilder

NewResourceBuilder returns a new resource builder that should be used to build a resource associated with for the emitted metrics.

func (*MetricsBuilder) RecordNginxCacheBytesReadDataPoint

func (mb *MetricsBuilder) RecordNginxCacheBytesReadDataPoint(ts pcommon.Timestamp, val int64, nginxCacheOutcomeAttributeValue AttributeNginxCacheOutcome, nginxCacheNameAttributeValue string)

RecordNginxCacheBytesReadDataPoint adds a data point to nginx.cache.bytes_read metric.

func (*MetricsBuilder) RecordNginxCacheMemoryLimitDataPoint

func (mb *MetricsBuilder) RecordNginxCacheMemoryLimitDataPoint(ts pcommon.Timestamp, val int64, nginxCacheNameAttributeValue string)

RecordNginxCacheMemoryLimitDataPoint adds a data point to nginx.cache.memory.limit metric.

func (*MetricsBuilder) RecordNginxCacheMemoryUsageDataPoint

func (mb *MetricsBuilder) RecordNginxCacheMemoryUsageDataPoint(ts pcommon.Timestamp, val int64, nginxCacheNameAttributeValue string)

RecordNginxCacheMemoryUsageDataPoint adds a data point to nginx.cache.memory.usage metric.

func (*MetricsBuilder) RecordNginxCacheResponsesDataPoint

func (mb *MetricsBuilder) RecordNginxCacheResponsesDataPoint(ts pcommon.Timestamp, val int64, nginxCacheOutcomeAttributeValue AttributeNginxCacheOutcome, nginxCacheNameAttributeValue string)

RecordNginxCacheResponsesDataPoint adds a data point to nginx.cache.responses metric.

func (*MetricsBuilder) RecordNginxConfigReloadsDataPoint

func (mb *MetricsBuilder) RecordNginxConfigReloadsDataPoint(ts pcommon.Timestamp, val int64)

RecordNginxConfigReloadsDataPoint adds a data point to nginx.config.reloads metric.

func (*MetricsBuilder) RecordNginxHTTPConnectionCountDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPConnectionCountDataPoint(ts pcommon.Timestamp, val int64, nginxConnectionsOutcomeAttributeValue AttributeNginxConnectionsOutcome)

RecordNginxHTTPConnectionCountDataPoint adds a data point to nginx.http.connection.count metric.

func (*MetricsBuilder) RecordNginxHTTPConnectionsDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPConnectionsDataPoint(ts pcommon.Timestamp, val int64, nginxConnectionsOutcomeAttributeValue AttributeNginxConnectionsOutcome)

RecordNginxHTTPConnectionsDataPoint adds a data point to nginx.http.connections metric.

func (*MetricsBuilder) RecordNginxHTTPLimitConnRequestsDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPLimitConnRequestsDataPoint(ts pcommon.Timestamp, val int64, nginxLimitConnOutcomeAttributeValue AttributeNginxLimitConnOutcome, nginxZoneNameAttributeValue string)

RecordNginxHTTPLimitConnRequestsDataPoint adds a data point to nginx.http.limit_conn.requests metric.

func (*MetricsBuilder) RecordNginxHTTPLimitReqRequestsDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPLimitReqRequestsDataPoint(ts pcommon.Timestamp, val int64, nginxLimitReqOutcomeAttributeValue AttributeNginxLimitReqOutcome, nginxZoneNameAttributeValue string)

RecordNginxHTTPLimitReqRequestsDataPoint adds a data point to nginx.http.limit_req.requests metric.

func (*MetricsBuilder) RecordNginxHTTPRequestCountDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPRequestCountDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxZoneTypeAttributeValue AttributeNginxZoneType)

RecordNginxHTTPRequestCountDataPoint adds a data point to nginx.http.request.count metric.

func (*MetricsBuilder) RecordNginxHTTPRequestDiscardedDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPRequestDiscardedDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxZoneTypeAttributeValue AttributeNginxZoneType)

RecordNginxHTTPRequestDiscardedDataPoint adds a data point to nginx.http.request.discarded metric.

func (*MetricsBuilder) RecordNginxHTTPRequestIoDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPRequestIoDataPoint(ts pcommon.Timestamp, val int64, nginxIoDirectionAttributeValue AttributeNginxIoDirection, nginxZoneNameAttributeValue string, nginxZoneTypeAttributeValue AttributeNginxZoneType)

RecordNginxHTTPRequestIoDataPoint adds a data point to nginx.http.request.io metric.

func (*MetricsBuilder) RecordNginxHTTPRequestProcessingCountDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPRequestProcessingCountDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxZoneTypeAttributeValue AttributeNginxZoneType)

RecordNginxHTTPRequestProcessingCountDataPoint adds a data point to nginx.http.request.processing.count metric.

func (*MetricsBuilder) RecordNginxHTTPRequestsDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPRequestsDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxZoneTypeAttributeValue AttributeNginxZoneType)

RecordNginxHTTPRequestsDataPoint adds a data point to nginx.http.requests metric.

func (*MetricsBuilder) RecordNginxHTTPResponseCountDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPResponseCountDataPoint(ts pcommon.Timestamp, val int64, nginxStatusRangeAttributeValue AttributeNginxStatusRange, nginxZoneNameAttributeValue string, nginxZoneTypeAttributeValue AttributeNginxZoneType)

RecordNginxHTTPResponseCountDataPoint adds a data point to nginx.http.response.count metric.

func (*MetricsBuilder) RecordNginxHTTPResponseStatusDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPResponseStatusDataPoint(ts pcommon.Timestamp, val int64, nginxStatusRangeAttributeValue AttributeNginxStatusRange, nginxZoneNameAttributeValue string, nginxZoneTypeAttributeValue AttributeNginxZoneType)

RecordNginxHTTPResponseStatusDataPoint adds a data point to nginx.http.response.status metric.

func (*MetricsBuilder) RecordNginxHTTPResponsesDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPResponsesDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxZoneTypeAttributeValue AttributeNginxZoneType)

RecordNginxHTTPResponsesDataPoint adds a data point to nginx.http.responses metric.

func (*MetricsBuilder) RecordNginxHTTPUpstreamKeepaliveCountDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPUpstreamKeepaliveCountDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string)

RecordNginxHTTPUpstreamKeepaliveCountDataPoint adds a data point to nginx.http.upstream.keepalive.count metric.

func (*MetricsBuilder) RecordNginxHTTPUpstreamPeerConnectionCountDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPUpstreamPeerConnectionCountDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxHTTPUpstreamPeerConnectionCountDataPoint adds a data point to nginx.http.upstream.peer.connection.count metric.

func (*MetricsBuilder) RecordNginxHTTPUpstreamPeerCountDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPUpstreamPeerCountDataPoint(ts pcommon.Timestamp, val int64, nginxPeerStateAttributeValue AttributeNginxPeerState, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string)

RecordNginxHTTPUpstreamPeerCountDataPoint adds a data point to nginx.http.upstream.peer.count metric.

func (*MetricsBuilder) RecordNginxHTTPUpstreamPeerFailsDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPUpstreamPeerFailsDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxHTTPUpstreamPeerFailsDataPoint adds a data point to nginx.http.upstream.peer.fails metric.

func (*MetricsBuilder) RecordNginxHTTPUpstreamPeerHeaderTimeDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPUpstreamPeerHeaderTimeDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxHTTPUpstreamPeerHeaderTimeDataPoint adds a data point to nginx.http.upstream.peer.header.time metric.

func (*MetricsBuilder) RecordNginxHTTPUpstreamPeerHealthChecksDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPUpstreamPeerHealthChecksDataPoint(ts pcommon.Timestamp, val int64, nginxHealthCheckAttributeValue AttributeNginxHealthCheck, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxHTTPUpstreamPeerHealthChecksDataPoint adds a data point to nginx.http.upstream.peer.health_checks metric.

func (*MetricsBuilder) RecordNginxHTTPUpstreamPeerIoDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPUpstreamPeerIoDataPoint(ts pcommon.Timestamp, val int64, nginxIoDirectionAttributeValue AttributeNginxIoDirection, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxHTTPUpstreamPeerIoDataPoint adds a data point to nginx.http.upstream.peer.io metric.

func (*MetricsBuilder) RecordNginxHTTPUpstreamPeerRequestsDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPUpstreamPeerRequestsDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxHTTPUpstreamPeerRequestsDataPoint adds a data point to nginx.http.upstream.peer.requests metric.

func (*MetricsBuilder) RecordNginxHTTPUpstreamPeerResponseTimeDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPUpstreamPeerResponseTimeDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxHTTPUpstreamPeerResponseTimeDataPoint adds a data point to nginx.http.upstream.peer.response.time metric.

func (*MetricsBuilder) RecordNginxHTTPUpstreamPeerResponsesDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPUpstreamPeerResponsesDataPoint(ts pcommon.Timestamp, val int64, nginxStatusRangeAttributeValue AttributeNginxStatusRange, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxHTTPUpstreamPeerResponsesDataPoint adds a data point to nginx.http.upstream.peer.responses metric.

func (*MetricsBuilder) RecordNginxHTTPUpstreamPeerStateDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPUpstreamPeerStateDataPoint(ts pcommon.Timestamp, val int64, nginxPeerStateAttributeValue AttributeNginxPeerState, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxHTTPUpstreamPeerStateDataPoint adds a data point to nginx.http.upstream.peer.state metric.

func (*MetricsBuilder) RecordNginxHTTPUpstreamPeerUnavailablesDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPUpstreamPeerUnavailablesDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxHTTPUpstreamPeerUnavailablesDataPoint adds a data point to nginx.http.upstream.peer.unavailables metric.

func (*MetricsBuilder) RecordNginxHTTPUpstreamQueueLimitDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPUpstreamQueueLimitDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string)

RecordNginxHTTPUpstreamQueueLimitDataPoint adds a data point to nginx.http.upstream.queue.limit metric.

func (*MetricsBuilder) RecordNginxHTTPUpstreamQueueOverflowsDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPUpstreamQueueOverflowsDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string)

RecordNginxHTTPUpstreamQueueOverflowsDataPoint adds a data point to nginx.http.upstream.queue.overflows metric.

func (*MetricsBuilder) RecordNginxHTTPUpstreamQueueUsageDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPUpstreamQueueUsageDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string)

RecordNginxHTTPUpstreamQueueUsageDataPoint adds a data point to nginx.http.upstream.queue.usage metric.

func (*MetricsBuilder) RecordNginxHTTPUpstreamZombieCountDataPoint

func (mb *MetricsBuilder) RecordNginxHTTPUpstreamZombieCountDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string)

RecordNginxHTTPUpstreamZombieCountDataPoint adds a data point to nginx.http.upstream.zombie.count metric.

func (*MetricsBuilder) RecordNginxSlabPageFreeDataPoint

func (mb *MetricsBuilder) RecordNginxSlabPageFreeDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string)

RecordNginxSlabPageFreeDataPoint adds a data point to nginx.slab.page.free metric.

func (*MetricsBuilder) RecordNginxSlabPageLimitDataPoint

func (mb *MetricsBuilder) RecordNginxSlabPageLimitDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string)

RecordNginxSlabPageLimitDataPoint adds a data point to nginx.slab.page.limit metric.

func (*MetricsBuilder) RecordNginxSlabPageUsageDataPoint

func (mb *MetricsBuilder) RecordNginxSlabPageUsageDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string)

RecordNginxSlabPageUsageDataPoint adds a data point to nginx.slab.page.usage metric.

func (*MetricsBuilder) RecordNginxSlabPageUtilizationDataPoint

func (mb *MetricsBuilder) RecordNginxSlabPageUtilizationDataPoint(ts pcommon.Timestamp, val float64, nginxZoneNameAttributeValue string)

RecordNginxSlabPageUtilizationDataPoint adds a data point to nginx.slab.page.utilization metric.

func (*MetricsBuilder) RecordNginxSlabSlotAllocationsDataPoint

func (mb *MetricsBuilder) RecordNginxSlabSlotAllocationsDataPoint(ts pcommon.Timestamp, val int64, nginxSlabSlotLimitAttributeValue int64, nginxSlabSlotAllocationResultAttributeValue AttributeNginxSlabSlotAllocationResult, nginxZoneNameAttributeValue string)

RecordNginxSlabSlotAllocationsDataPoint adds a data point to nginx.slab.slot.allocations metric.

func (*MetricsBuilder) RecordNginxSlabSlotFreeDataPoint

func (mb *MetricsBuilder) RecordNginxSlabSlotFreeDataPoint(ts pcommon.Timestamp, val int64, nginxSlabSlotLimitAttributeValue int64, nginxZoneNameAttributeValue string)

RecordNginxSlabSlotFreeDataPoint adds a data point to nginx.slab.slot.free metric.

func (*MetricsBuilder) RecordNginxSlabSlotUsageDataPoint

func (mb *MetricsBuilder) RecordNginxSlabSlotUsageDataPoint(ts pcommon.Timestamp, val int64, nginxSlabSlotLimitAttributeValue int64, nginxZoneNameAttributeValue string)

RecordNginxSlabSlotUsageDataPoint adds a data point to nginx.slab.slot.usage metric.

func (*MetricsBuilder) RecordNginxSslCertificateVerifyFailuresDataPoint

func (mb *MetricsBuilder) RecordNginxSslCertificateVerifyFailuresDataPoint(ts pcommon.Timestamp, val int64, nginxSslVerifyFailureReasonAttributeValue AttributeNginxSslVerifyFailureReason)

RecordNginxSslCertificateVerifyFailuresDataPoint adds a data point to nginx.ssl.certificate.verify_failures metric.

func (*MetricsBuilder) RecordNginxSslHandshakesDataPoint

func (mb *MetricsBuilder) RecordNginxSslHandshakesDataPoint(ts pcommon.Timestamp, val int64, nginxSslStatusAttributeValue AttributeNginxSslStatus, nginxSslHandshakeReasonAttributeValue AttributeNginxSslHandshakeReason)

RecordNginxSslHandshakesDataPoint adds a data point to nginx.ssl.handshakes metric.

func (*MetricsBuilder) RecordNginxStreamConnectionAcceptedDataPoint

func (mb *MetricsBuilder) RecordNginxStreamConnectionAcceptedDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string)

RecordNginxStreamConnectionAcceptedDataPoint adds a data point to nginx.stream.connection.accepted metric.

func (*MetricsBuilder) RecordNginxStreamConnectionDiscardedDataPoint

func (mb *MetricsBuilder) RecordNginxStreamConnectionDiscardedDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string)

RecordNginxStreamConnectionDiscardedDataPoint adds a data point to nginx.stream.connection.discarded metric.

func (*MetricsBuilder) RecordNginxStreamConnectionProcessingCountDataPoint

func (mb *MetricsBuilder) RecordNginxStreamConnectionProcessingCountDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string)

RecordNginxStreamConnectionProcessingCountDataPoint adds a data point to nginx.stream.connection.processing.count metric.

func (*MetricsBuilder) RecordNginxStreamIoDataPoint

func (mb *MetricsBuilder) RecordNginxStreamIoDataPoint(ts pcommon.Timestamp, val int64, nginxIoDirectionAttributeValue AttributeNginxIoDirection, nginxZoneNameAttributeValue string)

RecordNginxStreamIoDataPoint adds a data point to nginx.stream.io metric.

func (*MetricsBuilder) RecordNginxStreamSessionStatusDataPoint

func (mb *MetricsBuilder) RecordNginxStreamSessionStatusDataPoint(ts pcommon.Timestamp, val int64, nginxStatusRangeAttributeValue AttributeNginxStatusRange, nginxZoneNameAttributeValue string)

RecordNginxStreamSessionStatusDataPoint adds a data point to nginx.stream.session.status metric.

func (*MetricsBuilder) RecordNginxStreamUpstreamPeerConnectionCountDataPoint

func (mb *MetricsBuilder) RecordNginxStreamUpstreamPeerConnectionCountDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxStreamUpstreamPeerConnectionCountDataPoint adds a data point to nginx.stream.upstream.peer.connection.count metric.

func (*MetricsBuilder) RecordNginxStreamUpstreamPeerConnectionTimeDataPoint

func (mb *MetricsBuilder) RecordNginxStreamUpstreamPeerConnectionTimeDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxStreamUpstreamPeerConnectionTimeDataPoint adds a data point to nginx.stream.upstream.peer.connection.time metric.

func (*MetricsBuilder) RecordNginxStreamUpstreamPeerConnectionsDataPoint

func (mb *MetricsBuilder) RecordNginxStreamUpstreamPeerConnectionsDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxStreamUpstreamPeerConnectionsDataPoint adds a data point to nginx.stream.upstream.peer.connections metric.

func (*MetricsBuilder) RecordNginxStreamUpstreamPeerCountDataPoint

func (mb *MetricsBuilder) RecordNginxStreamUpstreamPeerCountDataPoint(ts pcommon.Timestamp, val int64, nginxPeerStateAttributeValue AttributeNginxPeerState, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string)

RecordNginxStreamUpstreamPeerCountDataPoint adds a data point to nginx.stream.upstream.peer.count metric.

func (*MetricsBuilder) RecordNginxStreamUpstreamPeerFailsDataPoint

func (mb *MetricsBuilder) RecordNginxStreamUpstreamPeerFailsDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string)

RecordNginxStreamUpstreamPeerFailsDataPoint adds a data point to nginx.stream.upstream.peer.fails metric.

func (*MetricsBuilder) RecordNginxStreamUpstreamPeerHealthChecksDataPoint

func (mb *MetricsBuilder) RecordNginxStreamUpstreamPeerHealthChecksDataPoint(ts pcommon.Timestamp, val int64, nginxHealthCheckAttributeValue AttributeNginxHealthCheck, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxStreamUpstreamPeerHealthChecksDataPoint adds a data point to nginx.stream.upstream.peer.health_checks metric.

func (*MetricsBuilder) RecordNginxStreamUpstreamPeerIoDataPoint

func (mb *MetricsBuilder) RecordNginxStreamUpstreamPeerIoDataPoint(ts pcommon.Timestamp, val int64, nginxIoDirectionAttributeValue AttributeNginxIoDirection, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxStreamUpstreamPeerIoDataPoint adds a data point to nginx.stream.upstream.peer.io metric.

func (*MetricsBuilder) RecordNginxStreamUpstreamPeerResponseTimeDataPoint

func (mb *MetricsBuilder) RecordNginxStreamUpstreamPeerResponseTimeDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxStreamUpstreamPeerResponseTimeDataPoint adds a data point to nginx.stream.upstream.peer.response.time metric.

func (*MetricsBuilder) RecordNginxStreamUpstreamPeerStateDataPoint

func (mb *MetricsBuilder) RecordNginxStreamUpstreamPeerStateDataPoint(ts pcommon.Timestamp, val int64, nginxPeerStateAttributeValue AttributeNginxPeerState, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxStreamUpstreamPeerStateDataPoint adds a data point to nginx.stream.upstream.peer.state metric.

func (*MetricsBuilder) RecordNginxStreamUpstreamPeerTtfbTimeDataPoint

func (mb *MetricsBuilder) RecordNginxStreamUpstreamPeerTtfbTimeDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxStreamUpstreamPeerTtfbTimeDataPoint adds a data point to nginx.stream.upstream.peer.ttfb.time metric.

func (*MetricsBuilder) RecordNginxStreamUpstreamPeerUnavailablesDataPoint

func (mb *MetricsBuilder) RecordNginxStreamUpstreamPeerUnavailablesDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string, nginxPeerAddressAttributeValue string, nginxPeerNameAttributeValue string)

RecordNginxStreamUpstreamPeerUnavailablesDataPoint adds a data point to nginx.stream.upstream.peer.unavailables metric.

func (*MetricsBuilder) RecordNginxStreamUpstreamZombieCountDataPoint

func (mb *MetricsBuilder) RecordNginxStreamUpstreamZombieCountDataPoint(ts pcommon.Timestamp, val int64, nginxZoneNameAttributeValue string, nginxUpstreamNameAttributeValue string)

RecordNginxStreamUpstreamZombieCountDataPoint adds a data point to nginx.stream.upstream.zombie.count metric.

func (*MetricsBuilder) Reset

func (mb *MetricsBuilder) Reset(options ...MetricBuilderOption)

Reset resets metrics builder to its initial state. It should be used when external metrics source is restarted, and metrics builder should update its startTime and reset it's internal state accordingly.

type MetricsBuilderConfig

type MetricsBuilderConfig struct {
	Metrics            MetricsConfig            `mapstructure:"metrics"`
	ResourceAttributes ResourceAttributesConfig `mapstructure:"resource_attributes"`
}

MetricsBuilderConfig is a configuration for nginxplus metrics builder.

func DefaultMetricsBuilderConfig

func DefaultMetricsBuilderConfig() MetricsBuilderConfig

type MetricsConfig

type MetricsConfig struct {
	NginxCacheBytesRead                    MetricConfig `mapstructure:"nginx.cache.bytes_read"`
	NginxCacheMemoryLimit                  MetricConfig `mapstructure:"nginx.cache.memory.limit"`
	NginxCacheMemoryUsage                  MetricConfig `mapstructure:"nginx.cache.memory.usage"`
	NginxCacheResponses                    MetricConfig `mapstructure:"nginx.cache.responses"`
	NginxConfigReloads                     MetricConfig `mapstructure:"nginx.config.reloads"`
	NginxHTTPConnectionCount               MetricConfig `mapstructure:"nginx.http.connection.count"`
	NginxHTTPConnections                   MetricConfig `mapstructure:"nginx.http.connections"`
	NginxHTTPLimitConnRequests             MetricConfig `mapstructure:"nginx.http.limit_conn.requests"`
	NginxHTTPLimitReqRequests              MetricConfig `mapstructure:"nginx.http.limit_req.requests"`
	NginxHTTPRequestCount                  MetricConfig `mapstructure:"nginx.http.request.count"`
	NginxHTTPRequestDiscarded              MetricConfig `mapstructure:"nginx.http.request.discarded"`
	NginxHTTPRequestIo                     MetricConfig `mapstructure:"nginx.http.request.io"`
	NginxHTTPRequestProcessingCount        MetricConfig `mapstructure:"nginx.http.request.processing.count"`
	NginxHTTPRequests                      MetricConfig `mapstructure:"nginx.http.requests"`
	NginxHTTPResponseCount                 MetricConfig `mapstructure:"nginx.http.response.count"`
	NginxHTTPResponseStatus                MetricConfig `mapstructure:"nginx.http.response.status"`
	NginxHTTPResponses                     MetricConfig `mapstructure:"nginx.http.responses"`
	NginxHTTPUpstreamKeepaliveCount        MetricConfig `mapstructure:"nginx.http.upstream.keepalive.count"`
	NginxHTTPUpstreamPeerConnectionCount   MetricConfig `mapstructure:"nginx.http.upstream.peer.connection.count"`
	NginxHTTPUpstreamPeerCount             MetricConfig `mapstructure:"nginx.http.upstream.peer.count"`
	NginxHTTPUpstreamPeerFails             MetricConfig `mapstructure:"nginx.http.upstream.peer.fails"`
	NginxHTTPUpstreamPeerHeaderTime        MetricConfig `mapstructure:"nginx.http.upstream.peer.header.time"`
	NginxHTTPUpstreamPeerHealthChecks      MetricConfig `mapstructure:"nginx.http.upstream.peer.health_checks"`
	NginxHTTPUpstreamPeerIo                MetricConfig `mapstructure:"nginx.http.upstream.peer.io"`
	NginxHTTPUpstreamPeerRequests          MetricConfig `mapstructure:"nginx.http.upstream.peer.requests"`
	NginxHTTPUpstreamPeerResponseTime      MetricConfig `mapstructure:"nginx.http.upstream.peer.response.time"`
	NginxHTTPUpstreamPeerResponses         MetricConfig `mapstructure:"nginx.http.upstream.peer.responses"`
	NginxHTTPUpstreamPeerState             MetricConfig `mapstructure:"nginx.http.upstream.peer.state"`
	NginxHTTPUpstreamPeerUnavailables      MetricConfig `mapstructure:"nginx.http.upstream.peer.unavailables"`
	NginxHTTPUpstreamQueueLimit            MetricConfig `mapstructure:"nginx.http.upstream.queue.limit"`
	NginxHTTPUpstreamQueueOverflows        MetricConfig `mapstructure:"nginx.http.upstream.queue.overflows"`
	NginxHTTPUpstreamQueueUsage            MetricConfig `mapstructure:"nginx.http.upstream.queue.usage"`
	NginxHTTPUpstreamZombieCount           MetricConfig `mapstructure:"nginx.http.upstream.zombie.count"`
	NginxSlabPageFree                      MetricConfig `mapstructure:"nginx.slab.page.free"`
	NginxSlabPageLimit                     MetricConfig `mapstructure:"nginx.slab.page.limit"`
	NginxSlabPageUsage                     MetricConfig `mapstructure:"nginx.slab.page.usage"`
	NginxSlabPageUtilization               MetricConfig `mapstructure:"nginx.slab.page.utilization"`
	NginxSlabSlotAllocations               MetricConfig `mapstructure:"nginx.slab.slot.allocations"`
	NginxSlabSlotFree                      MetricConfig `mapstructure:"nginx.slab.slot.free"`
	NginxSlabSlotUsage                     MetricConfig `mapstructure:"nginx.slab.slot.usage"`
	NginxSslCertificateVerifyFailures      MetricConfig `mapstructure:"nginx.ssl.certificate.verify_failures"`
	NginxSslHandshakes                     MetricConfig `mapstructure:"nginx.ssl.handshakes"`
	NginxStreamConnectionAccepted          MetricConfig `mapstructure:"nginx.stream.connection.accepted"`
	NginxStreamConnectionDiscarded         MetricConfig `mapstructure:"nginx.stream.connection.discarded"`
	NginxStreamConnectionProcessingCount   MetricConfig `mapstructure:"nginx.stream.connection.processing.count"`
	NginxStreamIo                          MetricConfig `mapstructure:"nginx.stream.io"`
	NginxStreamSessionStatus               MetricConfig `mapstructure:"nginx.stream.session.status"`
	NginxStreamUpstreamPeerConnectionCount MetricConfig `mapstructure:"nginx.stream.upstream.peer.connection.count"`
	NginxStreamUpstreamPeerConnectionTime  MetricConfig `mapstructure:"nginx.stream.upstream.peer.connection.time"`
	NginxStreamUpstreamPeerConnections     MetricConfig `mapstructure:"nginx.stream.upstream.peer.connections"`
	NginxStreamUpstreamPeerCount           MetricConfig `mapstructure:"nginx.stream.upstream.peer.count"`
	NginxStreamUpstreamPeerFails           MetricConfig `mapstructure:"nginx.stream.upstream.peer.fails"`
	NginxStreamUpstreamPeerHealthChecks    MetricConfig `mapstructure:"nginx.stream.upstream.peer.health_checks"`
	NginxStreamUpstreamPeerIo              MetricConfig `mapstructure:"nginx.stream.upstream.peer.io"`
	NginxStreamUpstreamPeerResponseTime    MetricConfig `mapstructure:"nginx.stream.upstream.peer.response.time"`
	NginxStreamUpstreamPeerState           MetricConfig `mapstructure:"nginx.stream.upstream.peer.state"`
	NginxStreamUpstreamPeerTtfbTime        MetricConfig `mapstructure:"nginx.stream.upstream.peer.ttfb.time"`
	NginxStreamUpstreamPeerUnavailables    MetricConfig `mapstructure:"nginx.stream.upstream.peer.unavailables"`
	NginxStreamUpstreamZombieCount         MetricConfig `mapstructure:"nginx.stream.upstream.zombie.count"`
}

MetricsConfig provides config for nginxplus metrics.

func DefaultMetricsConfig

func DefaultMetricsConfig() MetricsConfig

type ResourceAttributeConfig

type ResourceAttributeConfig struct {
	Enabled bool `mapstructure:"enabled"`
	// Experimental: MetricsInclude defines a list of filters for attribute values.
	// If the list is not empty, only metrics with matching resource attribute values will be emitted.
	MetricsInclude []filter.Config `mapstructure:"metrics_include"`
	// Experimental: MetricsExclude defines a list of filters for attribute values.
	// If the list is not empty, metrics with matching resource attribute values will not be emitted.
	// MetricsInclude has higher priority than MetricsExclude.
	MetricsExclude []filter.Config `mapstructure:"metrics_exclude"`
	// contains filtered or unexported fields
}

ResourceAttributeConfig provides common config for a particular resource attribute.

func (*ResourceAttributeConfig) Unmarshal

func (rac *ResourceAttributeConfig) Unmarshal(parser *confmap.Conf) error

type ResourceAttributesConfig

type ResourceAttributesConfig struct {
	InstanceID   ResourceAttributeConfig `mapstructure:"instance.id"`
	InstanceType ResourceAttributeConfig `mapstructure:"instance.type"`
}

ResourceAttributesConfig provides config for nginxplus resource attributes.

func DefaultResourceAttributesConfig

func DefaultResourceAttributesConfig() ResourceAttributesConfig

type ResourceBuilder

type ResourceBuilder struct {
	// contains filtered or unexported fields
}

ResourceBuilder is a helper struct to build resources predefined in metadata.yaml. The ResourceBuilder is not thread-safe and must not to be used in multiple goroutines.

func NewResourceBuilder

func NewResourceBuilder(rac ResourceAttributesConfig) *ResourceBuilder

NewResourceBuilder creates a new ResourceBuilder. This method should be called on the start of the application.

func (*ResourceBuilder) Emit

func (rb *ResourceBuilder) Emit() pcommon.Resource

Emit returns the built resource and resets the internal builder state.

func (*ResourceBuilder) SetInstanceID

func (rb *ResourceBuilder) SetInstanceID(val string)

SetInstanceID sets provided value as "instance.id" attribute.

func (*ResourceBuilder) SetInstanceType

func (rb *ResourceBuilder) SetInstanceType(val string)

SetInstanceType sets provided value as "instance.type" attribute.

type ResourceMetricsOption

type ResourceMetricsOption interface {
	// contains filtered or unexported methods
}

ResourceMetricsOption applies changes to provided resource metrics.

func WithResource

func WithResource(res pcommon.Resource) ResourceMetricsOption

WithResource sets the provided resource on the emitted ResourceMetrics. It's recommended to use ResourceBuilder to create the resource.

func WithStartTimeOverride

func WithStartTimeOverride(start pcommon.Timestamp) ResourceMetricsOption

WithStartTimeOverride overrides start time for all the resource metrics data points. This option should be only used if different start time has to be set on metrics coming from different resources.

Jump to

Keyboard shortcuts

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