traefik icon indicating copy to clipboard operation
traefik copied to clipboard

Add namespace of the ingress/ingressroute in the logs

Open gioppoluca opened this issue 11 months ago • 1 comments

Welcome!

  • [X] Yes, I've searched similar issues on GitHub and didn't find any.
  • [X] Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you expect to see?

In the logs of traefik there is a mix of logs for all the ingresses served by traefik. Theree is no way to identify in the logs the namespace of the ingress that generated the traefik routing, could be useful for filtering properly logs and delivering them to proper index, in elasticsearch for example, to add a "target_namespace" label with the namespace of the ingress that activated the route. The info is something that traefik has. It knows both the ingress requesting and the service called.

gioppoluca avatar Mar 27 '24 14:03 gioppoluca

Hello @gioppoluca,

Thanks for opening the issue.

If you are looking to have the ingress namespace in the access log this is something that it not possible today. And we have to keep in mind that Traefik is supporting multiple providers where namespace does not make sense in the access log.

We are interested in this issue but are unsure about the use case and the traction it will receive, so we are going to leave the status as "kind/proposal" to give the community time to let us know that they would like this. We will reevaluate as people respond.

mmatur avatar Apr 05 '24 16:04 mmatur