npm / statusboard

Public monitor/status/health board for @npm/cli-team's maintained projects
https://npm.github.io/statusboard
Other
152 stars 53 forks source link

Include `request-id` from Registry in CLI logs #699

Open tiagonbotelho opened 1 year ago

tiagonbotelho commented 1 year ago

Is your feature request related to a problem? Please describe. It is currently quite hard to open support tickets and provide enough context to the support team about my failure. npm's registry provides a request-id in the event of a failure, which we aren't exposing in our CLI logs.

Describe the solution you'd like Expose the request-id in the npm CLI logs, or through the --verbose output.

Describe alternatives you've considered N/A

Additional context N/A

wraithgar commented 1 year ago

After looking into this, we want a well-defined header to be returned from the registry so that other registries can follow suit if they want, rather than trying to lock into / track implementation-specific headers (i.e. CF-Ray). We have no way of knowing on any given registry what would constitute the "request-id" that could help them troubleshoot a request. It's better that they give us that info in a well-defined place so we can log it if it's there.

request-id seems like a good header name to implement.