Skip to content

[metrics] Decide global logging for a request on the metric handler side #562

Open
@rahulbabu95

Description

@rahulbabu95

In middleware.go where we log globally for each HTTP request, we have a hardcoded logic to determine if the request came in for metrics handler using the uri to determine that global logging is required. A similar use case in ISO is handled by setting the 'X-Global-Logging' field in the response Header. This arguably isolates individual handlers to opt in/out of global logging and keeps component specific logic away from middleware.

Expected Behaviour

Current Behaviour

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • Operating System and version (e.g. Linux, Windows, MacOS):

  • How are you running Tinkerbell? Using Vagrant & VirtualBox, Vagrant & Libvirt, on Packet using Terraform, or give details:

  • Link to your project or a code example to reproduce issue:

Metadata

Metadata

Assignees

No one assigned

    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