Skip to content

Commit

Permalink
Update Prometheus
Browse files Browse the repository at this point in the history
  • Loading branch information
ptodev committed Dec 3, 2024
1 parent d4b1e34 commit 95ed222
Show file tree
Hide file tree
Showing 122 changed files with 1,213 additions and 871 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ internal API changes are not present.
Main (unreleased)
-----------------

### Features

- Update to Prometheus v0.53.2. (@ptodev)

- Added `scrape_protocols` option to `prometheus.scrape`, which allows to control the preferred order of scrape protocols. (@thampiotr)

### Other changes

- `prometheus.scrape` component's `enable_protobuf_negotiation` argument is now deprecated and will be removed in a future major release.
Use `scrape_protocols` instead and refer to `prometheus.scrape` reference documentation for further details. (@thampiotr)

v0.43.4 (2024-11-25)
-----------------

Expand Down
10 changes: 5 additions & 5 deletions docs/sources/flow/reference/cli/convert.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ Refer to [Migrate from OpenTelemetry Collector to {{< param "PRODUCT_NAME" >}}][
### Prometheus

Using the `--source-format=prometheus` will convert the source configuration from
[Prometheus v2.45](https://prometheus.io/docs/prometheus/2.45/configuration/configuration/)
[Prometheus v2.53](https://prometheus.io/docs/prometheus/2.53/configuration/configuration/)
to {{< param "PRODUCT_NAME" >}} configuration.

This includes Prometheus features such as
[scrape_config](https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#scrape_config),
[relabel_config](https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#relabel_config),
[metric_relabel_configs](https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#metric_relabel_configs),
[remote_write](https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#remote_write),
[scrape_config](https://prometheus.io/docs/prometheus/2.53/configuration/configuration/#scrape_config),
[relabel_config](https://prometheus.io/docs/prometheus/2.53/configuration/configuration/#relabel_config),
[metric_relabel_configs](https://prometheus.io/docs/prometheus/2.53/configuration/configuration/#metric_relabel_configs),
[remote_write](https://prometheus.io/docs/prometheus/2.53/configuration/configuration/#remote_write),
and many supported *_sd_configs. Unsupported features in a source configuration result
in [errors].

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ title: prometheus.receive_http
The HTTP API exposed is compatible with [Prometheus `remote_write` API][prometheus-remote-write-docs]. This means that other [`prometheus.remote_write`][prometheus.remote_write] components can be used as a client and send requests to `prometheus.receive_http` which enables using {{< param "PRODUCT_ROOT_NAME" >}} as a proxy for prometheus metrics.

[prometheus.remote_write]: {{< relref "./prometheus.remote_write.md" >}}
[prometheus-remote-write-docs]: https://prometheus.io/docs/prometheus/2.45/querying/api/#remote-write-receiver
[prometheus-remote-write-docs]: https://prometheus.io/docs/prometheus/2.53/querying/api/#remote-write-receiver

## Usage

Expand Down
14 changes: 13 additions & 1 deletion docs/sources/flow/reference/components/prometheus.scrape.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ Name | Type | Description | Default | Required
`forward_to` | `list(MetricsReceiver)` | List of receivers to send scraped metrics to. | | yes
`job_name` | `string` | The value to use for the job label if not already set. | component name | no
`extra_metrics` | `bool` | Whether extra metrics should be generated for scrape targets. | `false` | no
`enable_protobuf_negotiation` | `bool` | Whether to enable protobuf negotiation with the client. | `false` | no
`enable_protobuf_negotiation` | `bool` | Deprecated: use `scrape_protocols` instead. | `false` | no
`honor_labels` | `bool` | Indicator whether the scraped metrics should remain unmodified. | `false` | no
`honor_timestamps` | `bool` | Indicator whether the scraped timestamps should be respected. | `true` | no
`track_timestamps_staleness` | `bool` | Indicator whether to track the staleness of the scraped timestamps. | `false` | no
`params` | `map(list(string))` | A set of query parameters with which the target is scraped. | | no
`scrape_classic_histograms` | `bool` | Whether to scrape a classic histogram that is also exposed as a native histogram. | `false` | no
`scrape_interval` | `duration` | How frequently to scrape the targets of this scrape configuration. | `"60s"` | no
`scrape_timeout` | `duration` | The timeout for scraping targets of this configuration. | `"10s"` | no
`scrape_protocols` | `list(string)` | The protocols to negotiate during a scrape, in order of preference. See below for available values. | `["OpenMetricsText1.0.0", "OpenMetricsText0.0.1", "PrometheusText0.0.4"]` | no |
`metrics_path` | `string` | The HTTP resource path on which to fetch metrics from targets. | `/metrics` | no
`scheme` | `string` | The URL scheme with which to fetch metrics from targets. | | no
`body_size_limit` | `int` | An uncompressed response body larger than this many bytes causes the scrape to fail. 0 means no limit. | | no
Expand All @@ -80,6 +81,17 @@ Name | Type | Description | Default | Required
- [`authorization` block][authorization].
- [`oauth2` block][oauth2].

`scrape_protocols` controls the preferred order of protocols to negotiate during
a scrape. The following values are supported:

- `OpenMetricsText1.0.0`
- `OpenMetricsText0.0.1`
- `PrometheusProto`
- `PrometheusText0.0.4`

If you were using the now deprecated `enable_protobuf_negotiation` argument, switch
to using `scrape_protocols = ["PrometheusProto", "OpenMetricsText1.0.0", "OpenMetricsText0.0.1", "PrometheusText0.0.4"]` instead.

{{< docs/shared lookup="flow/reference/components/http-client-proxy-config-description.md" source="agent" version="<AGENT_VERSION>" >}}

`track_timestamps_staleness` controls whether Prometheus tracks [staleness][prom-staleness] of metrics which with an explicit timestamp present in scraped data.
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/static/api/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ GET /agent/api/v1/metrics/integrations/sd
```

This endpoint returns all running metrics-based integrations. It conforms to
the Prometheus [http_sd_config API](https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#http_sd_config).
the Prometheus [http_sd_config API](https://prometheus.io/docs/prometheus/2.53/configuration/configuration/#http_sd_config).
Targets include integrations regardless of autoscrape being enabled; this
allows for manually configuring scrape jobs to collect metrics from an
integration running on an external agent.
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/static/configuration/agent-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ selector:

> **Note:** More information on the following types can be found in their respective documentation pages:
>
> * [`scrape_config`](https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#scrape_config)
> * [`scrape_config`](https://prometheus.io/docs/prometheus/2.53/configuration/configuration/#scrape_config)
> * [`promtail.scrape_config`](/docs/loki/latest/clients/promtail/configuration/#scrape_configs)
> * [`integrations_config`](/docs/agent/latest/static/configuration/integrations)

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/static/configuration/flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Valid feature names are:

* `remote-configs`: Enable [retrieving](ref:retrieving) config files over HTTP/HTTPS
* `integrations-next`: Enable [revamp](ref:revamp) of the integrations subsystem
* `extra-scrape-metrics`: When enabled, additional time series are exposed for each metrics instance scrape. See [Extra scrape metrics](https://prometheus.io/docs/prometheus/2.45/feature_flags/#extra-scrape-metrics).
* `extra-scrape-metrics`: When enabled, additional time series are exposed for each metrics instance scrape. See [Extra scrape metrics](https://prometheus.io/docs/prometheus/2.53/feature_flags/#extra-scrape-metrics).
* `agent-management`: Enable support for [agent management](ref:management).

## Report information usage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ original subsystem:
* Autoscrape, when enabled, now works completely in-memory without using the
network.

[http_sd_config]: https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#http_sd_config
[http_sd_config]: https://prometheus.io/docs/prometheus/2.53/configuration/configuration/#http_sd_config

## Config changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ integrations:
## Prometheus service discovery use case
If you need to scrape SNMP devices in more dynamic environment, and cannot define devices in `snmp_targets` because targets would change over time, you can use service discovery approach. For instance, with [DNS discovery](https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#dns_sd_config):
If you need to scrape SNMP devices in more dynamic environment, and cannot define devices in `snmp_targets` because targets would change over time, you can use service discovery approach. For instance, with [DNS discovery](https://prometheus.io/docs/prometheus/2.53/configuration/configuration/#dns_sd_config):

```yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ integrations:
## Prometheus service discovery use case
If you need to scrape SNMP devices in more dynamic environment, and can't define devices in `snmp_targets` because targets would change over time, you can use service discovery approach. For instance, with [DNS discovery](https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#dns_sd_config):
If you need to scrape SNMP devices in more dynamic environment, and can't define devices in `snmp_targets` because targets would change over time, you can use service discovery approach. For instance, with [DNS discovery](https://prometheus.io/docs/prometheus/2.53/configuration/configuration/#dns_sd_config):

```yaml
Expand Down
8 changes: 4 additions & 4 deletions docs/sources/static/configuration/metrics-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ remote_write:
- [<remote_write>]
```

> **Note:** For more information on remote_write, refer to the [Prometheus documentation](https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#remote_write).
> **Note:** For more information on remote_write, refer to the [Prometheus documentation](https://prometheus.io/docs/prometheus/2.53/configuration/configuration/#remote_write).
>
> The following default values set by Grafana Agent Static Mode are different than the default set by Prometheus:
> - `remote_write`: `send_exemplars` default value is `true`
Expand Down Expand Up @@ -344,9 +344,9 @@ remote_write:
> **Note:** More information on the following types can be found on the Prometheus
> website:
>
> * [`relabel_config`](https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#relabel_config)
> * [`scrape_config`](https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#scrape_config)
> * [`remote_write`](https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#remote_write)
> * [`relabel_config`](https://prometheus.io/docs/prometheus/2.53/configuration/configuration/#relabel_config)
> * [`scrape_config`](https://prometheus.io/docs/prometheus/2.53/configuration/configuration/#scrape_config)
> * [`remote_write`](https://prometheus.io/docs/prometheus/2.53/configuration/configuration/#remote_write)

## Data retention

Expand Down
4 changes: 2 additions & 2 deletions docs/sources/static/configuration/traces-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ remote_write:
[ cipher_suites: <duration> ]

# Controls TLS settings of the exporter's client:
# https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#tls_config
# https://prometheus.io/docs/prometheus/2.53/configuration/configuration/#tls_config
# This should be used only if `insecure` is set to false
tls_config:
# Path to the CA cert. For a client this verifies the server certificate. If empty uses system root CA.
Expand Down Expand Up @@ -483,7 +483,7 @@ More information on the following types can be found on the documentation for th
* [`otlpreceiver`: OpenTelemetry-Collector](https://github.com/open-telemetry/opentelemetry-collector/tree/{{< param "OTEL_VERSION" >}}/receiver/otlpreceiver)
* [`opencensusreceiver`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/receiver/opencensusreceiver)
* [`zipkinreceiver`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/receiver/zipkinreceiver)
* [`scrape_config`: Prometheus](https://prometheus.io/docs/prometheus/2.45/configuration/configuration/#scrape_config)
* [`scrape_config`: Prometheus](https://prometheus.io/docs/prometheus/2.53/configuration/configuration/#scrape_config)
* [`spanmetricsprocessor.latency_histogram_buckets`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/{{< param "OTEL_VERSION" >}}/processor/spanmetricsprocessor/config.go#L37-L39)
* [`spanmetricsprocessor.dimensions`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/{{< param "OTEL_VERSION" >}}/processor/spanmetricsprocessor/config.go#L41-L48)
* [`tailsamplingprocessor.policies`: OpenTelemetry-Collector-Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/processor/tailsamplingprocessor)
Loading

0 comments on commit 95ed222

Please sign in to comment.