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

Setting a default user agent #541

Open
recrsn opened this issue Sep 23, 2020 · 4 comments
Open

Setting a default user agent #541

recrsn opened this issue Sep 23, 2020 · 4 comments

Comments

@recrsn
Copy link

recrsn commented Sep 23, 2020

Proposal

Adding a default user agent to identify Vegeta. Optionally customizable via command-line arg.

Background

While trying to identify requests from Vegeta in server logs, the user-agent is reported as Go-http-client. It becomes a bit difficult to debug traces associated with Vegeta requests. In this particular scenario, I was trying to investigate a concurrency-conflict issue in one of our services.

Workarounds

Currently, I modify the HTTP traces we generate to add a user agent header.

@dstotijn
Copy link

dstotijn commented Oct 2, 2020

To identify Vegeta, couldn't you rely on the X-Vegeta-Attack (if you name the attack) and X-Vegeta-Seq HTTP request headers that are set (ref)?

@recrsn
Copy link
Author

recrsn commented Oct 2, 2020

@dstotijn Yes it is possible, but for that we have to teach our entire tracing infra to recognize and pass-through the header. I am hoping we could rely on something standard (like Curl or Postman does)

@AlexanderYastrebov
Copy link
Contributor

Adding a default user agent to identify Vegeta. Optionally customizable via command-line arg.

It is possible right now:

echo "GET http://localhost:9090" | vegeta attack -header 'User-Agent: FooBar' -rate 10/s | vegeta report -every 1s

@AlexanderYastrebov
Copy link
Contributor

I also think it is not possible to remove default user agent via flags. See related golang/go#15524

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants