Bryan Boreham

Results 969 comments of Bryan Boreham

No, I don't expect the code to get much shorter when implementing this. In particular code like this which you removed: https://github.com/prometheus/client_golang/pull/1090/files#diff-aa9bfd1a638fbb706f8e8920297902937011160319d9679add5dca56e5ab8277L145-L153 is important to handle timeouts, and will need...

I've just noticed that the code calls the JSON parser twice to read each request. Once in `apiClientImpl.Do: https://github.com/prometheus/client_golang/blob/618194de6ad3db637313666104533639011b470d/api/prometheus/v1/api.go#L1140 and once in the individual API methods like `Query`: https://github.com/prometheus/client_golang/blob/618194de6ad3db637313666104533639011b470d/api/prometheus/v1/api.go#L859 Then,...

I couldn't think of a clean and painless way to fix it. Maybe special-case the exact numbers/strings? Conceptually I'd like `model.Earliest` to be this value: https://github.com/prometheus/prometheus/blob/d26fd5c97b0c505f5cb36f719abd6ccc8130bdc9/web/api/v1/api.go#L689 but it seems unlikely...

Right now I don't expect to start on this. It's quite a big job and not critical to what I'm doing. There was some discussion in #763 of code-generating the...

The current code calls `h.client.DoGetFallback()` which returns a `[]byte`, via `bytes.Buffer.ReadFrom()`. (This call is made in multiple places, for each different API method). My idea was to parse JSON from...

The main API is methods like: ``` func (h *httpAPI) Query(ctx context.Context, query string, ts time.Time) (model.Value, Warnings, error) { ``` this returns structured data, not JSON. My proposal is...

I've just noticed that the code calls the JSON parser twice to read each request. Once in `apiClientImpl.Do: https://github.com/prometheus/client_golang/blob/618194de6ad3db637313666104533639011b470d/api/prometheus/v1/api.go#L1140 and once in the individual API methods like `Query`: https://github.com/prometheus/client_golang/blob/618194de6ad3db637313666104533639011b470d/api/prometheus/v1/api.go#L859 Then,...

On the other hand, when using distributed tracing, this is exactly what I want to do - pass in a trace ID which will be picked up at lower layers.

I just hit this on `LabelValues()`. Evidently somebody else though that `time.Time{}` should behave as 'not set': https://github.com/cortexproject/cortex/blob/07d6cfc4eb848fc410262773255dfec750c0a64f/integration/getting_started_single_process_config_test.go#L62 How about creating a constant with a value of minTime, that would...

MBOI we have been using this helper "`CollectedRequest`" for a few years: it times the request, collects the histogram observation, and now adds exemplars: https://github.com/weaveworks/common/blob/bd288de53d57de300fa286688ce2fc935687213f/http/client/client.go#L66-L67