kubernetes / ingress-nginx

Ingress NGINX Controller for Kubernetes
https://kubernetes.github.io/ingress-nginx/
Apache License 2.0
17.59k stars 8.27k forks source link

Enhancing Multi-Tenant Ingress Controller for Dynamic Trace Sending #10779

Open angelbarrera92 opened 11 months ago

angelbarrera92 commented 11 months ago

Objective

I'd like to propose an enhancement for the current functionality of the multi-tenant ingress controller related to tracing capabilities. Presently, the controller allows setting a singular collector-host and collector-port, applying this configuration universally to all traces. However, I'm looking to expand this capability to enable distinct tracing behaviors based on specific annotations at the ingress level.

Current Configuration

The current setup confines the configuration of collector-host and collector-port solely to the controller level. The documentation suggests that the OTLP collector is defined at the controller level, affecting all ingresses uniformly.

Reference: Ingress Nginx - OpenTelemetry Addon

Limited Ingress-Level Configuration

Upon inspecting the codebase, it appears that the only adjustable parameters at the ingress level are:

Reference: Ingress Nginx - OpenTelemetry Annotations

Proposed Enhancement

In multi-tenant environments where ingress resources are often shared among tenants, it would be highly beneficial to allow finer control over tracing behavior at the ingress level. My suggestion is to introduce a mechanism where the collector information (specifically host and port) can be configured at the ingress level.

The proposed behavior could be:

Potential Implementation

Implementing this enhancement would enable more granular control over tracing behavior, especially in scenarios where different tenants necessitate distinct tracing configurations within shared ingress resources.

This feature would significantly contribute to the flexibility and scalability of the multi-tenant ingress controller, ensuring more tailored and efficient tracing setups.

Your consideration of this enhancement is highly appreciated!

k8s-ci-robot commented 11 months ago

This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.