Skip to content

Add logging improvements to PPD #272

@tomguilbert

Description

@tomguilbert

Definition of done:

  • Add config.log_level to environment configurations
    • default to DEBUG in development & test
    • default to INFO in production
  • Ensure latest version of Data Services API gem is being used: 1.5.4
  • Ensure latest version of JSON Rails Logger gem is being used: 2.0.5
  • Ensure the information passed to the logger include:
    • timestamp
      • Date in ISO8061 format
        • YYYY-MM-DDThh:mm:ss.msZ
    • request_id
      • X-Request-ID of original incoming request as generated by the reverse proxy
    • method
      • HTTP method
        • DELETE|GET|PATCH|POST|PUT| etc
    • path
      • HTTP request path
    • level
      • Severity of event
        • DEBUG|INFO|WARN|ERROR|FATAL
    • message
      • Human readable description of logged event
      • Could require, or benefit from, additional values presented like time taken and/or returned rows
      • Additional values should be included as structured fields if used
    • query_params
      • HTTP request parameters as a stringified JSON object (OPTIONAL)
    • body
      • HTTP request or response body (OPTIONAL)
    • status
      • HTTP response status code
        • 2xx|3xx|4xx|5xx
    • request_time
      • Time taken to process the event
        • logged as a float/decimal value string: 0.003
        • displayed in message: time taken 3ms
    • returned_rows
      • The number of rows / records returned by a request (OPTIONAL)
    • request_status
      • The status of a request
        • received | processing | complete

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions