Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging: Avoid uuids in field names #7748

Closed
barkbay opened this issue Apr 25, 2024 · 0 comments · Fixed by #7869
Closed

Logging: Avoid uuids in field names #7748

barkbay opened this issue Apr 25, 2024 · 0 comments · Fixed by #7869
Assignees
Labels
>bug Something isn't working v2.14.0

Comments

@barkbay
Copy link
Contributor

barkbay commented Apr 25, 2024

We have at least one log statement, at the debug level, which can generate fields with "random" names:

if !exists {
log.V(1).Info("Adding new handler registration", "key", handler.Key(), "current_registrations", d.registrations)
}

This may for example produce the following log:

"current_registrations": {
      "my-project-1-es-referenced-secrets": {
        "Watcher": {
          "Namespace": "my-project-1",
          "Name": "es"
        },
        "Watched": [
          {
            "Namespace": "my-project-1",
            "Name": "watched-resource1"
          },
          {
            "Namespace": "my-project-1",
            "Name": "watched-resource2"
          }
        ],
        "Name": "my-project-1-es-referenced-secrets"
      },
      "my-project-2-es-referenced-secrets": {
        "Watcher": {
          "Namespace": "my-project-2",
          "Name": "es"
        },
        "Watched": [
          {
            "Namespace": "my-project-2",
            "Name": "watched-resource1"
          },
          {
            "Namespace": "my-project-2",
            "Name": "watched-resource2"
          }
        ],
        "Name": "my-project-2-es-referenced-secrets"
      },
     .... lots of other fields ...

This can lead to a "mapping explosion" situation.

@barkbay barkbay added the >bug Something isn't working label Apr 25, 2024
@barkbay barkbay self-assigned this Jun 4, 2024
@barkbay barkbay added the v2.14.0 label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Something isn't working v2.14.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant