metadata

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsStability = component.StabilityLevelBeta
)

Variables

View Source
var MapAttributeBindType = map[string]AttributeBindType{
	"server": AttributeBindTypeServer,
	"client": AttributeBindTypeClient,
}

MapAttributeBindType is a helper map of string to AttributeBindType attribute value.

View Source
var MapAttributeDirection = map[string]AttributeDirection{
	"sent":     AttributeDirectionSent,
	"received": AttributeDirectionReceived,
}

MapAttributeDirection is a helper map of string to AttributeDirection attribute value.

View Source
var MapAttributeNetworkDataType = map[string]AttributeNetworkDataType{
	"compressed":   AttributeNetworkDataTypeCompressed,
	"uncompressed": AttributeNetworkDataTypeUncompressed,
}

MapAttributeNetworkDataType is a helper map of string to AttributeNetworkDataType attribute value.

MapAttributeOperationType is a helper map of string to AttributeOperationType attribute value.

View Source
var MapAttributeSuboperationType = map[string]AttributeSuboperationType{
	"security_descriptor_propagations_event": AttributeSuboperationTypeSecurityDescriptorPropagationsEvent,
	"search":                                 AttributeSuboperationTypeSearch,
}

MapAttributeSuboperationType is a helper map of string to AttributeSuboperationType attribute value.

View Source
var MapAttributeSyncResult = map[string]AttributeSyncResult{
	"success":         AttributeSyncResultSuccess,
	"schema_mismatch": AttributeSyncResultSchemaMismatch,
	"other":           AttributeSyncResultOther,
}

MapAttributeSyncResult is a helper map of string to AttributeSyncResult attribute value.

View Source
var MapAttributeValueType = map[string]AttributeValueType{
	"distingushed_names": AttributeValueTypeDistingushedNames,
	"other":              AttributeValueTypeOther,
}

MapAttributeValueType is a helper map of string to AttributeValueType attribute value.

View Source
var (
	Type = component.MustNewType("active_directory_ds")
)

Functions

func Meter added in v0.92.0

func Meter(settings component.TelemetrySettings) metric.Meter

func Tracer added in v0.92.0

func Tracer(settings component.TelemetrySettings) trace.Tracer

func WithStartTime

func WithStartTime(startTime pcommon.Timestamp) metricBuilderOption

WithStartTime sets startTime on the metrics builder.

Types

type AttributeBindType

type AttributeBindType int

AttributeBindType specifies the a value bind_type attribute.

const (
	AttributeBindTypeServer AttributeBindType
	AttributeBindTypeClient
)

func (AttributeBindType) String added in v0.51.0

func (av AttributeBindType) String() string

String returns the string representation of the AttributeBindType.

type AttributeDirection

type AttributeDirection int

AttributeDirection specifies the a value direction attribute.

const (
	AttributeDirectionSent AttributeDirection
	AttributeDirectionReceived
)

func (AttributeDirection) String added in v0.51.0

func (av AttributeDirection) String() string

String returns the string representation of the AttributeDirection.

type AttributeNetworkDataType

type AttributeNetworkDataType int

AttributeNetworkDataType specifies the a value network_data_type attribute.

const (
	AttributeNetworkDataTypeCompressed AttributeNetworkDataType
	AttributeNetworkDataTypeUncompressed
)

func (AttributeNetworkDataType) String added in v0.51.0

func (av AttributeNetworkDataType) String() string

String returns the string representation of the AttributeNetworkDataType.

type AttributeOperationType

type AttributeOperationType int

AttributeOperationType specifies the a value operation_type attribute.

const (
	AttributeOperationTypeRead AttributeOperationType
	AttributeOperationTypeWrite
	AttributeOperationTypeSearch
)

func (AttributeOperationType) String added in v0.51.0

func (av AttributeOperationType) String() string

String returns the string representation of the AttributeOperationType.

type AttributeSuboperationType

type AttributeSuboperationType int

AttributeSuboperationType specifies the a value suboperation_type attribute.

const (
	AttributeSuboperationTypeSecurityDescriptorPropagationsEvent AttributeSuboperationType
	AttributeSuboperationTypeSearch
)

func (AttributeSuboperationType) String added in v0.51.0

func (av AttributeSuboperationType) String() string

String returns the string representation of the AttributeSuboperationType.

type AttributeSyncResult

type AttributeSyncResult int

AttributeSyncResult specifies the a value sync_result attribute.

const (
	AttributeSyncResultSuccess AttributeSyncResult
	AttributeSyncResultSchemaMismatch
	AttributeSyncResultOther
)

func (AttributeSyncResult) String added in v0.51.0

func (av AttributeSyncResult) String() string

String returns the string representation of the AttributeSyncResult.

type AttributeValueType

type AttributeValueType int

AttributeValueType specifies the a value value_type attribute.

const (
	AttributeValueTypeDistingushedNames AttributeValueType
	AttributeValueTypeOther
)

func (AttributeValueType) String added in v0.51.0

func (av AttributeValueType) String() string

String returns the string representation of the AttributeValueType.

type MetricConfig added in v0.77.0

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

MetricConfig provides common config for a particular metric.

func (*MetricConfig) Unmarshal added in v0.77.0

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.CreateSettings, options ...metricBuilderOption) *MetricsBuilder

func (*MetricsBuilder) Emit

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(rmo ...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) RecordActiveDirectoryDsBindRateDataPoint

func (mb *MetricsBuilder) RecordActiveDirectoryDsBindRateDataPoint(ts pcommon.Timestamp, val float64, bindTypeAttributeValue AttributeBindType)

RecordActiveDirectoryDsBindRateDataPoint adds a data point to active_directory.ds.bind.rate metric.

func (*MetricsBuilder) RecordActiveDirectoryDsLdapBindLastSuccessfulTimeDataPoint

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

RecordActiveDirectoryDsLdapBindLastSuccessfulTimeDataPoint adds a data point to active_directory.ds.ldap.bind.last_successful.time metric.

func (*MetricsBuilder) RecordActiveDirectoryDsLdapBindRateDataPoint

func (mb *MetricsBuilder) RecordActiveDirectoryDsLdapBindRateDataPoint(ts pcommon.Timestamp, val float64)

RecordActiveDirectoryDsLdapBindRateDataPoint adds a data point to active_directory.ds.ldap.bind.rate metric.

func (*MetricsBuilder) RecordActiveDirectoryDsLdapClientSessionCountDataPoint

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

RecordActiveDirectoryDsLdapClientSessionCountDataPoint adds a data point to active_directory.ds.ldap.client.session.count metric.

func (*MetricsBuilder) RecordActiveDirectoryDsLdapSearchRateDataPoint

func (mb *MetricsBuilder) RecordActiveDirectoryDsLdapSearchRateDataPoint(ts pcommon.Timestamp, val float64)

RecordActiveDirectoryDsLdapSearchRateDataPoint adds a data point to active_directory.ds.ldap.search.rate metric.

func (*MetricsBuilder) RecordActiveDirectoryDsNameCacheHitRateDataPoint

func (mb *MetricsBuilder) RecordActiveDirectoryDsNameCacheHitRateDataPoint(ts pcommon.Timestamp, val float64)

RecordActiveDirectoryDsNameCacheHitRateDataPoint adds a data point to active_directory.ds.name_cache.hit_rate metric.

func (*MetricsBuilder) RecordActiveDirectoryDsNotificationQueuedDataPoint

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

RecordActiveDirectoryDsNotificationQueuedDataPoint adds a data point to active_directory.ds.notification.queued metric.

func (*MetricsBuilder) RecordActiveDirectoryDsOperationRateDataPoint

func (mb *MetricsBuilder) RecordActiveDirectoryDsOperationRateDataPoint(ts pcommon.Timestamp, val float64, operationTypeAttributeValue AttributeOperationType)

RecordActiveDirectoryDsOperationRateDataPoint adds a data point to active_directory.ds.operation.rate metric.

func (*MetricsBuilder) RecordActiveDirectoryDsReplicationNetworkIoDataPoint

func (mb *MetricsBuilder) RecordActiveDirectoryDsReplicationNetworkIoDataPoint(ts pcommon.Timestamp, val int64, directionAttributeValue AttributeDirection, networkDataTypeAttributeValue AttributeNetworkDataType)

RecordActiveDirectoryDsReplicationNetworkIoDataPoint adds a data point to active_directory.ds.replication.network.io metric.

func (*MetricsBuilder) RecordActiveDirectoryDsReplicationObjectRateDataPoint

func (mb *MetricsBuilder) RecordActiveDirectoryDsReplicationObjectRateDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection)

RecordActiveDirectoryDsReplicationObjectRateDataPoint adds a data point to active_directory.ds.replication.object.rate metric.

func (*MetricsBuilder) RecordActiveDirectoryDsReplicationOperationPendingDataPoint

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

RecordActiveDirectoryDsReplicationOperationPendingDataPoint adds a data point to active_directory.ds.replication.operation.pending metric.

func (*MetricsBuilder) RecordActiveDirectoryDsReplicationPropertyRateDataPoint

func (mb *MetricsBuilder) RecordActiveDirectoryDsReplicationPropertyRateDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection)

RecordActiveDirectoryDsReplicationPropertyRateDataPoint adds a data point to active_directory.ds.replication.property.rate metric.

func (*MetricsBuilder) RecordActiveDirectoryDsReplicationSyncObjectPendingDataPoint

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

RecordActiveDirectoryDsReplicationSyncObjectPendingDataPoint adds a data point to active_directory.ds.replication.sync.object.pending metric.

func (*MetricsBuilder) RecordActiveDirectoryDsReplicationSyncRequestCountDataPoint

func (mb *MetricsBuilder) RecordActiveDirectoryDsReplicationSyncRequestCountDataPoint(ts pcommon.Timestamp, val int64, syncResultAttributeValue AttributeSyncResult)

RecordActiveDirectoryDsReplicationSyncRequestCountDataPoint adds a data point to active_directory.ds.replication.sync.request.count metric.

func (*MetricsBuilder) RecordActiveDirectoryDsReplicationValueRateDataPoint

func (mb *MetricsBuilder) RecordActiveDirectoryDsReplicationValueRateDataPoint(ts pcommon.Timestamp, val float64, directionAttributeValue AttributeDirection, valueTypeAttributeValue AttributeValueType)

RecordActiveDirectoryDsReplicationValueRateDataPoint adds a data point to active_directory.ds.replication.value.rate metric.

func (*MetricsBuilder) RecordActiveDirectoryDsSecurityDescriptorPropagationsEventQueuedDataPoint

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

RecordActiveDirectoryDsSecurityDescriptorPropagationsEventQueuedDataPoint adds a data point to active_directory.ds.security_descriptor_propagations_event.queued metric.

func (*MetricsBuilder) RecordActiveDirectoryDsSuboperationRateDataPoint

func (mb *MetricsBuilder) RecordActiveDirectoryDsSuboperationRateDataPoint(ts pcommon.Timestamp, val float64, suboperationTypeAttributeValue AttributeSuboperationType)

RecordActiveDirectoryDsSuboperationRateDataPoint adds a data point to active_directory.ds.suboperation.rate metric.

func (*MetricsBuilder) RecordActiveDirectoryDsThreadCountDataPoint

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

RecordActiveDirectoryDsThreadCountDataPoint adds a data point to active_directory.ds.thread.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 added in v0.73.0

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

MetricsBuilderConfig is a configuration for active_directory_ds metrics builder.

func DefaultMetricsBuilderConfig added in v0.73.0

func DefaultMetricsBuilderConfig() MetricsBuilderConfig

type MetricsConfig added in v0.77.0

type MetricsConfig struct {
	ActiveDirectoryDsBindRate                                  MetricConfig `mapstructure:"active_directory.ds.bind.rate"`
	ActiveDirectoryDsLdapBindLastSuccessfulTime                MetricConfig `mapstructure:"active_directory.ds.ldap.bind.last_successful.time"`
	ActiveDirectoryDsLdapBindRate                              MetricConfig `mapstructure:"active_directory.ds.ldap.bind.rate"`
	ActiveDirectoryDsLdapClientSessionCount                    MetricConfig `mapstructure:"active_directory.ds.ldap.client.session.count"`
	ActiveDirectoryDsLdapSearchRate                            MetricConfig `mapstructure:"active_directory.ds.ldap.search.rate"`
	ActiveDirectoryDsNameCacheHitRate                          MetricConfig `mapstructure:"active_directory.ds.name_cache.hit_rate"`
	ActiveDirectoryDsNotificationQueued                        MetricConfig `mapstructure:"active_directory.ds.notification.queued"`
	ActiveDirectoryDsOperationRate                             MetricConfig `mapstructure:"active_directory.ds.operation.rate"`
	ActiveDirectoryDsReplicationNetworkIo                      MetricConfig `mapstructure:"active_directory.ds.replication.network.io"`
	ActiveDirectoryDsReplicationObjectRate                     MetricConfig `mapstructure:"active_directory.ds.replication.object.rate"`
	ActiveDirectoryDsReplicationOperationPending               MetricConfig `mapstructure:"active_directory.ds.replication.operation.pending"`
	ActiveDirectoryDsReplicationPropertyRate                   MetricConfig `mapstructure:"active_directory.ds.replication.property.rate"`
	ActiveDirectoryDsReplicationSyncObjectPending              MetricConfig `mapstructure:"active_directory.ds.replication.sync.object.pending"`
	ActiveDirectoryDsReplicationSyncRequestCount               MetricConfig `mapstructure:"active_directory.ds.replication.sync.request.count"`
	ActiveDirectoryDsReplicationValueRate                      MetricConfig `mapstructure:"active_directory.ds.replication.value.rate"`
	ActiveDirectoryDsSecurityDescriptorPropagationsEventQueued MetricConfig `mapstructure:"active_directory.ds.security_descriptor_propagations_event.queued"`
	ActiveDirectoryDsSuboperationRate                          MetricConfig `mapstructure:"active_directory.ds.suboperation.rate"`
	ActiveDirectoryDsThreadCount                               MetricConfig `mapstructure:"active_directory.ds.thread.count"`
}

MetricsConfig provides config for active_directory_ds metrics.

func DefaultMetricsConfig added in v0.77.0

func DefaultMetricsConfig() MetricsConfig

type ResourceMetricsOption added in v0.52.0

type ResourceMetricsOption func(pmetric.ResourceMetrics)

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.

Jump to

Keyboard shortcuts

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