Add user-agent to all http clients using RawClientHttpRequestSettings. (#3115)

This commit is contained in:
Tingluo Huang
2024-01-30 13:39:41 -05:00
committed by GitHub
parent dcb790f780
commit 7414e08fbd
4 changed files with 30 additions and 3 deletions

View File

@@ -49,6 +49,9 @@ namespace GitHub.Runner.Worker
!string.IsNullOrEmpty(orchestrationId.Value))
{
HostContext.UserAgents.Add(new ProductInfoHeaderValue("OrchestrationId", orchestrationId.Value));
// make sure orchestration id is in the user-agent header.
VssUtil.InitializeVssClientSettings(HostContext.UserAgents, HostContext.WebProxy);
}
var jobServerQueueTelemetry = false;