Open davepacheco opened 3 weeks ago
What about the Server
header? I believe that Hyper might also add Server: hyper v{version}
by default, but we could also add Server: {dropshot server name}
Maybe callers can provide an optional server name to use
Hmm -- in general, we have this while generating OpenAPI documents (e.g. "Oxide Region API"), but the server is not aware of this.
For API traits we could use the name of the trait.
The idea here is to figure out which instance of, say, Nexus, generated the request. The value has to come at runtime. I was assuming we'd add a new argument.
I don't think there's a standard header that provides that information. Server is supposed to identify static information about the software or product, analogous to User-Agent.
It seems like X-Backend-Server might be somewhat common for including, say, the DNS name of the backend instance in a load balancer pool.
When debugging errors in systems with multiple dropshot servers, it's great to have the request id, but you often want an identifier for the server, too. Some systems have used the
x-server-name
header for this. How can we support this? Maybe callers can provide an optional server name to use? If we only cared about the headers, then consumers could probably use #1060, but I think we want this in error response bodies, too.