mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 06:04:05 -08:00
ad4f514e66
* Add OTLP Ingestion endpoint We copy files from the otel-collector-contrib. See the README in `storage/remote/otlptranslator/README.md`. This supersedes: https://github.com/prometheus/prometheus/pull/11965 Signed-off-by: gouthamve <gouthamve@gmail.com> * Return a 200 OK It is what the OTEL Golang SDK expect :( https://github.com/open-telemetry/opentelemetry-go/issues/4363 Signed-off-by: Goutham <gouthamve@gmail.com> --------- Signed-off-by: gouthamve <gouthamve@gmail.com> Signed-off-by: Goutham <gouthamve@gmail.com>
73 lines
2 KiB
YAML
73 lines
2 KiB
YAML
run:
|
|
timeout: 15m
|
|
skip-files:
|
|
# Skip autogenerated files.
|
|
- ^.*\.(pb|y)\.go$
|
|
skip-dirs:
|
|
# Copied it from a different source
|
|
- storage/remote/otlptranslator/prometheusremotewrite
|
|
|
|
output:
|
|
sort-results: true
|
|
|
|
linters:
|
|
enable:
|
|
- depguard
|
|
- gocritic
|
|
- gofumpt
|
|
- goimports
|
|
- misspell
|
|
- predeclared
|
|
- revive
|
|
- unconvert
|
|
- unused
|
|
|
|
issues:
|
|
max-same-issues: 0
|
|
exclude-rules:
|
|
- linters:
|
|
- gocritic
|
|
text: "appendAssign"
|
|
- path: _test.go
|
|
linters:
|
|
- errcheck
|
|
|
|
linters-settings:
|
|
depguard:
|
|
rules:
|
|
main:
|
|
deny:
|
|
- pkg: "sync/atomic"
|
|
desc: "Use go.uber.org/atomic instead of sync/atomic"
|
|
- pkg: "github.com/stretchr/testify/assert"
|
|
desc: "Use github.com/stretchr/testify/require instead of github.com/stretchr/testify/assert"
|
|
- pkg: "github.com/go-kit/kit/log"
|
|
desc: "Use github.com/go-kit/log instead of github.com/go-kit/kit/log"
|
|
- pkg: "io/ioutil"
|
|
desc: "Use corresponding 'os' or 'io' functions instead."
|
|
- pkg: "regexp"
|
|
desc: "Use github.com/grafana/regexp instead of regexp"
|
|
errcheck:
|
|
exclude-functions:
|
|
# Don't flag lines such as "io.Copy(io.Discard, resp.Body)".
|
|
- io.Copy
|
|
# The next two are used in HTTP handlers, any error is handled by the server itself.
|
|
- io.WriteString
|
|
- (net/http.ResponseWriter).Write
|
|
# No need to check for errors on server's shutdown.
|
|
- (*net/http.Server).Shutdown
|
|
# Never check for logger errors.
|
|
- (github.com/go-kit/log.Logger).Log
|
|
# Never check for rollback errors as Rollback() is called when a previous error was detected.
|
|
- (github.com/prometheus/prometheus/storage.Appender).Rollback
|
|
goimports:
|
|
local-prefixes: github.com/prometheus/prometheus
|
|
gofumpt:
|
|
extra-rules: true
|
|
revive:
|
|
rules:
|
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
|
|
- name: unused-parameter
|
|
severity: warning
|
|
disabled: true
|