-
Notifications
You must be signed in to change notification settings - Fork 0
Bring the fork up to date. #4
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
Conversation
* Sanitize metric type prefixes
When more than one prefix matches the same metric descriptor, this will
throw the error "collected metric xxx was collected before with the
same name and label values".
For example, using the metric type prefixes
foo.googleapis.com/bar (a prefix)
and
foo.googleapis.com/bar/baz (a metric)
will result in an error because both match the metric
foo.googleapis.com/bar/baz.
Further, using the metric type prefixes
foo.googleapis.com/bar/baz (a metric)
and
foo.googleapis.com/bar/baz_count (a metric)
will result in an error because both match the metric
foo.googleapis.com/bar/baz_count.
While the first pitfall could be expected by the user, the latter will
come as a complete surprise to anyone who is not aware that
stackdriver-exporter internally uses an MQL query in the form of
metric.type = starts_with("<prefix>")
to filter the metrics.
Avoid this by sanitizing the provided metric type prefixes in the
following way:
- Drop any duplicate prefixes
- Sort the prefixes (required by the next step)
- Drop any prefixes that start with another prefix present in the input
Signed-off-by: Edwin Mackenzie-Owen <[email protected]>
* Remove condition that will never be true
In alphanumerically sorted list of strings,
abcdef
will never come before
abc.
Signed-off-by: Edwin Mackenzie-Owen <[email protected]>
* Add test for metrics prefix sanitization
Signed-off-by: Edwin Mackenzie-Owen <[email protected]>
* Use slices.Compact() for initial deduplication
Signed-off-by: Edwin Mackenzie-Owen <[email protected]>
* Improve comments
Signed-off-by: Edwin Mackenzie-Owen <[email protected]>
* Always initialize return slice
Signed-off-by: Edwin Mackenzie-Owen <[email protected]>
* Improve if condition
Signed-off-by: Edwin Mackenzie-Owen <[email protected]>
---------
Signed-off-by: Edwin Mackenzie-Owen <[email protected]>
Running the example results in `stackdriver_exporter: error: flag 'monitoring.metrics-type-prefixes' cannot be repeated, try --help ` Signed-off-by: Stuart Buckingham <[email protected]>
Signed-off-by: prombot <[email protected]>
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.33.1 to 1.34.1. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](onsi/gomega@v1.33.1...v1.34.1) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.188.0 to 0.189.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](googleapis/google-api-go-client@v0.188.0...v0.189.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: prombot <[email protected]>
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.19.1 to 1.20.2. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.19.1...v1.20.2) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.189.0 to 0.195.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](googleapis/google-api-go-client@v0.189.0...v0.195.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
When exporting metrics from multiple projects at once, it's useful to know which of the projects is generating metrics errors. Signed-off-by: Tyler Lubeck <[email protected]>
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.55.0 to 0.58.0. - [Release notes](https://github.com/prometheus/common/releases) - [Changelog](https://github.com/prometheus/common/blob/main/RELEASE.md) - [Commits](prometheus/common@v0.55.0...v0.58.0) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: prombot <[email protected]>
Synchronize common files from prometheus/prometheus
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.58.0 to 0.59.1. - [Release notes](https://github.com/prometheus/common/releases) - [Changelog](https://github.com/prometheus/common/blob/main/RELEASE.md) - [Commits](prometheus/common@v0.58.0...v0.59.1) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.28.0 to 0.29.0. - [Commits](golang/net@v0.28.0...v0.29.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.195.0 to 0.199.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](googleapis/google-api-go-client@v0.195.0...v0.199.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Replace comma-delimited string flags with repeatable flags Signed-off-by: Tommy Li <[email protected]> * preserve old flags but mark them as deprecated Signed-off-by: Tommy Li <[email protected]> --------- Signed-off-by: Tommy Li <[email protected]>
* build(deps): bump prometheus/{client_golang,common,exporter-toolkit}
Also bumps the minimum go version in go.mod to 1.22 to support log/slog,
for exporter-toolkit support.
Signed-off-by: TJ Hoplock <[email protected]>
* chore!: adopt log/slog, drop go-kit/log
The bulk of this PR was automated by the following script which is being
used to aid in converting the various exporters/projects to use slog:
https://gist.github.com/tjhop/49f96fb7ebbe55b12deee0b0312d8434
Other changes include:
- removing unneeded linter settings for go-kit/log
- enabling sloglint linter
Signed-off-by: TJ Hoplock <[email protected]>
---------
Signed-off-by: TJ Hoplock <[email protected]>
Signed-off-by: prombot <[email protected]>
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.59.1 to 0.60.1. - [Release notes](https://github.com/prometheus/common/releases) - [Changelog](https://github.com/prometheus/common/blob/main/RELEASE.md) - [Commits](prometheus/common@v0.59.1...v0.60.1) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.199.0 to 0.204.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](googleapis/google-api-go-client@v0.199.0...v0.204.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update Go to 1.23. Signed-off-by: SuperQ <[email protected]>
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.34.1 to 1.35.1. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](onsi/gomega@v1.34.1...v1.35.1) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.11.0 to 0.13.1. - [Release notes](https://github.com/prometheus/exporter-toolkit/releases) - [Changelog](https://github.com/prometheus/exporter-toolkit/blob/master/CHANGELOG.md) - [Commits](prometheus/exporter-toolkit@v0.11.0...v0.13.1) --- updated-dependencies: - dependency-name: github.com/prometheus/exporter-toolkit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Release 0.17.0 Signed-off-by: Kyle Eckhart <[email protected]> --------- Signed-off-by: Kyle Eckhart <[email protected]> Signed-off-by: Ben Kochie <[email protected]> Co-authored-by: Ben Kochie <[email protected]>
Signed-off-by: prombot <[email protected]>
Signed-off-by: prombot <[email protected]>
Signed-off-by: Antoine Deschênes <[email protected]>
* fix monitoring metrics for individual collectors Signed-off-by: Ananya Kumar Mallik <[email protected]> * add collector cache TTL Signed-off-by: Ananya Kumar Mallik <[email protected]> * reuse Signed-off-by: Ananya Kumar Mallik <[email protected]> * Add collector cache test Signed-off-by: Ananya Kumar Mallik <[email protected]> * Fix caching logic and TTL for cache Signed-off-by: Ananya Kumar Mallik <[email protected]> --------- Signed-off-by: Ananya Kumar Mallik <[email protected]>
Signed-off-by: prombot <[email protected]>
Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.13.1 to 0.13.2. - [Release notes](https://github.com/prometheus/exporter-toolkit/releases) - [Changelog](https://github.com/prometheus/exporter-toolkit/blob/master/CHANGELOG.md) - [Commits](prometheus/exporter-toolkit@v0.13.1...v0.13.2) --- updated-dependencies: - dependency-name: github.com/prometheus/exporter-toolkit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.32.0 to 0.34.0. - [Commits](golang/net@v0.32.0...v0.34.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.204.0 to 0.217.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](googleapis/google-api-go-client@v0.204.0...v0.217.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump github.com/onsi/gomega from 1.35.1 to 1.36.2 Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.35.1 to 1.36.2. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](onsi/gomega@v1.35.1...v1.36.2) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Run go mod tidy. Signed-off-by: SuperQ <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: SuperQ <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: SuperQ <[email protected]>
Fixup warning: > S1005: unnecessary assignment to the blank identifier (gosimple) Signed-off-by: SuperQ <[email protected]>
Signed-off-by: Kyle Eckhart <[email protected]>
Signed-off-by: prombot <[email protected]>
Signed-off-by: prombot <[email protected]>
Remove obsolete confiugrations. Signed-off-by: SuperQ <[email protected]>
* Update Go build to 1.24. * Update Go minimum version to 1.23. * Bump Go modules. Signed-off-by: SuperQ <[email protected]>
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.217.0 to 0.224.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](googleapis/google-api-go-client@v0.217.0...v0.224.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: prombot <[email protected]>
|
|
Been a fair amount of change in upstream, we should align.