istio / istio

Connect, secure, control, and observe services.
https://istio.io
Apache License 2.0
35.82k stars 7.73k forks source link

operation name inconsistent depending on VirtualService configuration #51857

Open Stono opened 3 months ago

Stono commented 3 months ago

Is this the right place to submit this?

Bug Description

I'm not entirely sure this is a bug, as it might just be working as intended (but i can't see the reason) and I'm raising it as confusing from a UX perspective.

I noticed in Jaeger that the operation field on requests to search-one-read did not match the format of all the others, eg usually its app.thing.svc.cluster.local:80/* but for some reason on the search-one-read operations it's name-of-the-virtualservice:80/*.

Screenshot 2024-07-02 at 19 35 20

And in the config_dump:

          "metadata": {
           "filter_metadata": {
            "istio": {
             "config": "/apis/networking.istio.io/v1alpha3/namespaces/search-one-read/virtual-service/search-one-read-app"
            }
           }
          },
          "decorator": {
           "operation": "search-one-read-app:80/*"
          },

It's a bit confusing for users who are used to operation being the url (but I'm unsure if that expectation is incorrect?).

The only difference between the VirtualService for search-one-read and all the other VirtualServices is that search-one-read has multiple Destinations.

spec:
  hosts:
  - app.search-one-read.svc.cluster.local
  - app.search-one-read.preprod.k8.atcloud.io
  - app.search-one-read.bcp.k8.atcloud.io
  http:
  - match:
    - port: 80
    name: default
    retries:
      attempts: 3
      perTryTimeout: 5s
      retryOn: connect-failure,refused-stream,unavailable,cancelled,resource-exhausted
    route:
    - destination:
        host: app.search-one-read.svc.cluster.local
        port:
          number: 80
      weight: 100
    - destination:
        host: app.search-one-read.bcp.k8.atcloud.io
        port:
          number: 443
      headers:
        request:
          add:
            x-forwarded-host: app.search-one-read.svc.cluster.local
            x-forwarded-port: "80"
            x-forwarded-proto: http
          set:
            host: app.search-one-read.bcp.k8.atcloud.io
      weight: 0
    timeout: 5s

Whereas one of the others that gives app.thing.svc.cluster.local:80/* looks like:

spec:
  hosts:
  - app.manufacturer-endorsed-display-service.svc.cluster.local
  - app.manufacturer-endorsed-display-service.preprod.k8.atcloud.io
  http:
  - match:
    - port: 80
    name: default
    retries:
      attempts: 3
      perTryTimeout: 10s
      retryOn: connect-failure,refused-stream,unavailable,cancelled,resource-exhausted
    route:
    - destination:
        host: app.manufacturer-endorsed-display-service.svc.cluster.local
        port:
          number: 80
      weight: 100
    timeout: 10s

Version

1.22.2

Additional Information

No response

istio-policy-bot commented 1 week ago

🧭 This issue or pull request has been automatically marked as stale because it has not had activity from an Istio team member since 2024-07-02. It will be closed on 2024-10-15 unless an Istio team member takes action. Please see this wiki page for more information. Thank you for your contributions.

Created by the issue and PR lifecycle manager.