Comments (4)
You're right, 404 is not appropriate - I meant to use 400 - Bad Request
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (for example, malformed request syntax, invalid request message framing, or deceptive request routing).
From my understanding, 403 is usually used in the context of security/RBAC - which isn't the case here, since this is a business logic restriction. Seeing 403 in logs would usually imply some auth issue which would be misleading.
from prometheus.
Why 404? I think 403 is more appropriate:
403 Forbidden
The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. If the server does not wish to make this information available to the client, the status code 404 (Not Found) can be used instead.
from prometheus.
Thanks.
I just handled an incident triggered by this behavior. The Prometheus server returned 500: too old sample
one time to an agent configured to remote write its data. Agent then endlessly retried the same call again and again block all samples until I killed / cleaned it.
Returning 400 seems like the right to do.
from prometheus.
Looks like ErrOutOfOrderExemplar
and a few others would have the same problem.
from prometheus.
Related Issues (20)
- Prometheus agent mode does not send the samples which were not sent when restarted HOT 1
- Configurable shardedPostings sharding function HOT 2
- Flaky TestAsyncRuleEvaluation HOT 6
- Config support disable staleness track HOT 3
- Native histograms: do not remote write exemplar if native histogram series is not sent HOT 2
- Dockerized Promtheus run into "rename data/chunks_head/000021.tmp: Operation not permitted" error
- scrape: Add more tests validating HTTP requests made on scrape (and their headers) HOT 3
- Provide docker image of wasm HOT 3
- Inaccessible data disk may cause prometheus panic HOT 1
- Vulnerability Flagged from govulncheck HOT 1
- Convert existing native histogram unit tests to the PromQL testing framework HOT 4
- UTF-8: Update typescript parser to support new syntax HOT 3
- Variant of `increase` function that assumes uninitialized counters start at zero 0, like VictoriaMetric's increase_pure HOT 3
- Proposal: combine 'promtool' and 'prometheus' binaries in Prometheus 3
- Prometheus built from source in directory not called "prometheus" doesn't work HOT 9
- Wrong timestamp can break entire tsdb HOT 1
- invalid memory address or nil pointer dereference azure.mapFromVMScaleSetVM HOT 7
- Support for ingesting out of order exemplars HOT 2
- Security: Sub-components version disclosure in prometheus 2.47.2 HOT 2
- Support sample value updates, modification, and/or accumulation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prometheus.