Skip to content

Monitoring and logging HTTP 500 errors & HTTP 200s for Vault? #13072

@vallamost

Description

@vallamost

Is your feature request related to a problem? Please describe.

It appears that Vault does not return an HTTP status code in the response logs to a client as documented here at the time of writing this: https://support.hashicorp.com/hc/en-us/articles/360000995548-Audit-and-Operational-Log-Details

I am trying to diagnose and root cause HTTP 500 errors being received by our clients that are interacting with our Vault service's API. At this time it is impossible to know the amount of HTTP 500 errors being thrown by our Vault service. If I could set up a logging filter to know when and where HTTP 500s are being thrown as well as getting their request IDs to troubleshoot the request in the stack that would be super valuable.

Describe the solution you'd like
A clear and concise description of what you want to happen.

I'd like to see Vault add a new attribute in the JSON log output for the http_response_code sent in a response to a client calling Vault's REST API.

Example log entry

{
...
  "type": "response",
....
  "http_response_code": 500,
  "error": "Server was too busy to handle the request, please try again later",
...
}

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Log all error responses and categorize them to some type of HTTP status?

Explain any additional use-cases
If there are any use-cases that would help us understand the use/need/value please share them as they can help us decide on acceptance and prioritization.

Debugging HTTP errors, monitoring for HTTP errors, looking at success rates and availability.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions