kubernetes / ingress-nginx

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

Support per-ingress opentelemetry service naming #11458

Open davidegreenwald opened 5 days ago

davidegreenwald commented 5 days ago

Previously, the deprecated open_tracing supported custom per-ingress naming for services in this format:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: foo-service
  annotations:
    nginx.ingress.kubernetes.io/configuration-snippet: |
      opentracing_tag "service.name" "foo-service";

This functionality is now missing with opentelemetry.

Additionally, adding this as a configuration snippet can be problematic because, as we saw removing open_tracing from our ingress controllers, the orphaned setting will then throw errors if it isn't caught and removed everywhere first.

To have opentelemetry support reach feature parity and avoid this footgun behavior, I'm requesting support for the annotation:

nginx.ingress.kubernetes.io/otel-service-name

to be used on a per-ingress basis. If a configuration snippet is the only way, that would be helpful.

Thanks!

k8s-ci-robot commented 5 days 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-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
longwuyuan commented 3 days ago

/assign @esigo