Skip to content
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 trace logger events for Bandwidth toxic #437

Merged
merged 1 commit into from
Sep 9, 2022
Merged

Conversation

miry
Copy link
Contributor

@miry miry commented Sep 7, 2022

Add more log events for Trace level to debug bandwidth toxic issues.

Tophat

Run server

$ LOG_LEVEL=trace ./dist/toxiproxy-server

Create proxy and toxics:

$ ./dist/toxiproxy-cli create -l ":2001" -u "example.com:80" shopify_http
Created new proxy shopify_http

$ ./dist/toxiproxy-cli toxic add --downstream --type=bandwidth --toxicName="bandwidth_downstream1" shopify_http
Added downstream bandwidth toxic 'bandwidth_downstream1' on proxy 'shopify_http'

$ ./dist/toxiproxy-cli toxic add --upstream --type=bandwidth --toxicName="bandwidth_upstream1" shopify_http
Added upstream bandwidth toxic 'bandwidth_upstream1' on proxy 'shopify_http'

Create a connection:

$ nc localhost 2001
GET /

During this time remove a toxic:

$ ./dist/toxiproxy-cli toxic delete --toxicName bandwidth_upstream1 shopify_http
Removed toxic 'bandwidth_upstream1' on proxy 'shopify_http'

Sample server output:

{"level":"trace","component":"BandwidthToxic","method":"Pipe","toxic_type":"bandwidth","addr":"0x140003801c0","caller":"bandwidth.go:52","time":"2022-09-07T10:51:02Z","message":"BandwidthToxic was interrupted during writing data"}
{"level":"trace","component":"BandwidthToxic","method":"Pipe","toxic_type":"bandwidth","addr":"0x140003801c0","caller":"bandwidth.go:52","time":"2022-09-07T10:51:02Z","message":"BandwidthToxic was interrupted during writing data"}

@miry miry self-assigned this Sep 7, 2022
@miry miry added the Toxiproxy label Sep 7, 2022
@miry miry marked this pull request as ready for review September 7, 2022 10:42
@miry miry requested review from a team, frightenedmonkey, yuseinishiyama and dabealu and removed request for a team September 7, 2022 10:58
@miry miry added this to the 2.5.0 milestone Sep 7, 2022
@miry miry mentioned this pull request Sep 7, 2022
18 tasks
@miry miry merged commit 8e307bb into master Sep 9, 2022
@miry miry deleted the bandwidth-logger branch September 9, 2022 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant