Skip to content

JSON logging not applied for k8s dependencies #1150

@der-eismann

Description

@der-eismann

Describe the bug
We enabled JSON logging to consume and process the messages in our logging system (Graylog, like ELK). However it seems that JSON logging is not forwarded to messages produced by k8s dependencies like for client-side throttling.

Steps to reproduce

  1. Run NTH in any mode
  2. Have it do some work?
  3. Wait for Waited for 1.195944684s due to client-side throttling or similar

Expected outcome
k8s client logs should also be in JSON format, ideally with the same message structure and timestamp format

Application Logs

{"time":"2025-03-25T08:46:56Z","message":"evicting pod default/abc-6c6bfb79bb-mhggh"}
{"time":"2025-03-25T08:46:56Z","message":"evicting pod default/def-5b6fc69988-kdfrb"}
I0325 08:47:00.329841       1 request.go:697] Waited for 3.078586713s due to client-side throttling, not priority and fairness, request: GET:https://10.10.0.1:443/api/v1/namespaces/default/pods/ghi-54c7d4fcc9-w69fz
I0325 08:47:10.330255       1 request.go:697] Waited for 1.794203547s due to client-side throttling, not priority and fairness, request: GET:https://10.10.0.1:443/api/v1/namespaces/default/pods/jkl-b9984f4ff-zf5lk

Environment

  • NTH App Version: v1.25.0
  • NTH Mode (IMDS/Queue processor): Queue
  • OS/Arch: Container / Bottlerocket arm64
  • Kubernetes version: 1.32
  • Installation method: Helm

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