metadata

package
v1.69.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	MetricsStability = component.StabilityLevelAlpha
)

Variables

View Source
var (
	Type      = component.MustNewType("sapnetweaver")
	ScopeName = "github.com/observiq/bindplane-otel-collector/receiver/sapnetweaverreceiver"
)

MapAttributeControlState is a helper map of string to AttributeControlState attribute value.

MapAttributeResponseType is a helper map of string to AttributeResponseType attribute value.

Functions

This section is empty.

Types

type AttributeControlState

type AttributeControlState int

AttributeControlState specifies the value control_state attribute.

const (
	AttributeControlStateGray AttributeControlState
	AttributeControlStateGreen
	AttributeControlStateYellow
	AttributeControlStateRed
)

func (AttributeControlState) String

func (av AttributeControlState) String() string

String returns the string representation of the AttributeControlState.

type AttributeResponseType

type AttributeResponseType int

AttributeResponseType specifies the value response_type attribute.

const (
	AttributeResponseTypeTransaction AttributeResponseType
	AttributeResponseTypeDialog
	AttributeResponseTypeDialogRFC
	AttributeResponseTypeHttp
)

func (AttributeResponseType) String

func (av AttributeResponseType) String() string

String returns the string representation of the AttributeResponseType.

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) RecordSapnetweaverAbapUpdateStatusDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverAbapUpdateStatusDataPoint(ts pcommon.Timestamp, val int64, controlStateAttributeValue AttributeControlState)

RecordSapnetweaverAbapUpdateStatusDataPoint adds a data point to sapnetweaver.abap.update.status metric.

func (*MetricsBuilder) RecordSapnetweaverCPUSystemUtilizationDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverCPUSystemUtilizationDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverCPUSystemUtilizationDataPoint adds a data point to sapnetweaver.cpu.system.utilization metric.

func (*MetricsBuilder) RecordSapnetweaverCPUUtilizationDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverCPUUtilizationDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverCPUUtilizationDataPoint adds a data point to sapnetweaver.cpu.utilization metric.

func (*MetricsBuilder) RecordSapnetweaverCacheEvictionsDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverCacheEvictionsDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverCacheEvictionsDataPoint adds a data point to sapnetweaver.cache.evictions metric.

func (*MetricsBuilder) RecordSapnetweaverCacheHitsDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverCacheHitsDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverCacheHitsDataPoint adds a data point to sapnetweaver.cache.hits metric.

func (*MetricsBuilder) RecordSapnetweaverConnectionErrorCountDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverConnectionErrorCountDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverConnectionErrorCountDataPoint adds a data point to sapnetweaver.connection.error.count metric.

func (*MetricsBuilder) RecordSapnetweaverDatabaseDialogRequestTimeDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverDatabaseDialogRequestTimeDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverDatabaseDialogRequestTimeDataPoint adds a data point to sapnetweaver.database.dialog.request.time metric.

func (*MetricsBuilder) RecordSapnetweaverHostMemoryVirtualOverheadDataPoint

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

RecordSapnetweaverHostMemoryVirtualOverheadDataPoint adds a data point to sapnetweaver.host.memory.virtual.overhead metric.

func (*MetricsBuilder) RecordSapnetweaverHostMemoryVirtualSwapDataPoint

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

RecordSapnetweaverHostMemoryVirtualSwapDataPoint adds a data point to sapnetweaver.host.memory.virtual.swap metric.

func (*MetricsBuilder) RecordSapnetweaverHostSpoolListUtilizationDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverHostSpoolListUtilizationDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverHostSpoolListUtilizationDataPoint adds a data point to sapnetweaver.host.spool_list.utilization metric.

func (*MetricsBuilder) RecordSapnetweaverLocksDequeueErrorsCountDataPoint

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

RecordSapnetweaverLocksDequeueErrorsCountDataPoint adds a data point to sapnetweaver.locks.dequeue.errors.count metric.

func (*MetricsBuilder) RecordSapnetweaverLocksEnqueueCurrentCountDataPoint

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

RecordSapnetweaverLocksEnqueueCurrentCountDataPoint adds a data point to sapnetweaver.locks.enqueue.current.count metric.

func (*MetricsBuilder) RecordSapnetweaverLocksEnqueueErrorsCountDataPoint

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

RecordSapnetweaverLocksEnqueueErrorsCountDataPoint adds a data point to sapnetweaver.locks.enqueue.errors.count metric.

func (*MetricsBuilder) RecordSapnetweaverLocksEnqueueHighCountDataPoint

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

RecordSapnetweaverLocksEnqueueHighCountDataPoint adds a data point to sapnetweaver.locks.enqueue.high.count metric.

func (*MetricsBuilder) RecordSapnetweaverLocksEnqueueLockTimeDataPoint

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

RecordSapnetweaverLocksEnqueueLockTimeDataPoint adds a data point to sapnetweaver.locks.enqueue.lock_time metric.

func (*MetricsBuilder) RecordSapnetweaverLocksEnqueueLockWaitTimeDataPoint

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

RecordSapnetweaverLocksEnqueueLockWaitTimeDataPoint adds a data point to sapnetweaver.locks.enqueue.lock_wait_time metric.

func (*MetricsBuilder) RecordSapnetweaverLocksEnqueueMaxCountDataPoint

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

RecordSapnetweaverLocksEnqueueMaxCountDataPoint adds a data point to sapnetweaver.locks.enqueue.max.count metric.

func (*MetricsBuilder) RecordSapnetweaverMemoryConfiguredDataPoint

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

RecordSapnetweaverMemoryConfiguredDataPoint adds a data point to sapnetweaver.memory.configured metric.

func (*MetricsBuilder) RecordSapnetweaverMemoryFreeDataPoint

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

RecordSapnetweaverMemoryFreeDataPoint adds a data point to sapnetweaver.memory.free metric.

func (*MetricsBuilder) RecordSapnetweaverMemorySwapSpaceUtilizationDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverMemorySwapSpaceUtilizationDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverMemorySwapSpaceUtilizationDataPoint adds a data point to sapnetweaver.memory.swap_space.utilization metric.

func (*MetricsBuilder) RecordSapnetweaverProcessAvailabilityDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverProcessAvailabilityDataPoint(ts pcommon.Timestamp, val int64, processNameAttributeValue string, processDescriptionAttributeValue string, controlStateAttributeValue AttributeControlState)

RecordSapnetweaverProcessAvailabilityDataPoint adds a data point to sapnetweaver.process_availability metric.

func (*MetricsBuilder) RecordSapnetweaverQueueCountDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverQueueCountDataPoint(ts pcommon.Timestamp, val int64, wpTypeAttributeValue string)

RecordSapnetweaverQueueCountDataPoint adds a data point to sapnetweaver.queue.count metric.

func (*MetricsBuilder) RecordSapnetweaverQueueMaxCountDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverQueueMaxCountDataPoint(ts pcommon.Timestamp, val int64, wpTypeAttributeValue string)

RecordSapnetweaverQueueMaxCountDataPoint adds a data point to sapnetweaver.queue_max.count metric.

func (*MetricsBuilder) RecordSapnetweaverQueuePeakCountDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverQueuePeakCountDataPoint(ts pcommon.Timestamp, val int64, wpTypeAttributeValue string)

RecordSapnetweaverQueuePeakCountDataPoint adds a data point to sapnetweaver.queue_peak.count metric.

func (*MetricsBuilder) RecordSapnetweaverRequestCountDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverRequestCountDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverRequestCountDataPoint adds a data point to sapnetweaver.request.count metric.

func (*MetricsBuilder) RecordSapnetweaverRequestTimeoutCountDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverRequestTimeoutCountDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverRequestTimeoutCountDataPoint adds a data point to sapnetweaver.request.timeout.count metric.

func (*MetricsBuilder) RecordSapnetweaverResponseDurationDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverResponseDurationDataPoint(ts pcommon.Timestamp, inputVal string, responseTypeAttributeValue AttributeResponseType) error

RecordSapnetweaverResponseDurationDataPoint adds a data point to sapnetweaver.response.duration metric.

func (*MetricsBuilder) RecordSapnetweaverSessionCountDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverSessionCountDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverSessionCountDataPoint adds a data point to sapnetweaver.session.count metric.

func (*MetricsBuilder) RecordSapnetweaverSessionsBrowserCountDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverSessionsBrowserCountDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverSessionsBrowserCountDataPoint adds a data point to sapnetweaver.sessions.browser.count metric.

func (*MetricsBuilder) RecordSapnetweaverSessionsEjbCountDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverSessionsEjbCountDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverSessionsEjbCountDataPoint adds a data point to sapnetweaver.sessions.ejb.count metric.

func (*MetricsBuilder) RecordSapnetweaverSessionsHTTPCountDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverSessionsHTTPCountDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverSessionsHTTPCountDataPoint adds a data point to sapnetweaver.sessions.http.count metric.

func (*MetricsBuilder) RecordSapnetweaverSessionsSecurityCountDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverSessionsSecurityCountDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverSessionsSecurityCountDataPoint adds a data point to sapnetweaver.sessions.security.count metric.

func (*MetricsBuilder) RecordSapnetweaverSessionsWebCountDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverSessionsWebCountDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverSessionsWebCountDataPoint adds a data point to sapnetweaver.sessions.web.count metric.

func (*MetricsBuilder) RecordSapnetweaverShortDumpsRateDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverShortDumpsRateDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverShortDumpsRateDataPoint adds a data point to sapnetweaver.short_dumps.rate metric.

func (*MetricsBuilder) RecordSapnetweaverSpoolRequestErrorCountDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverSpoolRequestErrorCountDataPoint(ts pcommon.Timestamp, inputVal string) error

RecordSapnetweaverSpoolRequestErrorCountDataPoint adds a data point to sapnetweaver.spool.request.error.count metric.

func (*MetricsBuilder) RecordSapnetweaverSystemInstanceAvailabilityDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverSystemInstanceAvailabilityDataPoint(ts pcommon.Timestamp, val int64, hostnameAttributeValue string, instanceNumberAttributeValue int64, featureAttributeValue string, controlStateAttributeValue AttributeControlState)

RecordSapnetweaverSystemInstanceAvailabilityDataPoint adds a data point to sapnetweaver.system.instance_availability metric.

func (*MetricsBuilder) RecordSapnetweaverWorkProcessActiveCountDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverWorkProcessActiveCountDataPoint(ts pcommon.Timestamp, val int64, instanceAttributeValue string, wpTypeAttributeValue string, wpStatusAttributeValue string)

RecordSapnetweaverWorkProcessActiveCountDataPoint adds a data point to sapnetweaver.work_process.active.count metric.

func (*MetricsBuilder) RecordSapnetweaverWorkProcessJobAbortedStatusDataPoint

func (mb *MetricsBuilder) RecordSapnetweaverWorkProcessJobAbortedStatusDataPoint(ts pcommon.Timestamp, val int64, controlStateAttributeValue AttributeControlState)

RecordSapnetweaverWorkProcessJobAbortedStatusDataPoint adds a data point to sapnetweaver.work_process.job.aborted.status 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 sapnetweaver metrics builder.

func DefaultMetricsBuilderConfig

func DefaultMetricsBuilderConfig() MetricsBuilderConfig

type MetricsConfig

type MetricsConfig struct {
	SapnetweaverAbapUpdateStatus            MetricConfig `mapstructure:"sapnetweaver.abap.update.status"`
	SapnetweaverCacheEvictions              MetricConfig `mapstructure:"sapnetweaver.cache.evictions"`
	SapnetweaverCacheHits                   MetricConfig `mapstructure:"sapnetweaver.cache.hits"`
	SapnetweaverConnectionErrorCount        MetricConfig `mapstructure:"sapnetweaver.connection.error.count"`
	SapnetweaverCPUSystemUtilization        MetricConfig `mapstructure:"sapnetweaver.cpu.system.utilization"`
	SapnetweaverCPUUtilization              MetricConfig `mapstructure:"sapnetweaver.cpu.utilization"`
	SapnetweaverDatabaseDialogRequestTime   MetricConfig `mapstructure:"sapnetweaver.database.dialog.request.time"`
	SapnetweaverHostMemoryVirtualOverhead   MetricConfig `mapstructure:"sapnetweaver.host.memory.virtual.overhead"`
	SapnetweaverHostMemoryVirtualSwap       MetricConfig `mapstructure:"sapnetweaver.host.memory.virtual.swap"`
	SapnetweaverHostSpoolListUtilization    MetricConfig `mapstructure:"sapnetweaver.host.spool_list.utilization"`
	SapnetweaverLocksDequeueErrorsCount     MetricConfig `mapstructure:"sapnetweaver.locks.dequeue.errors.count"`
	SapnetweaverLocksEnqueueCurrentCount    MetricConfig `mapstructure:"sapnetweaver.locks.enqueue.current.count"`
	SapnetweaverLocksEnqueueErrorsCount     MetricConfig `mapstructure:"sapnetweaver.locks.enqueue.errors.count"`
	SapnetweaverLocksEnqueueHighCount       MetricConfig `mapstructure:"sapnetweaver.locks.enqueue.high.count"`
	SapnetweaverLocksEnqueueLockTime        MetricConfig `mapstructure:"sapnetweaver.locks.enqueue.lock_time"`
	SapnetweaverLocksEnqueueLockWaitTime    MetricConfig `mapstructure:"sapnetweaver.locks.enqueue.lock_wait_time"`
	SapnetweaverLocksEnqueueMaxCount        MetricConfig `mapstructure:"sapnetweaver.locks.enqueue.max.count"`
	SapnetweaverMemoryConfigured            MetricConfig `mapstructure:"sapnetweaver.memory.configured"`
	SapnetweaverMemoryFree                  MetricConfig `mapstructure:"sapnetweaver.memory.free"`
	SapnetweaverMemorySwapSpaceUtilization  MetricConfig `mapstructure:"sapnetweaver.memory.swap_space.utilization"`
	SapnetweaverProcessAvailability         MetricConfig `mapstructure:"sapnetweaver.process_availability"`
	SapnetweaverQueueCount                  MetricConfig `mapstructure:"sapnetweaver.queue.count"`
	SapnetweaverQueueMaxCount               MetricConfig `mapstructure:"sapnetweaver.queue_max.count"`
	SapnetweaverQueuePeakCount              MetricConfig `mapstructure:"sapnetweaver.queue_peak.count"`
	SapnetweaverRequestCount                MetricConfig `mapstructure:"sapnetweaver.request.count"`
	SapnetweaverRequestTimeoutCount         MetricConfig `mapstructure:"sapnetweaver.request.timeout.count"`
	SapnetweaverResponseDuration            MetricConfig `mapstructure:"sapnetweaver.response.duration"`
	SapnetweaverSessionCount                MetricConfig `mapstructure:"sapnetweaver.session.count"`
	SapnetweaverSessionsBrowserCount        MetricConfig `mapstructure:"sapnetweaver.sessions.browser.count"`
	SapnetweaverSessionsEjbCount            MetricConfig `mapstructure:"sapnetweaver.sessions.ejb.count"`
	SapnetweaverSessionsHTTPCount           MetricConfig `mapstructure:"sapnetweaver.sessions.http.count"`
	SapnetweaverSessionsSecurityCount       MetricConfig `mapstructure:"sapnetweaver.sessions.security.count"`
	SapnetweaverSessionsWebCount            MetricConfig `mapstructure:"sapnetweaver.sessions.web.count"`
	SapnetweaverShortDumpsRate              MetricConfig `mapstructure:"sapnetweaver.short_dumps.rate"`
	SapnetweaverSpoolRequestErrorCount      MetricConfig `mapstructure:"sapnetweaver.spool.request.error.count"`
	SapnetweaverSystemInstanceAvailability  MetricConfig `mapstructure:"sapnetweaver.system.instance_availability"`
	SapnetweaverWorkProcessActiveCount      MetricConfig `mapstructure:"sapnetweaver.work_process.active.count"`
	SapnetweaverWorkProcessJobAbortedStatus MetricConfig `mapstructure:"sapnetweaver.work_process.job.aborted.status"`
}

MetricsConfig provides config for sapnetweaver 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 {
	SapnetweaverSID      ResourceAttributeConfig `mapstructure:"sapnetweaver.SID"`
	SapnetweaverInstance ResourceAttributeConfig `mapstructure:"sapnetweaver.instance"`
	SapnetweaverNode     ResourceAttributeConfig `mapstructure:"sapnetweaver.node"`
}

ResourceAttributesConfig provides config for sapnetweaver 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) SetSapnetweaverInstance

func (rb *ResourceBuilder) SetSapnetweaverInstance(val string)

SetSapnetweaverInstance sets provided value as "sapnetweaver.instance" attribute.

func (*ResourceBuilder) SetSapnetweaverNode

func (rb *ResourceBuilder) SetSapnetweaverNode(val string)

SetSapnetweaverNode sets provided value as "sapnetweaver.node" attribute.

func (*ResourceBuilder) SetSapnetweaverSID

func (rb *ResourceBuilder) SetSapnetweaverSID(val string)

SetSapnetweaverSID sets provided value as "sapnetweaver.SID" 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