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

want server name in headers and errors #1100

Open
davepacheco opened this issue Aug 27, 2024 · 4 comments
Open

want server name in headers and errors #1100

davepacheco opened this issue Aug 27, 2024 · 4 comments

Comments

@davepacheco
Copy link
Collaborator

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.

@hawkw
Copy link
Member

hawkw commented Aug 27, 2024

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}

@sunshowers
Copy link
Contributor

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.

@davepacheco
Copy link
Collaborator Author

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.

@jclulow
Copy link
Collaborator

jclulow commented Sep 7, 2024

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.

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

4 participants