csmarchbanks
Repos
36
Followers
50

The Prometheus monitoring system and time series database.

45722
7395

A horizontally scalable, highly available, multi-tenant, long term Prometheus.

4920
682

Some personal dotfiles

0
0

Website/blog.

0
0

Events

issue comment
Getting error on endpoint "A server error occurred. Please contact the administrator."

In that example it looks like the behavior I expect. I am seeing the "A server error occurred. Please contact the administrator." error on the page, and the exception is printed to stdout so that someone can fix it.

We could propagate the exception to the page as well, but that could also leak information so the generic message might be better.

Created at 22 hours ago
issue comment
Encode PromQL Matricies with Arrow

Yes, the idea of supporting Arrow in the query(_range) API is to better support data analytics and machine learning use cases. For those use cases I have found it common to at least use a function like rate and commonly also some level of aggregation. I would not want a client to have to deal with things like counter resets that are handled by PromQL which means remote read does not work well for these use cases.

Created at 3 days ago

Add debug logging for Arrow error

Signed-off-by: Chris Marchbanks csmarchbanks@gmail.com

Created at 1 week ago
issue comment
Encode PromQL Matricies with Arrow

I was more thinking about moving the modification to the model/ package than into promql itself, would it make sense for you? It would then be usable for third parties promql engines as well.

That seems reasonable, I will at least investigate it next week!

Created at 1 week ago

Add debug logging for Arrow error

Signed-off-by: Chris Marchbanks csmarchbanks@gmail.com

Created at 1 week ago
issue comment
docs: initial skafolding

Maybe just add any additional requirements to docs/requirements.txt?

Created at 1 week ago
Option to pass a custom count to `Summary.observe`

At the moment Summary.observer looks like this:

    def observe(self, amount: float) -> None:
        self._count.inc(1)
        self._sum.inc(amount)

I'd like to be able to pass a custom value to increment _count (not just 1). I have a use case where I'm receiving messages in bulk, and all I know it the total size and total count of these messages.

    def observe(self, amount: float, count: int = 1) -> None:
        self._count.inc(count)
        self._sum.inc(amount)
Created at 1 week ago
issue comment
Option to pass a custom count to `Summary.observe`

I am also going to close this for now as I don't think we want this feature today.

Created at 1 week ago
issue comment
Option to pass a custom count to `Summary.observe`

👍 Just as a note, rate in Prometheus doesn't actually look at the underlying type, it just assumes it is a counter. Usage of total and other suffixes for counters is entirely a convention to make it easier for the user to know the type of a metric.

Created at 1 week ago
issue comment
add Timer decorator support partial function

Thank you for the PR! decorator.py is actually copied from an old version of https://github.com/micheles/decorator, and we do not want to manually modify the contents. I would be ok updating to a newer version of decorator if it supports partial functions.

Created at 1 week ago
issue comment
Usage of summary.time while handling exceptions

Hello, I believe this feature was added in https://github.com/prometheus/client_python/pull/730, we are working on improving our documentation, so hopefully it will be easier to find that functionality in the future!

Does that functionality address the problem for you?

Created at 1 week ago
issue comment
Encode PromQL Matricies with Arrow

At the dev-summit after PromCon we did agree that a streaming API is something we are interested in. However, I do not want to derail this pull request with discussing a streaming API as supporting streaming responses in the PromQL engine is a far larger change than this.

However, I do want the wire format in this PR to support streaming use cases, and the question of if we want to stream by series and samples (what is present in this PR), or stream by timestamp with all series in one row is relevant to the wire format of this PR. For example, rather than the simple schema I use here (two columns, t and v) I could add every series as a separate column with one t column in addition. I am experimenting a bit with that format, but I am not sure I love it as you can end up with a fairly sparse matrix in the presence of churn or an instant query like up[30d]. I would love to hear the opinions of others on per-series vs per-timestamp streaming though.

Plus, if the wire format supports streaming, those other projects can experiment with/implement streaming as they want :).

Created at 1 week ago
issue comment
Option to pass a custom count to `Summary.observe`

Thanks for the idea!

I hesitate a bit to add a configurable count as I do not know how we would support quantiles in the future which would depend on knowing the value of each observation, not a bulk of operations. I am willing to reconsider this though.

I wonder if instead of using a Summary here if you could just use two counters instead? Something like messages_total and messages_bytes_total.

Created at 1 week ago

Reduce the mmap minimum size

Reduce the initial mmap file size from 1MiB to 64KiB. This should reduce the memory and disk overhead for larger numbers of multiprocess workers.

Signed-off-by: SuperQ superq@gmail.com

Merge pull request #853 from prometheus/superq/reduce_mmap_overhead

Reduce the mmap minimum size

Created at 1 week ago
pull request closed
Reduce the mmap minimum size

Reduce the initial mmap file size from 1MiB to 64KiB. This should reduce the memory and disk overhead for larger numbers of multiprocess workers.

Signed-off-by: SuperQ superq@gmail.com

Created at 1 week ago

Use const for Arrow MIME type

Signed-off-by: Chris Marchbanks csmarchbanks@gmail.com

Move Arrow writing code to the Matrix and Series types

Signed-off-by: Chris Marchbanks csmarchbanks@gmail.com

Created at 2 weeks ago

Move Arrow writing code to the Matrix and Series types

Created at 2 weeks ago
issue comment
Encode PromQL Matricies with Arrow

I added a commit that moves the arrow transformation and writes to the Matrix and Series types in the promql package and hid them behind an interface so we could support Vector or other types in the future with minimal changes. What do you think of that approach? I am also happy to move the code to a separate arrow package if desired, perhaps as a sub-package of promql?

Created at 2 weeks ago

Encode PromQL Matricies with Arrow

Use content negotiation to return a stream of Arrow records from the query and query_range endpoints in the case where a matrix is returned. This provides vastly superior CPU performance both on the server and on the client when transferring significant amounts of data.

goos: darwin goarch: arm64 pkg: github.com/prometheus/prometheus/web/api/v1 BenchmarkRespond-8 2326 475496 ns/op 213687 B/op 8 allocs/op BenchmarkRespondArrow-8 16176 74459 ns/op 452520 B/op 83 allocs/op

Signed-off-by: Chris Marchbanks csmarchbanks@gmail.com

Use const for Arrow MIME type

Move Arrow writing code to the Matrix and Series types

Created at 2 weeks ago
pull request opened
Encode PromQL Matricies with Arrow

Use content negotiation to return a stream of Arrow records from the query and query_range endpoints in the case where a matrix is returned. This provides vastly superior CPU performance both on the server and on the client when transferring significant amounts of data.

This is a very minimal implementation, and only targets the matrix type of response to begin with as that is the only response that can return very large amounts of data. I try to explain the response, and leave it open to implementing streaming samples for each series, but today all samples are returned in a single record batch for performance reasons (and the 11,000 point limit makes this safe).

Happy to iterate on the format or code. I also wonder if we should put this behind a feature flag, but since content negotiation is required an additional flag did not feel necessary to me. The documentation still calls out the arrow type as experimental. More information on the Arrow Streaming format can be found at https://arrow.apache.org/docs/format/Columnar.html#ipc-streaming-format.

goos: darwin
goarch: arm64
pkg: github.com/prometheus/prometheus/web/api/v1
BenchmarkRespond-8                  2326            475496 ns/op          213687 B/op          8 allocs/op
BenchmarkRespondArrow-8            16176             74459 ns/op          452520 B/op         83 allocs/op
Created at 2 weeks ago

Encode PromQL Matricies with Arrow

Use content negotiation to return a stream of Arrow records from the query and query_range endpoints in the case where a matrix is returned. This provides vastly superior CPU performance both on the server and on the client when transferring significant amounts of data.

goos: darwin goarch: arm64 pkg: github.com/prometheus/prometheus/web/api/v1 BenchmarkRespond-8 2326 475496 ns/op 213687 B/op 8 allocs/op BenchmarkRespondArrow-8 16176 74459 ns/op 452520 B/op 83 allocs/op

Signed-off-by: Chris Marchbanks csmarchbanks@gmail.com

Created at 2 weeks ago

Encode PromQL Vectors and Matricies with Arrow

Signed-off-by: Chris Marchbanks csmarchbanks@gmail.com

Created at 2 weeks ago