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

Sync with upstream Prometheus #453

Merged
merged 32 commits into from Mar 13, 2023
Merged

Sync with upstream Prometheus #453

merged 32 commits into from Mar 13, 2023

Conversation

codesome
Copy link
Member

jesusvazquez and others added 30 commits February 10, 2023 13:00
Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>
Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>
`loadConfiguration` is made more general.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This lets relabelling work on a `Builder` rather than converting to and
from `Labels` on every rule.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Save work converting between Builder and Labels.

Also expose ProcessBuilder, so callers can supply a Builder.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Save work converting to and fro.

Uses the recently-added relabel.ProcessBuilder variant.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Save work converting to `Labels` then to `Builder`.
`PopulateLabels()` now takes as Builder as input.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Common service discovery mechanisms such as Kubernetes can generate a
lot of target groups, so this function was allocating a lot of memory
which then immediately became garbage. Re-using the structures across
an entire Sync saves effort.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Signed-off-by: Xiaochao Dong (@damnever) <the.xcdong@gmail.com>
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
Direct imports:
	go.opentelemetry.io/otel v1.14.0
	go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0
	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0
	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0
	go.opentelemetry.io/otel/sdk v1.14.0
	go.opentelemetry.io/otel/trace v1.14.0

These seem to correspond:
	go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.39.0

Other direct dependencies required to update by Otel:
	github.com/stretchr/testify v1.8.2
	google.golang.org/grpc v1.53.0

Indirect dependencies required to update by Otel:
	cloud.google.com/go/compute v1.15.1
	github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b
	go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0
	go.opentelemetry.io/otel/metric v0.36.0

Also the import of go.opentelemetry.io/otel/semconv had to be updated
to v1.17.0 to match https://github.com/open-telemetry/opentelemetry-go/blob/60f7d42d1eedae6381f1d6524374b57a274e1639/sdk/resource/process.go#L25

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Re-use the Builder each time round the loop.
TestConcurrentRangeQueries runs many queries, up to 4 at the same time,
to try to expose any race conditions.
This change stops four of them from running with a thousand or more steps:

  `holt_winters(a_X[1d], 0.3, 0.3)`
  `changes(a_X[1d])`
  `rate(a_X[1d])`
  `absent_over_time(a_X[1d])`

Particularly when the test runs with `-race` in CI, this reduces the
time and resources required.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
Update our own dependencies, support proxy from env
Bump Otel and dependencies from 1.11.2 to 1.14.0
In storage/remote, try converting to RecoverableError using errors.As,
instead of through direct casting.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
Improve some comments in storage/remote/queue_manager.go, wrt. general
language and a typo.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
promql: disable some slow cases in TestConcurrentRangeQueries
Scraping targets are synced by creating the full set, then adding/removing any which have changed.
This PR speeds up the process of creating the full set.

I added a benchmark for `TargetsFromGroup`; it uses configuration from a typical Kubernetes SD.

The crux of the change is to do relabeling inside labels.Builder instead of converting to labels.Labels and back again for every rule. The change is broken into several commits for easier review.

This is a breaking change to `scrape.PopulateLabels()`, but `relabel.Process` is left as-is, with a new `relabel.ProcessBuilder` option.
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
…2.0 in /documentation/examples/remote_storage

Signed-off-by: junya koyama <arukiidou@yahoo.co.jp>
Closes prometheus/docs#167

Signed-off-by: Harold Dost <h.dost@criteo.com>
docs: Add signal information to getting started
build(deps): bump prometheus/prometheus from 0.37.0 to 0.42.0 in examples
…n-head-from-uninitialized-wbl

TSDB: Protect NewOOOCompactionHead from an uninitialized wbl
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Copy link
Member Author

@codesome codesome left a comment

Choose a reason for hiding this comment

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

I looked at the changes that affect us and it seems to be fine

Copy link
Member

@jesusvazquez jesusvazquez left a comment

Choose a reason for hiding this comment

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

Also read through the changes and I think they all look good

@codesome codesome merged commit 1b8dfd8 into main Mar 13, 2023
4 checks passed
@codesome codesome deleted the codesome/sync-prom branch March 13, 2023 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants