Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Updates to scrape duration #23030

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .chloggen/msg_add-scrape-interval-changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Use this changelog template to create an entry for release notes.
# If your change doesn't affect end users, such as a test fix or a tooling change,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: 'enhancement'

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: receivers

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Adding `initial_delay` to receivers to control when scraping interval starts

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [23030]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
The updated receivers are:
- `active_directory_ds`
- `aerospike`
- `apache`
- `apachespark`
- `azuremonitor`
- `couchdb`
- `chrony`
- `docker_stats`
- `elasticsearch`
- `expvar`
- `filestats`
- `flinkmetrics`
- `googlecloudspanner`
- `haproxy`
- `httpcheck`
- `iis`
- `memcached`
- `mongodb`
- `mysql`
- `nginx`
- `oracledb`
- `podman_stats`
- `postgresql`
- `rabbitmq`
- `riak`
- `snowflake`
- `sqlquery`
- `sqlserver`
- `sshcheck`
- `vcenter`
- `windowsperfcounters`
- `zookeeper`
20 changes: 20 additions & 0 deletions .chloggen/msg_revert-default-apache-receiver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use this changelog template to create an entry for release notes.
# If your change doesn't affect end users, such as a test fix or a tooling change,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: apache receiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: reverted default collection time back to 10s from 1m

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [23030]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps useful to add that the change was mistakenly added in v0.78.0?

1 change: 1 addition & 0 deletions receiver/activedirectorydsreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The `active_directory_ds` receiver scrapes metric relating to an Active Director
The following settings are optional:
- `metrics` (default: see `DefaultMetricsSettings` [here](./internal/metadata/generated_metrics.go)): Allows enabling and disabling specific metrics from being collected in this receiver.
- `collection_interval` (default = `10s`): The interval at which metrics are emitted by this receiver.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.

Example:
```yaml
Expand Down
1 change: 1 addition & 0 deletions receiver/aerospikereceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Configuration parameters:
- `tlsname` Endpoint tls name. Used by the client during TLS connections. See [Aerospike authentication](https://docs.aerospike.com/server/guide/security/tls#standard-authentication) for mor details.
- `collect_cluster_metrics` (default false): Whether discovered peer nodes should be collected.
- `collection_interval` (default = 60s): This receiver collects metrics on an interval. Valid time units are ns, us (or µs), ms, s, m, h.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.
- `username` (Enterprise Edition only.)
- `password` (Enterprise Edition only.)
- `tls` (default empty/no tls) tls configuration for connection to Aerospike nodes. More information at [OpenTelemetry's tls config page](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md).
Expand Down
1 change: 1 addition & 0 deletions receiver/apachereceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ The following settings are required:

The following settings are optional:
- `collection_interval` (default = `10s`): This receiver collects metrics on an interval. This value must be a string readable by Golang's [time.ParseDuration](https://pkg.go.dev/time#ParseDuration). Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.

### Example Configuration

Expand Down
5 changes: 4 additions & 1 deletion receiver/apachereceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ func NewFactory() receiver.Factory {
}

func createDefaultConfig() component.Config {
cfg := scraperhelper.NewDefaultScraperControllerSettings(metadata.Type)
cfg.CollectionInterval = 10 * time.Second

return &Config{
ScraperControllerSettings: scraperhelper.NewDefaultScraperControllerSettings(metadata.Type),
ScraperControllerSettings: cfg,
HTTPClientSettings: confighttp.HTTPClientSettings{
Endpoint: defaultEndpoint,
Timeout: 10 * time.Second,
Expand Down
1 change: 1 addition & 0 deletions receiver/apachesparkreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ These configuration options are for connecting to an Apache Spark application.
The following settings are optional:

- `collection_interval`: (default = `60s`): This receiver collects metrics on an interval. This value must be a string readable by Golang's [time.ParseDuration](https://pkg.go.dev/time#ParseDuration). Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.
- `endpoint`: (default = `http://localhost:4040`): Apache Spark endpoint to connect to in the form of `[http][://]{host}[:{port}]`
- `application_names`: An array of Spark application names for which metrics should be collected. If no application names are specified, metrics will be collected for all Spark applications running on the cluster at the specified endpoint.

Expand Down
2 changes: 2 additions & 0 deletions receiver/azuremonitorreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ The following settings are optional:
- `cache_resources` (default = 86400): List of resources will be cached for the provided amount of time in seconds.
- `cache_resources_definitions` (default = 86400): List of metrics definitions will be cached for the provided amount of time in seconds.
- `maximum_number_of_metrics_in_a_call` (default = 20): Maximum number of metrics to fetch in per API call, current limit in Azure is 20 (as of 03/27/2023).
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.

### Example Configuration

Expand All @@ -43,6 +44,7 @@ receivers:
- "${service1}"
- "${service2}"
collection_interval: 60s
initial_delay: 1s
```

## Metrics
Expand Down
1 change: 1 addition & 0 deletions receiver/chronyreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ The following options can be customised:
- timeout (optional) - The total amount of time allowed to read and process the data from chronyd
- Recommendation: This value should be set above 1s to allow `chronyd` time to respond
- collection_interval (optional) - how frequent this receiver should poll [chrony]
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.
- metrics (optional) - Which metrics should be exported, read the [documentation] for complete details

## Example
Expand Down
1 change: 1 addition & 0 deletions receiver/dockerstatsreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The following settings are optional:

- `endpoint` (default = `unix:///var/run/docker.sock`): Address to reach the desired Docker daemon.
- `collection_interval` (default = `10s`): The interval at which to gather container stats.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.
- `container_labels_to_metric_labels` (no default): A map of Docker container label names whose label values to use
as the specified metric label key.
- `env_vars_to_metric_labels` (no default): A map of Docker container environment variables whose values to use
Expand Down
1 change: 1 addition & 0 deletions receiver/elasticsearchreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ The following settings are optional:
- `username` (no default): Specifies the username used to authenticate with Elasticsearch using basic auth. Must be specified if password is specified.
- `password` (no default): Specifies the password used to authenticate with Elasticsearch using basic auth. Must be specified if username is specified.
- `collection_interval` (default = `10s`): This receiver collects metrics on an interval. This value must be a string readable by Golang's [time.ParseDuration](https://pkg.go.dev/time#ParseDuration). On larger clusters, the interval may need to be lengthened, as querying Elasticsearch for metrics will take longer on clusters with more nodes.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.

### Example Configuration

Expand Down
1 change: 1 addition & 0 deletions receiver/expvarreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The following can be configured:
- `timeout = 3s`
- `collection_interval` - Configure how often the metrics are scraped.
- default: 1m
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.
- `metrics` - Enable or disable metrics by name.

### Example configuration
Expand Down
5 changes: 5 additions & 0 deletions receiver/filestatsreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@

The File Stats receiver collects metrics from files specified with a glob pattern.

## Configuration
- `include` (required): The glob path for files to watch
- `collection_interval` (default = `1m`): The interval at which metrics are emitted by this receiver.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.

See [documentation.md] for a list of the metrics collected.
1 change: 1 addition & 0 deletions receiver/flinkmetricsreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The following settings are optional:
- `endpoint` (default: `http://localhost:15672`): The URL of the node to be monitored.
- `collection_interval` (default = `10s`): This receiver collects metrics on an interval. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.
- `tls` (defaults defined [here](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md)): TLS control. By default insecure settings are rejected and certificate verification is on.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.

### Example Configuration

Expand Down
2 changes: 2 additions & 0 deletions receiver/googlecloudspannerreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ The following configuration example is:
receivers:
googlecloudspanner:
collection_interval: 60s
initial_delay: 1s
top_metrics_query_max_rows: 100
backfill_enabled: true
cardinality_total_limit: 200000
Expand Down Expand Up @@ -66,6 +67,7 @@ receivers:
Brief description of configuration properties:
- **googlecloudspanner** - name of the Cloud Spanner Receiver related section in OpenTelemetry collector configuration file
- **collection_interval** - this receiver runs periodically. Each time it runs, it queries Google Cloud Spanner, creates metrics, and sends them to the next consumer (default: 1 minute). **It is not recommended to change the default value of collection interval, since new values for metrics in the Spanner database appear only once a minute.**
- **initial_delay** defines how long this receiver waits before starting.
- **top_metrics_query_max_rows** - max number of rows to fetch from Top N built-in table(100 by default)
- **backfill_enabled** - turn on/off 1-hour data backfill(by default it is turned off)
- **cardinality_total_limit** - limit of active series per 24 hours period. If specified, turns on cardinality filtering and handling. If zero or not specified, cardinality is not handled. You can read [this document](cardinality.md) for more information about cardinality handling and filtering.
Expand Down
5 changes: 5 additions & 0 deletions receiver/haproxyreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ The scraping collection interval can be configured.

Default: 1 minute

### Initial delay settings (optional)
defines how long this receiver waits before starting.

Default: `1s`

### Example configuration

```yaml
Expand Down
1 change: 1 addition & 0 deletions receiver/hostmetricsreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ configured:
```yaml
hostmetrics:
collection_interval: <duration> # default = 1m
initial_delay: <duration> # default = 1s
root_path: <string>
scrapers:
<scraper1>:
Expand Down
1 change: 1 addition & 0 deletions receiver/httpcheckreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ The following configuration settings are optional:

- `method` (default: `GET`): The method used to call the endpoint.
- `collection_interval` (default = `60s`): This receiver collects metrics on an interval. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.

### Example Configuration

Expand Down
2 changes: 2 additions & 0 deletions receiver/iisreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ Because of this, it is a Windows only receiver.
The following settings are optional:

- `collection_interval` (default = `10s`): The interval at which metrics should be emitted by this receiver.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.

Example:

```yaml
receivers:
iis:
collection_interval: 10s
initial_delay: 1s

```

Expand Down
5 changes: 5 additions & 0 deletions receiver/jmxreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ receivers:
endpoint: my_jmx_host:12345
target_system: jvm
collection_interval: 10s
initial_delay: 1s
# optional: the same as specifying OTLP receiver endpoint.
otlp:
endpoint: mycollectorotlpreceiver:4317
Expand Down Expand Up @@ -93,6 +94,10 @@ The interval time for the Groovy script to be run and metrics to be exported by

Corresponds to the `otel.jmx.interval.milliseconds` property.

### initial_delay (default: `1s`)

Defines how long this receiver waits before starting.

### username

The username to use for JMX authentication.
Expand Down
1 change: 1 addition & 0 deletions receiver/kafkametricsreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Optional Settings (with defaults):
- `group_match` (default = .*): regex pattern of consumer groups to filter on for metrics.
- `client_id` (default = otel-metrics-receiver): consumer client id
- `collection_interval` (default = 1m): frequency of metric collection/scraping.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.
- `auth` (default none)
- `plain_text`
- `username`: The username to use.
Expand Down
2 changes: 2 additions & 0 deletions receiver/kubeletstatsreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ endpoint will be used if `auth_type` set to any of the following values:
to authenticate to the kubelet API.
- `kubeConfig` tells this receiver to use the kubeconfig file (KUBECONFIG env variable or ~/.kube/config)
to authenticate and use API server proxy to access the kubelet API.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.

### TLS Example

```yaml
receivers:
kubeletstats:
collection_interval: 20s
initial_delay: 1s
auth_type: "tls"
ca_file: "/path/to/ca.crt"
key_file: "/path/to/apiserver.key"
Expand Down
1 change: 1 addition & 0 deletions receiver/memcachedreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ next consumer. The `collection_interval` configuration option tells this
receiver the duration between runs. This value must be a string readable by
Golang's `ParseDuration` function (example: `1h30m`). Valid time units are
`ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.

Example:

Expand Down
2 changes: 2 additions & 0 deletions receiver/mongodbreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ The following settings are optional:
- `username`: If authentication is required, the user can with `clusterMonitor` permissions can be provided here.
- `password`: If authentication is required, the password can be provided here.
- `collection_interval`: (default = `1m`): This receiver collects metrics on an interval. This value must be a string readable by Golang's [time.ParseDuration](https://pkg.go.dev/time#ParseDuration). Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.
- `replica_set`: If the deployment of MongoDB is a replica set then this allows users to specify the replica set name which allows for autodiscovery of other nodes in the replica set.
- `timeout`: (default = `1m`) The timeout of running commands against mongo.
- `tls`: (defaults defined [here](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md)): TLS control. By default insecure settings are rejected and certificate verification is on.
Expand All @@ -54,6 +55,7 @@ receivers:
username: otel
password: ${env:MONGODB_PASSWORD}
collection_interval: 60s
initial_delay: 1s
tls:
insecure: true
insecure_skip_verify: true
Expand Down
2 changes: 2 additions & 0 deletions receiver/mysqlreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ The following settings are optional:
- `database`: The database name. If not specified, metrics will be collected for all databases.

- `collection_interval` (default = `10s`): This receiver collects metrics on an interval. This value must be a string readable by Golang's [time.ParseDuration](https://pkg.go.dev/time#ParseDuration). Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.

- `transport`: (default = `tcp`): Defines the network to use for connecting to the server.
- `statement_events`: Additional configuration for query to build `mysql.statement_events.count` and `mysql.statement_events.wait.time` metrics:
Expand All @@ -48,6 +49,7 @@ receivers:
password: ${env:MYSQL_PASSWORD}
database: otel
collection_interval: 10s
initial_delay: 1s
statement_events:
digest_text_limit: 120
time_limit: 24h
Expand Down
1 change: 1 addition & 0 deletions receiver/nginxreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ next consumer. The `collection_interval` configuration option tells this
receiver the duration between runs. This value must be a string readable by
Golang's `ParseDuration` function (example: `1h30m`). Valid time units are
`ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.

Example:

Expand Down
2 changes: 2 additions & 0 deletions receiver/nsxtreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ This receiver supports NSX-T Datacenter versions:

- `collection_interval`: (default = `1m`): This receiver collects metrics on an interval. This value must be a string readable by Golang's [time.ParseDuration](https://pkg.go.dev/time#ParseDuration). Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.

- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.

- `timeout`: (default = `1m`) The timeout of running commands against the NSX REST API.

- `metrics` (default: see DefaultMetricsSettings [here])(./internal/metadata/generated_metrics.go): Allows enabling and disabling specific metrics from being collected in this receiver.
Expand Down
2 changes: 2 additions & 0 deletions receiver/podmanreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The following settings are required:
The following settings are optional:

- `collection_interval` (default = `10s`): The interval at which to gather container stats.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.
- `timeout` (default = `5s`): The maximum amount of time to wait for Podman API responses.

Example:
Expand All @@ -39,6 +40,7 @@ receivers:
endpoint: unix://run/podman/podman.sock
timeout: 10s
collection_interval: 10s
initial_delay: 1s
```

The full list of settings exposed for this receiver are documented [here](./config.go)
Expand Down
1 change: 1 addition & 0 deletions receiver/postgresqlreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ The following settings are also optional and nested under `tls` to help configur
- `ca_file` (default = ""): A set of certificate authorities used to validate the database server's SSL certificate.

- `collection_interval` (default = `10s`): This receiver collects metrics on an interval. This value must be a string readable by Golang's [time.ParseDuration](https://pkg.go.dev/time#ParseDuration). Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.

### Example Configuration

Expand Down
1 change: 1 addition & 0 deletions receiver/riakreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The following configuration settings are optional:

- `endpoint` (default: `http://localhost:8098`): The URL of the node to be monitored.
- `collection_interval` (default = `60s`): This receiver collects metrics on an interval. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.
- `initial_delay` (default = `1s`): defines how long this receiver waits before starting.
- `tls` (defaults defined [here](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md)): TLS control. By default insecure settings are rejected and certificate verification is on.

### Example Configuration
Expand Down
Loading