12 Commits

Author SHA1 Message Date
b76ab98594 Golangci deprecations and update using tools pattern (#3610)
* Breadcrumbs for golangci

* Include golangci in tools

* Use tools image for lint make target

* Update changelog
2024-05-08 20:56:43 +00:00
c59bb01bcb Query Frontend Refactor: Metrics Query Range (#3584)
* things technically compile!

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Succeed with no data

Signed-off-by: Joe Elliott <number101010@gmail.com>

* remove prom compat

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Add tests for the metrics pipeline and fix

Signed-off-by: Joe Elliott <number101010@gmail.com>

* cleanup

Signed-off-by: Joe Elliott <number101010@gmail.com>

* restore sorting

Signed-off-by: Joe Elliott <number101010@gmail.com>

* removed unreferenced files

Signed-off-by: Joe Elliott <number101010@gmail.com>

* migrate to response interface

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Sampling rate!

Signed-off-by: Joe Elliott <number101010@gmail.com>

* remove no-op

Signed-off-by: Joe Elliott <number101010@gmail.com>

* wip: add cli

Signed-off-by: Joe Elliott <number101010@gmail.com>

* QueryRange -> MetricsQueryRange

Signed-off-by: Joe Elliott <number101010@gmail.com>

* changelog and other cleanup

Signed-off-by: Joe Elliott <number101010@gmail.com>

* lint

Signed-off-by: Joe Elliott <number101010@gmail.com>

* lint + guardcode

Signed-off-by: Joe Elliott <number101010@gmail.com>

* change the way we're ignoring tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* clean up url parsing

Signed-off-by: Joe Elliott <number101010@gmail.com>

* fixed url parsing and add test

Signed-off-by: Joe Elliott <number101010@gmail.com>

* adjust sanity check

Signed-off-by: Joe Elliott <number101010@gmail.com>

---------

Signed-off-by: Joe Elliott <number101010@gmail.com>
2024-04-19 09:07:30 -04:00
5e26604dcf Add support for ingester query shards (#3574)
* Add support for ingester query shards

* Update changelog

* Drop unused test method

* Avoid boring lint error

* Fix /0 panic

* Fix first query param in test

* Drop TODO after fixed in config

* Tidy

* Test for case where we skip doing too much work

* Reduce shards until we are above the hardcode 1m interval threshold

* Test greater than query count

* Tidy

* Avoid /0

* Require 5 occurrences for goconst

* Set goconst to ignore tests, drop previous config

* Avoid shard count checking and set interval floor

* Clean and lint

* Handle case where more shards than the window will tollerate

* Ensure tests handle delta in both postivie and negative directions

* Grow last shard to fill the gap and add test

* Tidy
2024-04-18 17:40:20 +00:00
98760acff1 Enable errorlint and check for plain error comparisons (#2907)
* Use errorlint to check for plain error comparisons and type assertions

* Explicitly load golangci-lint config file

* Fix linter warnings about plain error comparison

* Fix linter warnings about plain error type assertions

* Implement tooManySpansError.Error() with pointer receiver

* Implement traceTooLargeError.Error() with pointer receiver

* Implement unsupportedError.Error() with pointer receiver

* Implement ParseError.Error() with pointer receiver

* Improve comment for errorlint in .golangci.yml

* Implement validationError.Error() with pointer receiver

* Check for ParseError using errors.As()

* Remove custom multi error implementation

* More readable condition for errors.Is(err, context.Canceled)

* Implement validationError.Unwrap()
2023-09-21 11:01:37 +10:00
0ed9ddcdbb Make intrinsic dimensions configurable and disable status_message by default (#1960)
* Add intrinsic dimenstions to spanmetrics config

* Remove deprecated linters from glangci-lint config

The linters deadcode, structcheck, and varcheck are deprecated since
golangci-lint v1.49.0. They are replace by unused which is already enabled
in our config

* Make intrinsic dimensions configurable for spanmetrics

* Disable intrinsic dimension status_message by default

* Add overrides for intrinsic dimension configuration

* Docs for the configuration of intrinsic dimensions

* Add PR to changelog

* Regenerate configuration schema in manifest.md

* Handle dimensions as conflicts when intrinsic dimension is absent

Custom dimensions from span attributs are also treated as conflicts
when the conflicting intrinsic dimension is not actually present. This
prevents those dimensions from being renamed when the intrinsic dimension
configuration changes

* Mark change #1794 as breaking in changelog

* Unit test for intrinsic dimension override

* Fail on invalid intrinsic dimension override keys

* Fix dimension prefix in changelog
2022-12-21 08:31:56 +01:00
703e2eb976 Update golangci linters for deprecation warnings (#1105)
* Update golangci linters for depreecation warnings

* Update lint for newer check

* Drop the nolint:interfacer after check removal
2021-11-15 15:44:10 -05:00
c1ca1e07be Clean up CI linting (#819)
* Tweak golangci-lint: exclude Log statements from errcheck

* Ignore use of unbuffered os.Signal channel in tempo-cli

* Remove redundant type assertion (golangci-lint)
2021-07-15 15:26:46 -04:00
7e3c0834f0 Makefile Tests Cleanup (#191)
* clarified tests

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Added e2e tag so builds would work

Signed-off-by: Joe Elliott <number101010@gmail.com>

* removed e2e tags.  removed integration from normal find

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Use make lint

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Revert "Use make lint"

This reverts commit 9aa5e12fc1190d706d566005e08a78f825c70835.

Signed-off-by: Joe Elliott <number101010@gmail.com>

* exclude golangci unused linter on e2e test files

Signed-off-by: Annanay <annanayagarwal@gmail.com>

Co-authored-by: Annanay <annanayagarwal@gmail.com>
2020-09-30 07:35:59 -04:00
01da6f34f1 lint
Signed-off-by: Joe Elliott <number101010@gmail.com>
2020-08-31 10:14:22 -04:00
6a0aa99fa2 Trying a new thing
Signed-off-by: Joe Elliott <number101010@gmail.com>
2020-08-21 16:53:09 -04:00
2a79b76e98 Disabled unused linter
Signed-off-by: Joe Elliott <number101010@gmail.com>
2020-08-21 16:35:32 -04:00
6cb977c823 Fixed golangci filename
Signed-off-by: Joe Elliott <number101010@gmail.com>
2020-02-06 14:06:31 -05:00