metadata

package
v0.156.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package metadata contains the autogenerated telemetry and build information for the receiver/postgresql component.

Index

Constants

View Source
const (
	AggregationStrategySum = "sum"
	AggregationStrategyAvg = "avg"
	AggregationStrategyMin = "min"
	AggregationStrategyMax = "max"
)
View Source
const (
	LogsStability    = component.StabilityLevelDevelopment
	MetricsStability = component.StabilityLevelBeta
)

Variables

View Source
var (
	Type      = component.MustNewType("postgresql")
	ScopeName = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver"
)

MapAttributeBgBufferSource is a helper map of string to AttributeBgBufferSource attribute value.

View Source
var MapAttributeBgCheckpointType = map[string]AttributeBgCheckpointType{
	"requested": AttributeBgCheckpointTypeRequested,
	"scheduled": AttributeBgCheckpointTypeScheduled,
}

MapAttributeBgCheckpointType is a helper map of string to AttributeBgCheckpointType attribute value.

View Source
var MapAttributeBgDurationType = map[string]AttributeBgDurationType{
	"sync":  AttributeBgDurationTypeSync,
	"write": AttributeBgDurationTypeWrite,
}

MapAttributeBgDurationType is a helper map of string to AttributeBgDurationType attribute value.

View Source
var MapAttributeDbSystemName = map[string]AttributeDbSystemName{
	"postgresql": AttributeDbSystemNamePostgresql,
}

MapAttributeDbSystemName is a helper map of string to AttributeDbSystemName attribute value.

MapAttributeOperation is a helper map of string to AttributeOperation attribute value.

View Source
var MapAttributeSource = map[string]AttributeSource{
	"heap_read":  AttributeSourceHeapRead,
	"heap_hit":   AttributeSourceHeapHit,
	"idx_read":   AttributeSourceIdxRead,
	"idx_hit":    AttributeSourceIdxHit,
	"toast_read": AttributeSourceToastRead,
	"toast_hit":  AttributeSourceToastHit,
	"tidx_read":  AttributeSourceTidxRead,
	"tidx_hit":   AttributeSourceTidxHit,
}

MapAttributeSource is a helper map of string to AttributeSource attribute value.

View Source
var MapAttributeState = map[string]AttributeState{
	"dead": AttributeStateDead,
	"live": AttributeStateLive,
}

MapAttributeState is a helper map of string to AttributeState attribute value.

MapAttributeWalOperationLag is a helper map of string to AttributeWalOperationLag attribute value.

View Source
var MetricsInfo = metricsInfo{
	PostgresqlBackends: metricInfo{
		Name: "postgresql.backends",
	},
	PostgresqlBgwriterBuffersAllocated: metricInfo{
		Name: "postgresql.bgwriter.buffers.allocated",
	},
	PostgresqlBgwriterBuffersWrites: metricInfo{
		Name:       "postgresql.bgwriter.buffers.writes",
		Attributes: []string{"bg_buffer_source"},
	},
	PostgresqlBgwriterCheckpointCount: metricInfo{
		Name:       "postgresql.bgwriter.checkpoint.count",
		Attributes: []string{"bg_checkpoint_type"},
	},
	PostgresqlBgwriterDuration: metricInfo{
		Name:       "postgresql.bgwriter.duration",
		Attributes: []string{"bg_duration_type"},
	},
	PostgresqlBgwriterMaxwritten: metricInfo{
		Name: "postgresql.bgwriter.maxwritten",
	},
	PostgresqlBlksHit: metricInfo{
		Name: "postgresql.blks_hit",
	},
	PostgresqlBlksRead: metricInfo{
		Name: "postgresql.blks_read",
	},
	PostgresqlBlocksRead: metricInfo{
		Name:       "postgresql.blocks_read",
		Attributes: []string{"source"},
	},
	PostgresqlCommits: metricInfo{
		Name: "postgresql.commits",
	},
	PostgresqlConnectionMax: metricInfo{
		Name: "postgresql.connection.max",
	},
	PostgresqlDatabaseCount: metricInfo{
		Name: "postgresql.database.count",
	},
	PostgresqlDatabaseLocks: metricInfo{
		Name:       "postgresql.database.locks",
		Attributes: []string{"relation", "mode", "lock_type"},
	},
	PostgresqlDbSize: metricInfo{
		Name: "postgresql.db_size",
	},
	PostgresqlDeadlocks: metricInfo{
		Name: "postgresql.deadlocks",
	},
	PostgresqlFunctionCalls: metricInfo{
		Name:       "postgresql.function.calls",
		Attributes: []string{"function"},
	},
	PostgresqlIndexScans: metricInfo{
		Name: "postgresql.index.scans",
	},
	PostgresqlIndexSize: metricInfo{
		Name: "postgresql.index.size",
	},
	PostgresqlOperations: metricInfo{
		Name:       "postgresql.operations",
		Attributes: []string{"operation"},
	},
	PostgresqlReplicationDataDelay: metricInfo{
		Name:       "postgresql.replication.data_delay",
		Attributes: []string{"replication_client"},
	},
	PostgresqlRollbacks: metricInfo{
		Name: "postgresql.rollbacks",
	},
	PostgresqlRows: metricInfo{
		Name:       "postgresql.rows",
		Attributes: []string{"state"},
	},
	PostgresqlSequentialScans: metricInfo{
		Name: "postgresql.sequential_scans",
	},
	PostgresqlTableCount: metricInfo{
		Name: "postgresql.table.count",
	},
	PostgresqlTableSize: metricInfo{
		Name: "postgresql.table.size",
	},
	PostgresqlTableVacuumCount: metricInfo{
		Name: "postgresql.table.vacuum.count",
	},
	PostgresqlTempIo: metricInfo{
		Name: "postgresql.temp.io",
	},
	PostgresqlTempFiles: metricInfo{
		Name: "postgresql.temp_files",
	},
	PostgresqlTupDeleted: metricInfo{
		Name: "postgresql.tup_deleted",
	},
	PostgresqlTupFetched: metricInfo{
		Name: "postgresql.tup_fetched",
	},
	PostgresqlTupInserted: metricInfo{
		Name: "postgresql.tup_inserted",
	},
	PostgresqlTupReturned: metricInfo{
		Name: "postgresql.tup_returned",
	},
	PostgresqlTupUpdated: metricInfo{
		Name: "postgresql.tup_updated",
	},
	PostgresqlWalAge: metricInfo{
		Name: "postgresql.wal.age",
	},
	PostgresqlWalDelay: metricInfo{
		Name:       "postgresql.wal.delay",
		Attributes: []string{"wal_operation_lag", "replication_client"},
	},
	PostgresqlWalLag: metricInfo{
		Name:       "postgresql.wal.lag",
		Attributes: []string{"wal_operation_lag", "replication_client"},
	},
}
View Source
var PostgresqlreceiverPreciselagmetricsFeatureGate = featuregate.GlobalRegistry().MustRegister(
	"postgresqlreceiver.preciselagmetrics",
	featuregate.StageBeta,
	featuregate.WithRegisterDescription("Metric `postgresql.wal.lag` is replaced by more precise `postgresql.wal.delay`."),
	featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30831"),
	featuregate.WithRegisterFromVersion("v0.89.0"),
)
View Source
var ReceiverPostgresqlConnectionPoolFeatureGate = featuregate.GlobalRegistry().MustRegister(
	"receiver.postgresql.connectionPool",
	featuregate.StageBeta,
	featuregate.WithRegisterDescription("Use of connection pooling"),
	featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30831"),
	featuregate.WithRegisterFromVersion("v0.96.0"),
)
View Source
var ReceiverPostgresqlSeparateSchemaAttrFeatureGate = featuregate.GlobalRegistry().MustRegister(
	"receiver.postgresql.separateSchemaAttr",
	featuregate.StageAlpha,
	featuregate.WithRegisterDescription("Moves Schema Names into dedicated Attribute"),
	featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/29559"),
	featuregate.WithRegisterFromVersion("v0.122.0"),
)

Functions

This section is empty.

Types

type AttributeBgBufferSource added in v0.59.0

type AttributeBgBufferSource int

AttributeBgBufferSource specifies the value bg_buffer_source attribute.

const (
	AttributeBgBufferSourceBackend AttributeBgBufferSource
	AttributeBgBufferSourceBackendFsync
	AttributeBgBufferSourceCheckpoints
	AttributeBgBufferSourceBgwriter
)

func (AttributeBgBufferSource) String added in v0.59.0

func (av AttributeBgBufferSource) String() string

String returns the string representation of the AttributeBgBufferSource.

type AttributeBgCheckpointType added in v0.59.0

type AttributeBgCheckpointType int

AttributeBgCheckpointType specifies the value bg_checkpoint_type attribute.

const (
	AttributeBgCheckpointTypeRequested AttributeBgCheckpointType
	AttributeBgCheckpointTypeScheduled
)

func (AttributeBgCheckpointType) String added in v0.59.0

func (av AttributeBgCheckpointType) String() string

String returns the string representation of the AttributeBgCheckpointType.

type AttributeBgDurationType added in v0.59.0

type AttributeBgDurationType int

AttributeBgDurationType specifies the value bg_duration_type attribute.

const (
	AttributeBgDurationTypeSync AttributeBgDurationType
	AttributeBgDurationTypeWrite
)

func (AttributeBgDurationType) String added in v0.59.0

func (av AttributeBgDurationType) String() string

String returns the string representation of the AttributeBgDurationType.

type AttributeDbSystemName added in v0.129.0

type AttributeDbSystemName int

AttributeDbSystemName specifies the value db.system.name attribute.

const (
	AttributeDbSystemNamePostgresql AttributeDbSystemName
)

func (AttributeDbSystemName) String added in v0.129.0

func (av AttributeDbSystemName) String() string

String returns the string representation of the AttributeDbSystemName.

type AttributeOperation added in v0.41.0

type AttributeOperation int

AttributeOperation specifies the value operation attribute.

const (
	AttributeOperationIns AttributeOperation
	AttributeOperationUpd
	AttributeOperationDel
	AttributeOperationHotUpd
)

func (AttributeOperation) String added in v0.51.0

func (av AttributeOperation) String() string

String returns the string representation of the AttributeOperation.

type AttributeSource added in v0.41.0

type AttributeSource int

AttributeSource specifies the value source attribute.

const (
	AttributeSourceHeapRead AttributeSource
	AttributeSourceHeapHit
	AttributeSourceIdxRead
	AttributeSourceIdxHit
	AttributeSourceToastRead
	AttributeSourceToastHit
	AttributeSourceTidxRead
	AttributeSourceTidxHit
)

func (AttributeSource) String added in v0.51.0

func (av AttributeSource) String() string

String returns the string representation of the AttributeSource.

type AttributeState added in v0.41.0

type AttributeState int

AttributeState specifies the value state attribute.

const (
	AttributeStateDead AttributeState
	AttributeStateLive
)

func (AttributeState) String added in v0.51.0

func (av AttributeState) String() string

String returns the string representation of the AttributeState.

type AttributeWalOperationLag added in v0.59.0

type AttributeWalOperationLag int

AttributeWalOperationLag specifies the value wal_operation_lag attribute.

const (
	AttributeWalOperationLagFlush AttributeWalOperationLag
	AttributeWalOperationLagReplay
	AttributeWalOperationLagWrite
)

func (AttributeWalOperationLag) String added in v0.59.0

func (av AttributeWalOperationLag) String() string

String returns the string representation of the AttributeWalOperationLag.

type EventConfig added in v0.129.0

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

EventConfig provides common config for a particular event.

func (*EventConfig) Unmarshal added in v0.129.0

func (ec *EventConfig) Unmarshal(parser *confmap.Conf) error

type EventsConfig added in v0.129.0

type EventsConfig struct {
	DbServerQuerySample EventConfig `mapstructure:"db.server.query_sample"`
	DbServerTopQuery    EventConfig `mapstructure:"db.server.top_query"`
}

EventsConfig provides config for postgresql events.

func DefaultEventsConfig added in v0.129.0

func DefaultEventsConfig() EventsConfig

type LogBuilderOption added in v0.124.0

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

LogBuilderOption applies changes to default logs builder.

type LogsBuilder added in v0.124.0

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

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

func NewLogsBuilder added in v0.124.0

func NewLogsBuilder(lbc LogsBuilderConfig, settings receiver.Settings) *LogsBuilder

func (*LogsBuilder) AppendLogRecord added in v0.124.0

func (lb *LogsBuilder) AppendLogRecord(lr plog.LogRecord)

AppendLogRecord adds a log record to the logs builder.

func (*LogsBuilder) Emit added in v0.124.0

func (lb *LogsBuilder) Emit(options ...ResourceLogsOption) plog.Logs

Emit returns all the logs accumulated by the logs builder and updates the internal state to be ready for recording another set of logs. This function will be responsible for applying all the transformations required to produce logs representation defined in metadata and user config.

func (*LogsBuilder) EmitForResource added in v0.124.0

func (lb *LogsBuilder) EmitForResource(options ...ResourceLogsOption)

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

func (*LogsBuilder) NewResourceBuilder added in v0.124.0

func (lb *LogsBuilder) NewResourceBuilder() *ResourceBuilder

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

func (*LogsBuilder) RecordDbServerQuerySampleEvent added in v0.129.0

func (lb *LogsBuilder) RecordDbServerQuerySampleEvent(ctx context.Context, timestamp pcommon.Timestamp, dbSystemNameAttributeValue AttributeDbSystemName, dbNamespaceAttributeValue string, dbQueryTextAttributeValue string, userNameAttributeValue string, postgresqlStateAttributeValue string, postgresqlPidAttributeValue int64, postgresqlApplicationNameAttributeValue string, networkPeerAddressAttributeValue string, networkPeerPortAttributeValue int64, postgresqlClientHostnameAttributeValue string, postgresqlQueryStartAttributeValue string, postgresqlWaitEventAttributeValue string, postgresqlWaitEventTypeAttributeValue string, postgresqlQueryIDAttributeValue string, postgresqlTotalExecTimeAttributeValue float64, postgresqlBlockingPidsAttributeValue string, postgresqlBlockingStartTimeAttributeValue string, postgresqlBlockingWaitDurationAttributeValue int64, postgresqlBlockingLockModeAttributeValue string, postgresqlBlockingLockTypeAttributeValue string, postgresqlBlockingLockRelationAttributeValue string, postgresqlBlockingTransactionStartTimeAttributeValue string)

RecordDbServerQuerySampleEvent adds a log record of db.server.query_sample event.

func (*LogsBuilder) RecordDbServerTopQueryEvent added in v0.129.0

func (lb *LogsBuilder) RecordDbServerTopQueryEvent(ctx context.Context, timestamp pcommon.Timestamp, dbSystemNameAttributeValue AttributeDbSystemName, dbNamespaceAttributeValue string, dbQueryTextAttributeValue string, postgresqlCallsAttributeValue int64, postgresqlRowsAttributeValue int64, postgresqlSharedBlksDirtiedAttributeValue int64, postgresqlSharedBlksHitAttributeValue int64, postgresqlSharedBlksReadAttributeValue int64, postgresqlSharedBlksWrittenAttributeValue int64, postgresqlTempBlksReadAttributeValue int64, postgresqlTempBlksWrittenAttributeValue int64, postgresqlQueryidAttributeValue string, postgresqlRolnameAttributeValue string, postgresqlTotalExecTimeAttributeValue float64, postgresqlTotalPlanTimeAttributeValue float64, postgresqlQueryPlanAttributeValue string)

RecordDbServerTopQueryEvent adds a log record of db.server.top_query event.

type LogsBuilderConfig added in v0.129.0

type LogsBuilderConfig struct {
	Events             EventsConfig             `mapstructure:"events"`
	ResourceAttributes ResourceAttributesConfig `mapstructure:"resource_attributes"`
}

LogsBuilderConfig is a configuration for postgresql logs builder.

func DefaultLogsBuilderConfig added in v0.129.0

func DefaultLogsBuilderConfig() LogsBuilderConfig

type MetricBuilderOption added in v0.110.0

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

MetricBuilderOption applies changes to default metrics builder.

func WithStartTime added in v0.44.0

func WithStartTime(startTime pcommon.Timestamp) MetricBuilderOption

WithStartTime sets startTime on the metrics builder.

type MetricsBuilder added in v0.44.0

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 added in v0.44.0

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

func (*MetricsBuilder) Emit added in v0.44.0

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 added in v0.48.0

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 added in v0.83.0

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) RecordPostgresqlBackendsDataPoint added in v0.44.0

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

RecordPostgresqlBackendsDataPoint adds a data point to postgresql.backends metric.

func (*MetricsBuilder) RecordPostgresqlBgwriterBuffersAllocatedDataPoint added in v0.59.0

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

RecordPostgresqlBgwriterBuffersAllocatedDataPoint adds a data point to postgresql.bgwriter.buffers.allocated metric.

func (*MetricsBuilder) RecordPostgresqlBgwriterBuffersWritesDataPoint added in v0.59.0

func (mb *MetricsBuilder) RecordPostgresqlBgwriterBuffersWritesDataPoint(ts pcommon.Timestamp, val int64, bgBufferSourceAttributeValue AttributeBgBufferSource)

RecordPostgresqlBgwriterBuffersWritesDataPoint adds a data point to postgresql.bgwriter.buffers.writes metric.

func (*MetricsBuilder) RecordPostgresqlBgwriterCheckpointCountDataPoint added in v0.59.0

func (mb *MetricsBuilder) RecordPostgresqlBgwriterCheckpointCountDataPoint(ts pcommon.Timestamp, val int64, bgCheckpointTypeAttributeValue AttributeBgCheckpointType)

RecordPostgresqlBgwriterCheckpointCountDataPoint adds a data point to postgresql.bgwriter.checkpoint.count metric.

func (*MetricsBuilder) RecordPostgresqlBgwriterDurationDataPoint added in v0.59.0

func (mb *MetricsBuilder) RecordPostgresqlBgwriterDurationDataPoint(ts pcommon.Timestamp, val float64, bgDurationTypeAttributeValue AttributeBgDurationType)

RecordPostgresqlBgwriterDurationDataPoint adds a data point to postgresql.bgwriter.duration metric.

func (*MetricsBuilder) RecordPostgresqlBgwriterMaxwrittenDataPoint added in v0.59.0

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

RecordPostgresqlBgwriterMaxwrittenDataPoint adds a data point to postgresql.bgwriter.maxwritten metric.

func (*MetricsBuilder) RecordPostgresqlBlksHitDataPoint added in v0.115.0

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

RecordPostgresqlBlksHitDataPoint adds a data point to postgresql.blks_hit metric.

func (*MetricsBuilder) RecordPostgresqlBlksReadDataPoint added in v0.115.0

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

RecordPostgresqlBlksReadDataPoint adds a data point to postgresql.blks_read metric.

func (*MetricsBuilder) RecordPostgresqlBlocksReadDataPoint added in v0.44.0

func (mb *MetricsBuilder) RecordPostgresqlBlocksReadDataPoint(ts pcommon.Timestamp, val int64, sourceAttributeValue AttributeSource)

RecordPostgresqlBlocksReadDataPoint adds a data point to postgresql.blocks_read metric.

func (*MetricsBuilder) RecordPostgresqlCommitsDataPoint added in v0.44.0

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

RecordPostgresqlCommitsDataPoint adds a data point to postgresql.commits metric.

func (*MetricsBuilder) RecordPostgresqlConnectionMaxDataPoint added in v0.59.0

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

RecordPostgresqlConnectionMaxDataPoint adds a data point to postgresql.connection.max metric.

func (*MetricsBuilder) RecordPostgresqlDatabaseCountDataPoint added in v0.59.0

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

RecordPostgresqlDatabaseCountDataPoint adds a data point to postgresql.database.count metric.

func (*MetricsBuilder) RecordPostgresqlDatabaseLocksDataPoint added in v0.85.0

func (mb *MetricsBuilder) RecordPostgresqlDatabaseLocksDataPoint(ts pcommon.Timestamp, val int64, relationAttributeValue string, modeAttributeValue string, lockTypeAttributeValue string)

RecordPostgresqlDatabaseLocksDataPoint adds a data point to postgresql.database.locks metric.

func (*MetricsBuilder) RecordPostgresqlDbSizeDataPoint added in v0.44.0

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

RecordPostgresqlDbSizeDataPoint adds a data point to postgresql.db_size metric.

func (*MetricsBuilder) RecordPostgresqlDeadlocksDataPoint added in v0.84.0

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

RecordPostgresqlDeadlocksDataPoint adds a data point to postgresql.deadlocks metric.

func (*MetricsBuilder) RecordPostgresqlFunctionCallsDataPoint added in v0.131.0

func (mb *MetricsBuilder) RecordPostgresqlFunctionCallsDataPoint(ts pcommon.Timestamp, val int64, functionAttributeValue string)

RecordPostgresqlFunctionCallsDataPoint adds a data point to postgresql.function.calls metric.

func (*MetricsBuilder) RecordPostgresqlIndexScansDataPoint added in v0.58.0

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

RecordPostgresqlIndexScansDataPoint adds a data point to postgresql.index.scans metric.

func (*MetricsBuilder) RecordPostgresqlIndexSizeDataPoint added in v0.58.0

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

RecordPostgresqlIndexSizeDataPoint adds a data point to postgresql.index.size metric.

func (*MetricsBuilder) RecordPostgresqlOperationsDataPoint added in v0.44.0

func (mb *MetricsBuilder) RecordPostgresqlOperationsDataPoint(ts pcommon.Timestamp, val int64, operationAttributeValue AttributeOperation)

RecordPostgresqlOperationsDataPoint adds a data point to postgresql.operations metric.

func (*MetricsBuilder) RecordPostgresqlReplicationDataDelayDataPoint added in v0.59.0

func (mb *MetricsBuilder) RecordPostgresqlReplicationDataDelayDataPoint(ts pcommon.Timestamp, val int64, replicationClientAttributeValue string)

RecordPostgresqlReplicationDataDelayDataPoint adds a data point to postgresql.replication.data_delay metric.

func (*MetricsBuilder) RecordPostgresqlRollbacksDataPoint added in v0.44.0

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

RecordPostgresqlRollbacksDataPoint adds a data point to postgresql.rollbacks metric.

func (*MetricsBuilder) RecordPostgresqlRowsDataPoint added in v0.44.0

func (mb *MetricsBuilder) RecordPostgresqlRowsDataPoint(ts pcommon.Timestamp, val int64, stateAttributeValue AttributeState)

RecordPostgresqlRowsDataPoint adds a data point to postgresql.rows metric.

func (*MetricsBuilder) RecordPostgresqlSequentialScansDataPoint added in v0.84.0

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

RecordPostgresqlSequentialScansDataPoint adds a data point to postgresql.sequential_scans metric.

func (*MetricsBuilder) RecordPostgresqlTableCountDataPoint added in v0.59.0

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

RecordPostgresqlTableCountDataPoint adds a data point to postgresql.table.count metric.

func (*MetricsBuilder) RecordPostgresqlTableSizeDataPoint added in v0.59.0

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

RecordPostgresqlTableSizeDataPoint adds a data point to postgresql.table.size metric.

func (*MetricsBuilder) RecordPostgresqlTableVacuumCountDataPoint added in v0.59.0

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

RecordPostgresqlTableVacuumCountDataPoint adds a data point to postgresql.table.vacuum.count metric.

func (*MetricsBuilder) RecordPostgresqlTempFilesDataPoint added in v0.84.0

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

RecordPostgresqlTempFilesDataPoint adds a data point to postgresql.temp_files metric.

func (*MetricsBuilder) RecordPostgresqlTempIoDataPoint added in v0.131.0

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

RecordPostgresqlTempIoDataPoint adds a data point to postgresql.temp.io metric.

func (*MetricsBuilder) RecordPostgresqlTupDeletedDataPoint added in v0.115.0

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

RecordPostgresqlTupDeletedDataPoint adds a data point to postgresql.tup_deleted metric.

func (*MetricsBuilder) RecordPostgresqlTupFetchedDataPoint added in v0.115.0

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

RecordPostgresqlTupFetchedDataPoint adds a data point to postgresql.tup_fetched metric.

func (*MetricsBuilder) RecordPostgresqlTupInsertedDataPoint added in v0.115.0

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

RecordPostgresqlTupInsertedDataPoint adds a data point to postgresql.tup_inserted metric.

func (*MetricsBuilder) RecordPostgresqlTupReturnedDataPoint added in v0.115.0

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

RecordPostgresqlTupReturnedDataPoint adds a data point to postgresql.tup_returned metric.

func (*MetricsBuilder) RecordPostgresqlTupUpdatedDataPoint added in v0.115.0

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

RecordPostgresqlTupUpdatedDataPoint adds a data point to postgresql.tup_updated metric.

func (*MetricsBuilder) RecordPostgresqlWalAgeDataPoint added in v0.59.0

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

RecordPostgresqlWalAgeDataPoint adds a data point to postgresql.wal.age metric.

func (*MetricsBuilder) RecordPostgresqlWalDelayDataPoint added in v0.89.0

func (mb *MetricsBuilder) RecordPostgresqlWalDelayDataPoint(ts pcommon.Timestamp, val float64, walOperationLagAttributeValue AttributeWalOperationLag, replicationClientAttributeValue string)

RecordPostgresqlWalDelayDataPoint adds a data point to postgresql.wal.delay metric.

func (*MetricsBuilder) RecordPostgresqlWalLagDataPoint added in v0.59.0

func (mb *MetricsBuilder) RecordPostgresqlWalLagDataPoint(ts pcommon.Timestamp, val int64, walOperationLagAttributeValue AttributeWalOperationLag, replicationClientAttributeValue string)

RecordPostgresqlWalLagDataPoint adds a data point to postgresql.wal.lag metric.

func (*MetricsBuilder) Reset added in v0.44.0

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 added in v0.73.0

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

MetricsBuilderConfig is a configuration for postgresql metrics builder.

func DefaultMetricsBuilderConfig deprecated added in v0.73.0

func DefaultMetricsBuilderConfig() MetricsBuilderConfig

Deprecated: Use NewDefaultMetricsBuilderConfig.

func NewDefaultMetricsBuilderConfig added in v0.151.0

func NewDefaultMetricsBuilderConfig() MetricsBuilderConfig

type MetricsConfig added in v0.77.0

type MetricsConfig struct {
	PostgresqlBackends                 PostgresqlBackendsMetricConfig                 `mapstructure:"postgresql.backends"`
	PostgresqlBgwriterBuffersAllocated PostgresqlBgwriterBuffersAllocatedMetricConfig `mapstructure:"postgresql.bgwriter.buffers.allocated"`
	PostgresqlBgwriterBuffersWrites    PostgresqlBgwriterBuffersWritesMetricConfig    `mapstructure:"postgresql.bgwriter.buffers.writes"`
	PostgresqlBgwriterCheckpointCount  PostgresqlBgwriterCheckpointCountMetricConfig  `mapstructure:"postgresql.bgwriter.checkpoint.count"`
	PostgresqlBgwriterDuration         PostgresqlBgwriterDurationMetricConfig         `mapstructure:"postgresql.bgwriter.duration"`
	PostgresqlBgwriterMaxwritten       PostgresqlBgwriterMaxwrittenMetricConfig       `mapstructure:"postgresql.bgwriter.maxwritten"`
	PostgresqlBlksHit                  PostgresqlBlksHitMetricConfig                  `mapstructure:"postgresql.blks_hit"`
	PostgresqlBlksRead                 PostgresqlBlksReadMetricConfig                 `mapstructure:"postgresql.blks_read"`
	PostgresqlBlocksRead               PostgresqlBlocksReadMetricConfig               `mapstructure:"postgresql.blocks_read"`
	PostgresqlCommits                  PostgresqlCommitsMetricConfig                  `mapstructure:"postgresql.commits"`
	PostgresqlConnectionMax            PostgresqlConnectionMaxMetricConfig            `mapstructure:"postgresql.connection.max"`
	PostgresqlDatabaseCount            PostgresqlDatabaseCountMetricConfig            `mapstructure:"postgresql.database.count"`
	PostgresqlDatabaseLocks            PostgresqlDatabaseLocksMetricConfig            `mapstructure:"postgresql.database.locks"`
	PostgresqlDbSize                   PostgresqlDbSizeMetricConfig                   `mapstructure:"postgresql.db_size"`
	PostgresqlDeadlocks                PostgresqlDeadlocksMetricConfig                `mapstructure:"postgresql.deadlocks"`
	PostgresqlFunctionCalls            PostgresqlFunctionCallsMetricConfig            `mapstructure:"postgresql.function.calls"`
	PostgresqlIndexScans               PostgresqlIndexScansMetricConfig               `mapstructure:"postgresql.index.scans"`
	PostgresqlIndexSize                PostgresqlIndexSizeMetricConfig                `mapstructure:"postgresql.index.size"`
	PostgresqlOperations               PostgresqlOperationsMetricConfig               `mapstructure:"postgresql.operations"`
	PostgresqlReplicationDataDelay     PostgresqlReplicationDataDelayMetricConfig     `mapstructure:"postgresql.replication.data_delay"`
	PostgresqlRollbacks                PostgresqlRollbacksMetricConfig                `mapstructure:"postgresql.rollbacks"`
	PostgresqlRows                     PostgresqlRowsMetricConfig                     `mapstructure:"postgresql.rows"`
	PostgresqlSequentialScans          PostgresqlSequentialScansMetricConfig          `mapstructure:"postgresql.sequential_scans"`
	PostgresqlTableCount               PostgresqlTableCountMetricConfig               `mapstructure:"postgresql.table.count"`
	PostgresqlTableSize                PostgresqlTableSizeMetricConfig                `mapstructure:"postgresql.table.size"`
	PostgresqlTableVacuumCount         PostgresqlTableVacuumCountMetricConfig         `mapstructure:"postgresql.table.vacuum.count"`
	PostgresqlTempIo                   PostgresqlTempIoMetricConfig                   `mapstructure:"postgresql.temp.io"`
	PostgresqlTempFiles                PostgresqlTempFilesMetricConfig                `mapstructure:"postgresql.temp_files"`
	PostgresqlTupDeleted               PostgresqlTupDeletedMetricConfig               `mapstructure:"postgresql.tup_deleted"`
	PostgresqlTupFetched               PostgresqlTupFetchedMetricConfig               `mapstructure:"postgresql.tup_fetched"`
	PostgresqlTupInserted              PostgresqlTupInsertedMetricConfig              `mapstructure:"postgresql.tup_inserted"`
	PostgresqlTupReturned              PostgresqlTupReturnedMetricConfig              `mapstructure:"postgresql.tup_returned"`
	PostgresqlTupUpdated               PostgresqlTupUpdatedMetricConfig               `mapstructure:"postgresql.tup_updated"`
	PostgresqlWalAge                   PostgresqlWalAgeMetricConfig                   `mapstructure:"postgresql.wal.age"`
	PostgresqlWalDelay                 PostgresqlWalDelayMetricConfig                 `mapstructure:"postgresql.wal.delay"`
	PostgresqlWalLag                   PostgresqlWalLagMetricConfig                   `mapstructure:"postgresql.wal.lag"`
}

MetricsConfig provides config for postgresql metrics.

func DefaultMetricsConfig added in v0.77.0

func DefaultMetricsConfig() MetricsConfig

type PostgresqlBackendsMetricConfig added in v0.148.0

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

PostgresqlBackendsMetricConfig provides config for the postgresql.backends metric.

func (*PostgresqlBackendsMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlBgwriterBuffersAllocatedMetricConfig added in v0.148.0

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

PostgresqlBgwriterBuffersAllocatedMetricConfig provides config for the postgresql.bgwriter.buffers.allocated metric.

func (*PostgresqlBgwriterBuffersAllocatedMetricConfig) Unmarshal added in v0.148.0

type PostgresqlBgwriterBuffersWritesMetricAttributeKey added in v0.148.0

type PostgresqlBgwriterBuffersWritesMetricAttributeKey string

PostgresqlBgwriterBuffersWritesMetricAttributeKey specifies the key of an attribute for the postgresql.bgwriter.buffers.writes metric.

const (
	PostgresqlBgwriterBuffersWritesMetricAttributeKeyBgBufferSource PostgresqlBgwriterBuffersWritesMetricAttributeKey = "source"
)

type PostgresqlBgwriterBuffersWritesMetricConfig added in v0.148.0

type PostgresqlBgwriterBuffersWritesMetricConfig struct {
	Enabled bool `mapstructure:"enabled"`

	AggregationStrategy string                                              `mapstructure:"aggregation_strategy"`
	EnabledAttributes   []PostgresqlBgwriterBuffersWritesMetricAttributeKey `mapstructure:"attributes"`
	// contains filtered or unexported fields
}

PostgresqlBgwriterBuffersWritesMetricConfig provides config for the postgresql.bgwriter.buffers.writes metric.

func (*PostgresqlBgwriterBuffersWritesMetricConfig) Unmarshal added in v0.148.0

func (*PostgresqlBgwriterBuffersWritesMetricConfig) Validate added in v0.148.0

type PostgresqlBgwriterCheckpointCountMetricAttributeKey added in v0.148.0

type PostgresqlBgwriterCheckpointCountMetricAttributeKey string

PostgresqlBgwriterCheckpointCountMetricAttributeKey specifies the key of an attribute for the postgresql.bgwriter.checkpoint.count metric.

const (
	PostgresqlBgwriterCheckpointCountMetricAttributeKeyBgCheckpointType PostgresqlBgwriterCheckpointCountMetricAttributeKey = "type"
)

type PostgresqlBgwriterCheckpointCountMetricConfig added in v0.148.0

type PostgresqlBgwriterCheckpointCountMetricConfig struct {
	Enabled bool `mapstructure:"enabled"`

	AggregationStrategy string                                                `mapstructure:"aggregation_strategy"`
	EnabledAttributes   []PostgresqlBgwriterCheckpointCountMetricAttributeKey `mapstructure:"attributes"`
	// contains filtered or unexported fields
}

PostgresqlBgwriterCheckpointCountMetricConfig provides config for the postgresql.bgwriter.checkpoint.count metric.

func (*PostgresqlBgwriterCheckpointCountMetricConfig) Unmarshal added in v0.148.0

func (*PostgresqlBgwriterCheckpointCountMetricConfig) Validate added in v0.148.0

type PostgresqlBgwriterDurationMetricAttributeKey added in v0.148.0

type PostgresqlBgwriterDurationMetricAttributeKey string

PostgresqlBgwriterDurationMetricAttributeKey specifies the key of an attribute for the postgresql.bgwriter.duration metric.

const (
	PostgresqlBgwriterDurationMetricAttributeKeyBgDurationType PostgresqlBgwriterDurationMetricAttributeKey = "type"
)

type PostgresqlBgwriterDurationMetricConfig added in v0.148.0

type PostgresqlBgwriterDurationMetricConfig struct {
	Enabled bool `mapstructure:"enabled"`

	AggregationStrategy string                                         `mapstructure:"aggregation_strategy"`
	EnabledAttributes   []PostgresqlBgwriterDurationMetricAttributeKey `mapstructure:"attributes"`
	// contains filtered or unexported fields
}

PostgresqlBgwriterDurationMetricConfig provides config for the postgresql.bgwriter.duration metric.

func (*PostgresqlBgwriterDurationMetricConfig) Unmarshal added in v0.148.0

func (*PostgresqlBgwriterDurationMetricConfig) Validate added in v0.148.0

type PostgresqlBgwriterMaxwrittenMetricConfig added in v0.148.0

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

PostgresqlBgwriterMaxwrittenMetricConfig provides config for the postgresql.bgwriter.maxwritten metric.

func (*PostgresqlBgwriterMaxwrittenMetricConfig) Unmarshal added in v0.148.0

type PostgresqlBlksHitMetricConfig added in v0.148.0

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

PostgresqlBlksHitMetricConfig provides config for the postgresql.blks_hit metric.

func (*PostgresqlBlksHitMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlBlksReadMetricConfig added in v0.148.0

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

PostgresqlBlksReadMetricConfig provides config for the postgresql.blks_read metric.

func (*PostgresqlBlksReadMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlBlocksReadMetricAttributeKey added in v0.148.0

type PostgresqlBlocksReadMetricAttributeKey string

PostgresqlBlocksReadMetricAttributeKey specifies the key of an attribute for the postgresql.blocks_read metric.

const (
	PostgresqlBlocksReadMetricAttributeKeySource PostgresqlBlocksReadMetricAttributeKey = "source"
)

type PostgresqlBlocksReadMetricConfig added in v0.148.0

type PostgresqlBlocksReadMetricConfig struct {
	Enabled bool `mapstructure:"enabled"`

	AggregationStrategy string                                   `mapstructure:"aggregation_strategy"`
	EnabledAttributes   []PostgresqlBlocksReadMetricAttributeKey `mapstructure:"attributes"`
	// contains filtered or unexported fields
}

PostgresqlBlocksReadMetricConfig provides config for the postgresql.blocks_read metric.

func (*PostgresqlBlocksReadMetricConfig) Unmarshal added in v0.148.0

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

func (*PostgresqlBlocksReadMetricConfig) Validate added in v0.148.0

func (ms *PostgresqlBlocksReadMetricConfig) Validate() error

type PostgresqlCommitsMetricConfig added in v0.148.0

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

PostgresqlCommitsMetricConfig provides config for the postgresql.commits metric.

func (*PostgresqlCommitsMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlConnectionMaxMetricConfig added in v0.148.0

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

PostgresqlConnectionMaxMetricConfig provides config for the postgresql.connection.max metric.

func (*PostgresqlConnectionMaxMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlDatabaseCountMetricConfig added in v0.148.0

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

PostgresqlDatabaseCountMetricConfig provides config for the postgresql.database.count metric.

func (*PostgresqlDatabaseCountMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlDatabaseLocksMetricAttributeKey added in v0.148.0

type PostgresqlDatabaseLocksMetricAttributeKey string

PostgresqlDatabaseLocksMetricAttributeKey specifies the key of an attribute for the postgresql.database.locks metric.

const (
	PostgresqlDatabaseLocksMetricAttributeKeyRelation PostgresqlDatabaseLocksMetricAttributeKey = "relation"
	PostgresqlDatabaseLocksMetricAttributeKeyMode     PostgresqlDatabaseLocksMetricAttributeKey = "mode"
	PostgresqlDatabaseLocksMetricAttributeKeyLockType PostgresqlDatabaseLocksMetricAttributeKey = "lock_type"
)

type PostgresqlDatabaseLocksMetricConfig added in v0.148.0

type PostgresqlDatabaseLocksMetricConfig struct {
	Enabled bool `mapstructure:"enabled"`

	AggregationStrategy string                                      `mapstructure:"aggregation_strategy"`
	EnabledAttributes   []PostgresqlDatabaseLocksMetricAttributeKey `mapstructure:"attributes"`
	// contains filtered or unexported fields
}

PostgresqlDatabaseLocksMetricConfig provides config for the postgresql.database.locks metric.

func (*PostgresqlDatabaseLocksMetricConfig) Unmarshal added in v0.148.0

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

func (*PostgresqlDatabaseLocksMetricConfig) Validate added in v0.148.0

type PostgresqlDatabaseNameResourceAttributeConfig added in v0.156.0

type PostgresqlDatabaseNameResourceAttributeConfig struct {
	Enabled bool `mapstructure:"enabled"`
	// OverrideValue allows users to override the value of this resource attribute.
	OverrideValue *string `mapstructure:"override_value"`
	// 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"`
	// Experimental: EventsInclude defines a list of filters for attribute values.
	// If the list is not empty, only events with matching resource attribute values will be emitted.
	EventsInclude []filter.Config `mapstructure:"events_include"`
	// Experimental: EventsExclude defines a list of filters for attribute values.
	// If the list is not empty, events with matching resource attribute values will not be emitted.
	// EventsInclude has higher priority than EventsExclude.
	EventsExclude []filter.Config `mapstructure:"events_exclude"`
	// contains filtered or unexported fields
}

PostgresqlDatabaseNameResourceAttributeConfig provides config for the postgresql.database.name resource attribute.

func (*PostgresqlDatabaseNameResourceAttributeConfig) Unmarshal added in v0.156.0

type PostgresqlDbSizeMetricConfig added in v0.148.0

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

PostgresqlDbSizeMetricConfig provides config for the postgresql.db_size metric.

func (*PostgresqlDbSizeMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlDeadlocksMetricConfig added in v0.148.0

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

PostgresqlDeadlocksMetricConfig provides config for the postgresql.deadlocks metric.

func (*PostgresqlDeadlocksMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlFunctionCallsMetricAttributeKey added in v0.148.0

type PostgresqlFunctionCallsMetricAttributeKey string

PostgresqlFunctionCallsMetricAttributeKey specifies the key of an attribute for the postgresql.function.calls metric.

const (
	PostgresqlFunctionCallsMetricAttributeKeyFunction PostgresqlFunctionCallsMetricAttributeKey = "function"
)

type PostgresqlFunctionCallsMetricConfig added in v0.148.0

type PostgresqlFunctionCallsMetricConfig struct {
	Enabled bool `mapstructure:"enabled"`

	AggregationStrategy string                                      `mapstructure:"aggregation_strategy"`
	EnabledAttributes   []PostgresqlFunctionCallsMetricAttributeKey `mapstructure:"attributes"`
	// contains filtered or unexported fields
}

PostgresqlFunctionCallsMetricConfig provides config for the postgresql.function.calls metric.

func (*PostgresqlFunctionCallsMetricConfig) Unmarshal added in v0.148.0

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

func (*PostgresqlFunctionCallsMetricConfig) Validate added in v0.148.0

type PostgresqlIndexNameResourceAttributeConfig added in v0.156.0

type PostgresqlIndexNameResourceAttributeConfig struct {
	Enabled bool `mapstructure:"enabled"`
	// OverrideValue allows users to override the value of this resource attribute.
	OverrideValue *string `mapstructure:"override_value"`
	// 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"`
	// Experimental: EventsInclude defines a list of filters for attribute values.
	// If the list is not empty, only events with matching resource attribute values will be emitted.
	EventsInclude []filter.Config `mapstructure:"events_include"`
	// Experimental: EventsExclude defines a list of filters for attribute values.
	// If the list is not empty, events with matching resource attribute values will not be emitted.
	// EventsInclude has higher priority than EventsExclude.
	EventsExclude []filter.Config `mapstructure:"events_exclude"`
	// contains filtered or unexported fields
}

PostgresqlIndexNameResourceAttributeConfig provides config for the postgresql.index.name resource attribute.

func (*PostgresqlIndexNameResourceAttributeConfig) Unmarshal added in v0.156.0

type PostgresqlIndexScansMetricConfig added in v0.148.0

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

PostgresqlIndexScansMetricConfig provides config for the postgresql.index.scans metric.

func (*PostgresqlIndexScansMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlIndexSizeMetricConfig added in v0.148.0

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

PostgresqlIndexSizeMetricConfig provides config for the postgresql.index.size metric.

func (*PostgresqlIndexSizeMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlOperationsMetricAttributeKey added in v0.148.0

type PostgresqlOperationsMetricAttributeKey string

PostgresqlOperationsMetricAttributeKey specifies the key of an attribute for the postgresql.operations metric.

const (
	PostgresqlOperationsMetricAttributeKeyOperation PostgresqlOperationsMetricAttributeKey = "operation"
)

type PostgresqlOperationsMetricConfig added in v0.148.0

type PostgresqlOperationsMetricConfig struct {
	Enabled bool `mapstructure:"enabled"`

	AggregationStrategy string                                   `mapstructure:"aggregation_strategy"`
	EnabledAttributes   []PostgresqlOperationsMetricAttributeKey `mapstructure:"attributes"`
	// contains filtered or unexported fields
}

PostgresqlOperationsMetricConfig provides config for the postgresql.operations metric.

func (*PostgresqlOperationsMetricConfig) Unmarshal added in v0.148.0

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

func (*PostgresqlOperationsMetricConfig) Validate added in v0.148.0

func (ms *PostgresqlOperationsMetricConfig) Validate() error

type PostgresqlReplicationDataDelayMetricAttributeKey added in v0.148.0

type PostgresqlReplicationDataDelayMetricAttributeKey string

PostgresqlReplicationDataDelayMetricAttributeKey specifies the key of an attribute for the postgresql.replication.data_delay metric.

const (
	PostgresqlReplicationDataDelayMetricAttributeKeyReplicationClient PostgresqlReplicationDataDelayMetricAttributeKey = "replication_client"
)

type PostgresqlReplicationDataDelayMetricConfig added in v0.148.0

type PostgresqlReplicationDataDelayMetricConfig struct {
	Enabled bool `mapstructure:"enabled"`

	AggregationStrategy string                                             `mapstructure:"aggregation_strategy"`
	EnabledAttributes   []PostgresqlReplicationDataDelayMetricAttributeKey `mapstructure:"attributes"`
	// contains filtered or unexported fields
}

PostgresqlReplicationDataDelayMetricConfig provides config for the postgresql.replication.data_delay metric.

func (*PostgresqlReplicationDataDelayMetricConfig) Unmarshal added in v0.148.0

func (*PostgresqlReplicationDataDelayMetricConfig) Validate added in v0.148.0

type PostgresqlRollbacksMetricConfig added in v0.148.0

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

PostgresqlRollbacksMetricConfig provides config for the postgresql.rollbacks metric.

func (*PostgresqlRollbacksMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlRowsMetricAttributeKey added in v0.148.0

type PostgresqlRowsMetricAttributeKey string

PostgresqlRowsMetricAttributeKey specifies the key of an attribute for the postgresql.rows metric.

const (
	PostgresqlRowsMetricAttributeKeyState PostgresqlRowsMetricAttributeKey = "state"
)

type PostgresqlRowsMetricConfig added in v0.148.0

type PostgresqlRowsMetricConfig struct {
	Enabled bool `mapstructure:"enabled"`

	AggregationStrategy string                             `mapstructure:"aggregation_strategy"`
	EnabledAttributes   []PostgresqlRowsMetricAttributeKey `mapstructure:"attributes"`
	// contains filtered or unexported fields
}

PostgresqlRowsMetricConfig provides config for the postgresql.rows metric.

func (*PostgresqlRowsMetricConfig) Unmarshal added in v0.148.0

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

func (*PostgresqlRowsMetricConfig) Validate added in v0.148.0

func (ms *PostgresqlRowsMetricConfig) Validate() error

type PostgresqlSchemaNameResourceAttributeConfig added in v0.156.0

type PostgresqlSchemaNameResourceAttributeConfig struct {
	Enabled bool `mapstructure:"enabled"`
	// OverrideValue allows users to override the value of this resource attribute.
	OverrideValue *string `mapstructure:"override_value"`
	// 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"`
	// Experimental: EventsInclude defines a list of filters for attribute values.
	// If the list is not empty, only events with matching resource attribute values will be emitted.
	EventsInclude []filter.Config `mapstructure:"events_include"`
	// Experimental: EventsExclude defines a list of filters for attribute values.
	// If the list is not empty, events with matching resource attribute values will not be emitted.
	// EventsInclude has higher priority than EventsExclude.
	EventsExclude []filter.Config `mapstructure:"events_exclude"`
	// contains filtered or unexported fields
}

PostgresqlSchemaNameResourceAttributeConfig provides config for the postgresql.schema.name resource attribute.

func (*PostgresqlSchemaNameResourceAttributeConfig) Unmarshal added in v0.156.0

type PostgresqlSequentialScansMetricConfig added in v0.148.0

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

PostgresqlSequentialScansMetricConfig provides config for the postgresql.sequential_scans metric.

func (*PostgresqlSequentialScansMetricConfig) Unmarshal added in v0.148.0

type PostgresqlTableCountMetricConfig added in v0.148.0

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

PostgresqlTableCountMetricConfig provides config for the postgresql.table.count metric.

func (*PostgresqlTableCountMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlTableNameResourceAttributeConfig added in v0.156.0

type PostgresqlTableNameResourceAttributeConfig struct {
	Enabled bool `mapstructure:"enabled"`
	// OverrideValue allows users to override the value of this resource attribute.
	OverrideValue *string `mapstructure:"override_value"`
	// 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"`
	// Experimental: EventsInclude defines a list of filters for attribute values.
	// If the list is not empty, only events with matching resource attribute values will be emitted.
	EventsInclude []filter.Config `mapstructure:"events_include"`
	// Experimental: EventsExclude defines a list of filters for attribute values.
	// If the list is not empty, events with matching resource attribute values will not be emitted.
	// EventsInclude has higher priority than EventsExclude.
	EventsExclude []filter.Config `mapstructure:"events_exclude"`
	// contains filtered or unexported fields
}

PostgresqlTableNameResourceAttributeConfig provides config for the postgresql.table.name resource attribute.

func (*PostgresqlTableNameResourceAttributeConfig) Unmarshal added in v0.156.0

type PostgresqlTableSizeMetricConfig added in v0.148.0

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

PostgresqlTableSizeMetricConfig provides config for the postgresql.table.size metric.

func (*PostgresqlTableSizeMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlTableVacuumCountMetricConfig added in v0.148.0

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

PostgresqlTableVacuumCountMetricConfig provides config for the postgresql.table.vacuum.count metric.

func (*PostgresqlTableVacuumCountMetricConfig) Unmarshal added in v0.148.0

type PostgresqlTempFilesMetricConfig added in v0.148.0

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

PostgresqlTempFilesMetricConfig provides config for the postgresql.temp_files metric.

func (*PostgresqlTempFilesMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlTempIoMetricConfig added in v0.148.0

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

PostgresqlTempIoMetricConfig provides config for the postgresql.temp.io metric.

func (*PostgresqlTempIoMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlTupDeletedMetricConfig added in v0.148.0

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

PostgresqlTupDeletedMetricConfig provides config for the postgresql.tup_deleted metric.

func (*PostgresqlTupDeletedMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlTupFetchedMetricConfig added in v0.148.0

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

PostgresqlTupFetchedMetricConfig provides config for the postgresql.tup_fetched metric.

func (*PostgresqlTupFetchedMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlTupInsertedMetricConfig added in v0.148.0

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

PostgresqlTupInsertedMetricConfig provides config for the postgresql.tup_inserted metric.

func (*PostgresqlTupInsertedMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlTupReturnedMetricConfig added in v0.148.0

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

PostgresqlTupReturnedMetricConfig provides config for the postgresql.tup_returned metric.

func (*PostgresqlTupReturnedMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlTupUpdatedMetricConfig added in v0.148.0

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

PostgresqlTupUpdatedMetricConfig provides config for the postgresql.tup_updated metric.

func (*PostgresqlTupUpdatedMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlWalAgeMetricConfig added in v0.148.0

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

PostgresqlWalAgeMetricConfig provides config for the postgresql.wal.age metric.

func (*PostgresqlWalAgeMetricConfig) Unmarshal added in v0.148.0

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

type PostgresqlWalDelayMetricAttributeKey added in v0.148.0

type PostgresqlWalDelayMetricAttributeKey string

PostgresqlWalDelayMetricAttributeKey specifies the key of an attribute for the postgresql.wal.delay metric.

const (
	PostgresqlWalDelayMetricAttributeKeyWalOperationLag   PostgresqlWalDelayMetricAttributeKey = "operation"
	PostgresqlWalDelayMetricAttributeKeyReplicationClient PostgresqlWalDelayMetricAttributeKey = "replication_client"
)

type PostgresqlWalDelayMetricConfig added in v0.148.0

type PostgresqlWalDelayMetricConfig struct {
	Enabled bool `mapstructure:"enabled"`

	AggregationStrategy string                                 `mapstructure:"aggregation_strategy"`
	EnabledAttributes   []PostgresqlWalDelayMetricAttributeKey `mapstructure:"attributes"`
	// contains filtered or unexported fields
}

PostgresqlWalDelayMetricConfig provides config for the postgresql.wal.delay metric.

func (*PostgresqlWalDelayMetricConfig) Unmarshal added in v0.148.0

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

func (*PostgresqlWalDelayMetricConfig) Validate added in v0.148.0

func (ms *PostgresqlWalDelayMetricConfig) Validate() error

type PostgresqlWalLagMetricAttributeKey added in v0.148.0

type PostgresqlWalLagMetricAttributeKey string

PostgresqlWalLagMetricAttributeKey specifies the key of an attribute for the postgresql.wal.lag metric.

const (
	PostgresqlWalLagMetricAttributeKeyWalOperationLag   PostgresqlWalLagMetricAttributeKey = "operation"
	PostgresqlWalLagMetricAttributeKeyReplicationClient PostgresqlWalLagMetricAttributeKey = "replication_client"
)

type PostgresqlWalLagMetricConfig added in v0.148.0

type PostgresqlWalLagMetricConfig struct {
	Enabled bool `mapstructure:"enabled"`

	AggregationStrategy string                               `mapstructure:"aggregation_strategy"`
	EnabledAttributes   []PostgresqlWalLagMetricAttributeKey `mapstructure:"attributes"`
	// contains filtered or unexported fields
}

PostgresqlWalLagMetricConfig provides config for the postgresql.wal.lag metric.

func (*PostgresqlWalLagMetricConfig) Unmarshal added in v0.148.0

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

func (*PostgresqlWalLagMetricConfig) Validate added in v0.148.0

func (ms *PostgresqlWalLagMetricConfig) Validate() error

type ResourceAttributesConfig added in v0.77.0

type ResourceAttributesConfig struct {
	PostgresqlDatabaseName PostgresqlDatabaseNameResourceAttributeConfig `mapstructure:"postgresql.database.name"`
	PostgresqlIndexName    PostgresqlIndexNameResourceAttributeConfig    `mapstructure:"postgresql.index.name"`
	PostgresqlSchemaName   PostgresqlSchemaNameResourceAttributeConfig   `mapstructure:"postgresql.schema.name"`
	PostgresqlTableName    PostgresqlTableNameResourceAttributeConfig    `mapstructure:"postgresql.table.name"`
	ServiceInstanceID      ServiceInstanceIDResourceAttributeConfig      `mapstructure:"service.instance.id"`
	ServiceName            ServiceNameResourceAttributeConfig            `mapstructure:"service.name"`
	ServiceNamespace       ServiceNamespaceResourceAttributeConfig       `mapstructure:"service.namespace"`
}

ResourceAttributesConfig provides config for postgresql resource attributes.

func DefaultResourceAttributesConfig added in v0.77.0

func DefaultResourceAttributesConfig() ResourceAttributesConfig

type ResourceBuilder added in v0.82.0

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 added in v0.82.0

func NewResourceBuilder(rac ResourceAttributesConfig) *ResourceBuilder

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

func (*ResourceBuilder) Emit added in v0.82.0

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

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

func (*ResourceBuilder) SetPostgresqlDatabaseName added in v0.82.0

func (rb *ResourceBuilder) SetPostgresqlDatabaseName(val string)

SetPostgresqlDatabaseName sets provided value as "postgresql.database.name" attribute.

func (*ResourceBuilder) SetPostgresqlIndexName added in v0.82.0

func (rb *ResourceBuilder) SetPostgresqlIndexName(val string)

SetPostgresqlIndexName sets provided value as "postgresql.index.name" attribute.

func (*ResourceBuilder) SetPostgresqlSchemaName added in v0.93.0

func (rb *ResourceBuilder) SetPostgresqlSchemaName(val string)

SetPostgresqlSchemaName sets provided value as "postgresql.schema.name" attribute.

func (*ResourceBuilder) SetPostgresqlTableName added in v0.82.0

func (rb *ResourceBuilder) SetPostgresqlTableName(val string)

SetPostgresqlTableName sets provided value as "postgresql.table.name" attribute.

func (*ResourceBuilder) SetServiceInstanceID added in v0.143.0

func (rb *ResourceBuilder) SetServiceInstanceID(val string)

SetServiceInstanceID sets provided value as "service.instance.id" attribute.

func (*ResourceBuilder) SetServiceName added in v0.156.0

func (rb *ResourceBuilder) SetServiceName(val string)

SetServiceName sets provided value as "service.name" attribute.

func (*ResourceBuilder) SetServiceNamespace added in v0.156.0

func (rb *ResourceBuilder) SetServiceNamespace(val string)

SetServiceNamespace sets provided value as "service.namespace" attribute.

type ResourceLogsOption added in v0.124.0

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

ResourceLogsOption applies changes to provided resource logs.

func WithLogsResource added in v0.124.0

func WithLogsResource(res pcommon.Resource) ResourceLogsOption

WithLogsResource sets the provided resource on the emitted ResourceLogs. It's recommended to use ResourceBuilder to create the resource.

type ResourceMetricsOption added in v0.52.0

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

ResourceMetricsOption applies changes to provided resource metrics.

func WithResource added in v0.82.0

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 added in v0.52.0

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.

type ServiceInstanceIDResourceAttributeConfig added in v0.156.0

type ServiceInstanceIDResourceAttributeConfig struct {
	Enabled bool `mapstructure:"enabled"`
	// OverrideValue allows users to override the value of this resource attribute.
	OverrideValue *string `mapstructure:"override_value"`
	// 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"`
	// Experimental: EventsInclude defines a list of filters for attribute values.
	// If the list is not empty, only events with matching resource attribute values will be emitted.
	EventsInclude []filter.Config `mapstructure:"events_include"`
	// Experimental: EventsExclude defines a list of filters for attribute values.
	// If the list is not empty, events with matching resource attribute values will not be emitted.
	// EventsInclude has higher priority than EventsExclude.
	EventsExclude []filter.Config `mapstructure:"events_exclude"`
	// contains filtered or unexported fields
}

ServiceInstanceIDResourceAttributeConfig provides config for the service.instance.id resource attribute.

func (*ServiceInstanceIDResourceAttributeConfig) Unmarshal added in v0.156.0

type ServiceNameResourceAttributeConfig added in v0.156.0

type ServiceNameResourceAttributeConfig struct {
	Enabled bool `mapstructure:"enabled"`
	// OverrideValue allows users to override the value of this resource attribute.
	OverrideValue *string `mapstructure:"override_value"`
	// 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"`
	// Experimental: EventsInclude defines a list of filters for attribute values.
	// If the list is not empty, only events with matching resource attribute values will be emitted.
	EventsInclude []filter.Config `mapstructure:"events_include"`
	// Experimental: EventsExclude defines a list of filters for attribute values.
	// If the list is not empty, events with matching resource attribute values will not be emitted.
	// EventsInclude has higher priority than EventsExclude.
	EventsExclude []filter.Config `mapstructure:"events_exclude"`
	// contains filtered or unexported fields
}

ServiceNameResourceAttributeConfig provides config for the service.name resource attribute.

func (*ServiceNameResourceAttributeConfig) Unmarshal added in v0.156.0

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

type ServiceNamespaceResourceAttributeConfig added in v0.156.0

type ServiceNamespaceResourceAttributeConfig struct {
	Enabled bool `mapstructure:"enabled"`
	// OverrideValue allows users to override the value of this resource attribute.
	OverrideValue *string `mapstructure:"override_value"`
	// 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"`
	// Experimental: EventsInclude defines a list of filters for attribute values.
	// If the list is not empty, only events with matching resource attribute values will be emitted.
	EventsInclude []filter.Config `mapstructure:"events_include"`
	// Experimental: EventsExclude defines a list of filters for attribute values.
	// If the list is not empty, events with matching resource attribute values will not be emitted.
	// EventsInclude has higher priority than EventsExclude.
	EventsExclude []filter.Config `mapstructure:"events_exclude"`
	// contains filtered or unexported fields
}

ServiceNamespaceResourceAttributeConfig provides config for the service.namespace resource attribute.

func (*ServiceNamespaceResourceAttributeConfig) Unmarshal added in v0.156.0

Jump to

Keyboard shortcuts

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