-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option to log multihttp responses #550
Conversation
MultiHttpEntryRequest request = 1 [(gogoproto.jsontag) = "request,omitempty"]; // The request parameters. | ||
repeated MultiHttpEntryAssertion assertions = 2 [(gogoproto.jsontag) = "checks,omitempty"]; // Zero or more assertions to be made on the response. | ||
repeated MultiHttpEntryVariable variables = 3 [(gogoproto.jsontag) = "variables,omitempty"]; // Zero or more variables to be used in the request. | ||
bool logResponse = 4 [(gogoproto.jsontag) = "logResponse,omitempty"]; // Whether to log the response body in the output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there might be multiple requests, wouldn't it be better to call the field LogResponseBodies
or LogResponses
. I'm slightly in favor of the former, because it specifies what exactly will get added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking this would be an option on a per request basis instead of all or nothing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be kind of a pain to specify for every request, though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about that.
Why would anyone want to have the body to be logged? Mostly for debugging. In that case, I imagine they want all the responses.
Why would anyone not want a specific response logged? Because there's something sensitive in there that they don't want uploaded to Loki. In that case, why would they want the other responses logged?
If this is for debugging (the test button), the frontend can rework the request so that it includes the option in each response.
Also, the frontend could have a "log all responses" button that causes all the individual options to be set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok yeah I'm convinced. I'll rework it to be a global option
…into log-response-option
6316d44
to
ab86278
Compare
* Add an option to log multihttp responses (#550) * Update to grafana-build-tools v0.6.0 * Chore(deps): Bump golang.org/x/net from 0.20.0 to 0.21.0 * Chore(deps): Bump github.com/rs/zerolog from 1.31.0 to 1.32.0 * Chore(deps): Bump github.com/miekg/dns from 1.1.57 to 1.1.58 * Fix: add test for HTTP check with a long URL * Add tenant label limits (#581) Signed-off-by: ka3de <danijs12@hotmail.com>
* Add an option to log multihttp responses (#550) * Update to grafana-build-tools v0.6.0 * Chore(deps): Bump golang.org/x/net from 0.20.0 to 0.21.0 * Chore(deps): Bump github.com/rs/zerolog from 1.31.0 to 1.32.0 * Chore(deps): Bump github.com/miekg/dns from 1.1.57 to 1.1.58 * Fix: add test for HTTP check with a long URL * Add tenant label limits (#581) Signed-off-by: ka3de <danijs12@hotmail.com>
* Add an option to log multihttp responses (#550) * Update to grafana-build-tools v0.6.0 * Chore(deps): Bump golang.org/x/net from 0.20.0 to 0.21.0 * Chore(deps): Bump github.com/rs/zerolog from 1.31.0 to 1.32.0 * Chore(deps): Bump github.com/miekg/dns from 1.1.57 to 1.1.58 * Fix: add test for HTTP check with a long URL * Add tenant label limits (#581) * Release v0.20.0 (#613) * Fix global tenant id usage for label limits query Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
* Add an option to log multihttp responses (#550) * Update to grafana-build-tools v0.6.0 * Chore(deps): Bump golang.org/x/net from 0.20.0 to 0.21.0 * Chore(deps): Bump github.com/rs/zerolog from 1.31.0 to 1.32.0 * Chore(deps): Bump github.com/miekg/dns from 1.1.57 to 1.1.58 * Fix: add test for HTTP check with a long URL * Add tenant label limits (#581) * Release v0.20.0 (#613) * Fix global tenant id usage for label limits query Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
* Add an option to log multihttp responses (#550) * Update to grafana-build-tools v0.6.0 * Chore(deps): Bump golang.org/x/net from 0.20.0 to 0.21.0 * Chore(deps): Bump github.com/rs/zerolog from 1.31.0 to 1.32.0 * Chore(deps): Bump github.com/miekg/dns from 1.1.57 to 1.1.58 * Fix: add test for HTTP check with a long URL * Add tenant label limits (#581) * Release v0.20.0 (#613) * Fix global tenant id usage for label limits query * Release v0.20.1 * Feature: promote adhoc to permanent feature (#615) * Update release script (#617) * Chore(deps): Bump github.com/mccutchen/go-httpbin/v2 (#618) * Fix: missing http check regex validations (#612) Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
* Add an option to log multihttp responses (#550) * Update to grafana-build-tools v0.6.0 * Chore(deps): Bump golang.org/x/net from 0.20.0 to 0.21.0 * Chore(deps): Bump github.com/rs/zerolog from 1.31.0 to 1.32.0 * Chore(deps): Bump github.com/miekg/dns from 1.1.57 to 1.1.58 * Fix: add test for HTTP check with a long URL * Add tenant label limits (#581) * Release v0.20.0 (#613) * Fix global tenant id usage for label limits query * Release v0.20.1 * Feature: promote adhoc to permanent feature (#615) * Update release script (#617) * Chore(deps): Bump github.com/mccutchen/go-httpbin/v2 (#618) * Fix: missing http check regex validations (#612) Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
* Add an option to log multihttp responses (#550) * Update to grafana-build-tools v0.6.0 * Chore(deps): Bump golang.org/x/net from 0.20.0 to 0.21.0 * Chore(deps): Bump github.com/rs/zerolog from 1.31.0 to 1.32.0 * Chore(deps): Bump github.com/miekg/dns from 1.1.57 to 1.1.58 * Fix: add test for HTTP check with a long URL * Add tenant label limits (#581) * Release v0.20.0 (#613) * Fix global tenant id usage for label limits query * Release v0.20.1 * Feature: promote adhoc to permanent feature (#615) * Update release script (#617) * Chore(deps): Bump github.com/mccutchen/go-httpbin/v2 (#618) * Fix: missing http check regex validations (#612) * Release v0.20.2 (#620) * Chore(deps): Bump github.com/mccutchen/go-httpbin/v2 (#626) * change the name of the k6 check type to scripted (#622) * Chore(deps): Bump github.com/prometheus/client_model from 0.5.0 to 0.6.0 * Chore(deps): Bump google.golang.org/grpc from 1.61.0 to 1.61.1 * Chore(deps): Bump github.com/prometheus/common from 0.46.0 to 0.47.0 * Chore(deps): Bump github.com/prometheus/prometheus from 0.49.1 to 0.50.0 * Add header to ease tracking HTTP requests (#624) * Add telemetry protobuf definitions (#627) Signed-off-by: ka3de <danijs12@hotmail.com>
* Add an option to log multihttp responses (#550) * Update to grafana-build-tools v0.6.0 * Chore(deps): Bump golang.org/x/net from 0.20.0 to 0.21.0 * Chore(deps): Bump github.com/rs/zerolog from 1.31.0 to 1.32.0 * Chore(deps): Bump github.com/miekg/dns from 1.1.57 to 1.1.58 * Fix: add test for HTTP check with a long URL * Add tenant label limits (#581) * Release v0.20.0 (#613) * Fix global tenant id usage for label limits query * Release v0.20.1 * Feature: promote adhoc to permanent feature (#615) * Update release script (#617) * Chore(deps): Bump github.com/mccutchen/go-httpbin/v2 (#618) * Fix: missing http check regex validations (#612) * Release v0.20.2 (#620) * Chore(deps): Bump github.com/mccutchen/go-httpbin/v2 (#626) * change the name of the k6 check type to scripted (#622) * Chore(deps): Bump github.com/prometheus/client_model from 0.5.0 to 0.6.0 * Chore(deps): Bump google.golang.org/grpc from 1.61.0 to 1.61.1 * Chore(deps): Bump github.com/prometheus/common from 0.46.0 to 0.47.0 * Chore(deps): Bump github.com/prometheus/prometheus from 0.49.1 to 0.50.0 * Add header to ease tracking HTTP requests (#624) * Add telemetry protobuf definitions (#627) Signed-off-by: ka3de <danijs12@hotmail.com>
One of the main points of feedback we've gotten is that it would be nice to have more visibility into what's happening during the request. Logging response bodies is tricky because the can be 1.) gigantic or 2.) contain sensitive information. However, it would be super useful for debugging
I feel that by making logging response bodies an opt in option on a per request basis, and limiting to 1000 characters would give reasonable protection from both of these problems.