Set a User-Agent header with the AtlasBoard version
Issue #92
resolved
While rolling out an AtlasBoard upgrade across a company it would be useful to know which versions are currently deployed. A User-Agent
header like:
User-Agent: atlasboard/0.10.0
would be helpful.
Comments (5)
-
-
reporter Getting the version would be a bit more challenging though.
Yes, I was expecting that to be more difficult. Can it be set at release time? Or is that synchronous IO hit just once on startup?
-
It was easy enough to double check to confirm. Since the dependencies are resolved and cached on the job instance, that code only gets executed once per job on startup which is close to zero overhead, so we should be fine.
-
Obviously we will only get the header set on the jobs that use the
request
dependency provided by Atlasboard -
- changed status to resolved
Introduced in 0.11.0
- Log in to comment
Thanks for creating the issue Joseph. Adding default headers to request should be similar to what you already did to add a default cookie jar:
https://github.com/request/request
Getting the version would be a bit more challenging though. We are already doing it in
cli.js
:Not sure if we should pay the perfomance hit of doing synchronous IO just for this. Maybe the user agent footprint could be just "atlasboard" for now.