metadata

package
v0.153.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

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

Index

Constants

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

Variables

View Source
var (
	Type      = component.MustNewType("iis")
	ScopeName = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver"
)
View Source
var MapAttributeDirection = map[string]AttributeDirection{
	"sent":     AttributeDirectionSent,
	"received": AttributeDirectionReceived,
}

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

MapAttributeRequest is a helper map of string to AttributeRequest attribute value.

View Source
var MetricsInfo = metricsInfo{
	IisApplicationPoolState: metricInfo{
		Name: "iis.application_pool.state",
	},
	IisApplicationPoolUptime: metricInfo{
		Name: "iis.application_pool.uptime",
	},
	IisConnectionActive: metricInfo{
		Name: "iis.connection.active",
	},
	IisConnectionAnonymous: metricInfo{
		Name: "iis.connection.anonymous",
	},
	IisConnectionAttemptCount: metricInfo{
		Name: "iis.connection.attempt.count",
	},
	IisNetworkBlocked: metricInfo{
		Name: "iis.network.blocked",
	},
	IisNetworkFileCount: metricInfo{
		Name: "iis.network.file.count",
	},
	IisNetworkIo: metricInfo{
		Name: "iis.network.io",
	},
	IisRequestCount: metricInfo{
		Name: "iis.request.count",
	},
	IisRequestQueueAgeMax: metricInfo{
		Name: "iis.request.queue.age.max",
	},
	IisRequestQueueCount: metricInfo{
		Name: "iis.request.queue.count",
	},
	IisRequestRejected: metricInfo{
		Name: "iis.request.rejected",
	},
	IisThreadActive: metricInfo{
		Name: "iis.thread.active",
	},
	IisUptime: metricInfo{
		Name: "iis.uptime",
	},
}

Functions

This section is empty.

Types

type AttributeDirection

type AttributeDirection int

AttributeDirection specifies the 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 AttributeRequest

type AttributeRequest int

AttributeRequest specifies the value request attribute.

const (
	AttributeRequestDelete AttributeRequest
	AttributeRequestGet
	AttributeRequestHead
	AttributeRequestOptions
	AttributeRequestPost
	AttributeRequestPut
	AttributeRequestTrace
)

func (AttributeRequest) String added in v0.51.0

func (av AttributeRequest) String() string

String returns the string representation of the AttributeRequest.

type IisApplicationPoolStateMetricConfig added in v0.148.0

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

IisApplicationPoolStateMetricConfig provides config for the iis.application_pool.state metric.

func (*IisApplicationPoolStateMetricConfig) Unmarshal added in v0.148.0

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

type IisApplicationPoolUptimeMetricConfig added in v0.148.0

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

IisApplicationPoolUptimeMetricConfig provides config for the iis.application_pool.uptime metric.

func (*IisApplicationPoolUptimeMetricConfig) Unmarshal added in v0.148.0

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

type IisConnectionActiveMetricConfig added in v0.148.0

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

IisConnectionActiveMetricConfig provides config for the iis.connection.active metric.

func (*IisConnectionActiveMetricConfig) Unmarshal added in v0.148.0

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

type IisConnectionAnonymousMetricConfig added in v0.148.0

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

IisConnectionAnonymousMetricConfig provides config for the iis.connection.anonymous metric.

func (*IisConnectionAnonymousMetricConfig) Unmarshal added in v0.148.0

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

type IisConnectionAttemptCountMetricConfig added in v0.148.0

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

IisConnectionAttemptCountMetricConfig provides config for the iis.connection.attempt.count metric.

func (*IisConnectionAttemptCountMetricConfig) Unmarshal added in v0.148.0

type IisNetworkBlockedMetricConfig added in v0.148.0

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

IisNetworkBlockedMetricConfig provides config for the iis.network.blocked metric.

func (*IisNetworkBlockedMetricConfig) Unmarshal added in v0.148.0

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

type IisNetworkFileCountMetricAttributeKey added in v0.148.0

type IisNetworkFileCountMetricAttributeKey string

IisNetworkFileCountMetricAttributeKey specifies the key of an attribute for the iis.network.file.count metric.

const (
	IisNetworkFileCountMetricAttributeKeyDirection IisNetworkFileCountMetricAttributeKey = "direction"
)

type IisNetworkFileCountMetricConfig added in v0.148.0

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

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

IisNetworkFileCountMetricConfig provides config for the iis.network.file.count metric.

func (*IisNetworkFileCountMetricConfig) Unmarshal added in v0.148.0

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

func (*IisNetworkFileCountMetricConfig) Validate added in v0.148.0

func (ms *IisNetworkFileCountMetricConfig) Validate() error

type IisNetworkIoMetricAttributeKey added in v0.148.0

type IisNetworkIoMetricAttributeKey string

IisNetworkIoMetricAttributeKey specifies the key of an attribute for the iis.network.io metric.

const (
	IisNetworkIoMetricAttributeKeyDirection IisNetworkIoMetricAttributeKey = "direction"
)

type IisNetworkIoMetricConfig added in v0.148.0

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

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

IisNetworkIoMetricConfig provides config for the iis.network.io metric.

func (*IisNetworkIoMetricConfig) Unmarshal added in v0.148.0

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

func (*IisNetworkIoMetricConfig) Validate added in v0.148.0

func (ms *IisNetworkIoMetricConfig) Validate() error

type IisRequestCountMetricAttributeKey added in v0.148.0

type IisRequestCountMetricAttributeKey string

IisRequestCountMetricAttributeKey specifies the key of an attribute for the iis.request.count metric.

const (
	IisRequestCountMetricAttributeKeyRequest IisRequestCountMetricAttributeKey = "request"
)

type IisRequestCountMetricConfig added in v0.148.0

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

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

IisRequestCountMetricConfig provides config for the iis.request.count metric.

func (*IisRequestCountMetricConfig) Unmarshal added in v0.148.0

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

func (*IisRequestCountMetricConfig) Validate added in v0.148.0

func (ms *IisRequestCountMetricConfig) Validate() error

type IisRequestQueueAgeMaxMetricConfig added in v0.148.0

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

IisRequestQueueAgeMaxMetricConfig provides config for the iis.request.queue.age.max metric.

func (*IisRequestQueueAgeMaxMetricConfig) Unmarshal added in v0.148.0

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

type IisRequestQueueCountMetricConfig added in v0.148.0

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

IisRequestQueueCountMetricConfig provides config for the iis.request.queue.count metric.

func (*IisRequestQueueCountMetricConfig) Unmarshal added in v0.148.0

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

type IisRequestRejectedMetricConfig added in v0.148.0

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

IisRequestRejectedMetricConfig provides config for the iis.request.rejected metric.

func (*IisRequestRejectedMetricConfig) Unmarshal added in v0.148.0

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

type IisThreadActiveMetricConfig added in v0.148.0

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

IisThreadActiveMetricConfig provides config for the iis.thread.active metric.

func (*IisThreadActiveMetricConfig) Unmarshal added in v0.148.0

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

type IisUptimeMetricConfig added in v0.148.0

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

IisUptimeMetricConfig provides config for the iis.uptime metric.

func (*IisUptimeMetricConfig) Unmarshal added in v0.148.0

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

type MetricBuilderOption added in v0.110.0

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 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 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) RecordIisApplicationPoolStateDataPoint added in v0.121.0

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

RecordIisApplicationPoolStateDataPoint adds a data point to iis.application_pool.state metric.

func (*MetricsBuilder) RecordIisApplicationPoolUptimeDataPoint added in v0.121.0

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

RecordIisApplicationPoolUptimeDataPoint adds a data point to iis.application_pool.uptime metric.

func (*MetricsBuilder) RecordIisConnectionActiveDataPoint

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

RecordIisConnectionActiveDataPoint adds a data point to iis.connection.active metric.

func (*MetricsBuilder) RecordIisConnectionAnonymousDataPoint

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

RecordIisConnectionAnonymousDataPoint adds a data point to iis.connection.anonymous metric.

func (*MetricsBuilder) RecordIisConnectionAttemptCountDataPoint

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

RecordIisConnectionAttemptCountDataPoint adds a data point to iis.connection.attempt.count metric.

func (*MetricsBuilder) RecordIisNetworkBlockedDataPoint

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

RecordIisNetworkBlockedDataPoint adds a data point to iis.network.blocked metric.

func (*MetricsBuilder) RecordIisNetworkFileCountDataPoint

func (mb *MetricsBuilder) RecordIisNetworkFileCountDataPoint(ts pcommon.Timestamp, val int64, directionAttributeValue AttributeDirection)

RecordIisNetworkFileCountDataPoint adds a data point to iis.network.file.count metric.

func (*MetricsBuilder) RecordIisNetworkIoDataPoint

func (mb *MetricsBuilder) RecordIisNetworkIoDataPoint(ts pcommon.Timestamp, val int64, directionAttributeValue AttributeDirection)

RecordIisNetworkIoDataPoint adds a data point to iis.network.io metric.

func (*MetricsBuilder) RecordIisRequestCountDataPoint

func (mb *MetricsBuilder) RecordIisRequestCountDataPoint(ts pcommon.Timestamp, val int64, requestAttributeValue AttributeRequest)

RecordIisRequestCountDataPoint adds a data point to iis.request.count metric.

func (*MetricsBuilder) RecordIisRequestQueueAgeMaxDataPoint

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

RecordIisRequestQueueAgeMaxDataPoint adds a data point to iis.request.queue.age.max metric.

func (*MetricsBuilder) RecordIisRequestQueueCountDataPoint

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

RecordIisRequestQueueCountDataPoint adds a data point to iis.request.queue.count metric.

func (*MetricsBuilder) RecordIisRequestRejectedDataPoint

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

RecordIisRequestRejectedDataPoint adds a data point to iis.request.rejected metric.

func (*MetricsBuilder) RecordIisThreadActiveDataPoint

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

RecordIisThreadActiveDataPoint adds a data point to iis.thread.active metric.

func (*MetricsBuilder) RecordIisUptimeDataPoint

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

RecordIisUptimeDataPoint adds a data point to iis.uptime 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"`
	ResourceAttributes ResourceAttributesConfig `mapstructure:"resource_attributes"`
}

MetricsBuilderConfig is a configuration for iis 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 {
	IisApplicationPoolState   IisApplicationPoolStateMetricConfig   `mapstructure:"iis.application_pool.state"`
	IisApplicationPoolUptime  IisApplicationPoolUptimeMetricConfig  `mapstructure:"iis.application_pool.uptime"`
	IisConnectionActive       IisConnectionActiveMetricConfig       `mapstructure:"iis.connection.active"`
	IisConnectionAnonymous    IisConnectionAnonymousMetricConfig    `mapstructure:"iis.connection.anonymous"`
	IisConnectionAttemptCount IisConnectionAttemptCountMetricConfig `mapstructure:"iis.connection.attempt.count"`
	IisNetworkBlocked         IisNetworkBlockedMetricConfig         `mapstructure:"iis.network.blocked"`
	IisNetworkFileCount       IisNetworkFileCountMetricConfig       `mapstructure:"iis.network.file.count"`
	IisNetworkIo              IisNetworkIoMetricConfig              `mapstructure:"iis.network.io"`
	IisRequestCount           IisRequestCountMetricConfig           `mapstructure:"iis.request.count"`
	IisRequestQueueAgeMax     IisRequestQueueAgeMaxMetricConfig     `mapstructure:"iis.request.queue.age.max"`
	IisRequestQueueCount      IisRequestQueueCountMetricConfig      `mapstructure:"iis.request.queue.count"`
	IisRequestRejected        IisRequestRejectedMetricConfig        `mapstructure:"iis.request.rejected"`
	IisThreadActive           IisThreadActiveMetricConfig           `mapstructure:"iis.thread.active"`
	IisUptime                 IisUptimeMetricConfig                 `mapstructure:"iis.uptime"`
}

MetricsConfig provides config for iis metrics.

func DefaultMetricsConfig added in v0.77.0

func DefaultMetricsConfig() MetricsConfig

type ResourceAttributeConfig added in v0.77.0

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

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

type ResourceAttributesConfig added in v0.77.0

type ResourceAttributesConfig struct {
	IisApplicationPool ResourceAttributeConfig `mapstructure:"iis.application_pool"`
	IisSite            ResourceAttributeConfig `mapstructure:"iis.site"`
}

ResourceAttributesConfig provides config for iis 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) SetIisApplicationPool added in v0.82.0

func (rb *ResourceBuilder) SetIisApplicationPool(val string)

SetIisApplicationPool sets provided value as "iis.application_pool" attribute.

func (*ResourceBuilder) SetIisSite added in v0.82.0

func (rb *ResourceBuilder) SetIisSite(val string)

SetIisSite sets provided value as "iis.site" attribute.

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.

Jump to

Keyboard shortcuts

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