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

panic when observability section does not configure the tracing endpoint correctly #6913

Closed
jmazzitelli opened this issue Dec 4, 2023 · 1 comment · Fixed by #6921
Closed
Assignees
Labels
backlog Triaged Issue added to backlog bug Something isn't working

Comments

@jmazzitelli
Copy link
Collaborator

I don't know exactly where my misconfiguration is, but when server.observability section in the Kiali CR is misconfigured, a panic occurs. We should never panic - it's ok to log a error (or even fatal) message and abort the start up. But in this case I think it might be better to just keep going and log a noisy error message at startup. It's OK to let Kiali keep running even though it can't emit tracing data.

For the record, I installed using these instructions and with the server.observability section in the CR looking like this:

  server:
    observability:
      tracing:
        collector_type: otel
        collector_url: http://localhost:3100
        enabled: true
        otel:
          protocol: grpc
          skip_verify: true
          tls_enabled: false
$ kubectl logs -n istio-system -l app=kiali --tail=-1
{"level":"info","time":"2023-12-04T17:35:36Z","message":"Adding a RegistryRefreshHandler"}
2023-12-04T17:35:36Z INF Kiali: Version: v1.78.0-SNAPSHOT, Commit: c103db1136f030656ec5a64184c5270d34c079aa, Go: 1.20.10
2023-12-04T17:35:36Z INF Using authentication strategy [anonymous]
2023-12-04T17:35:36Z WRN Kiali auth strategy is configured for anonymous access - users will not be authenticated.
2023-12-04T17:35:36Z INF Some validation errors will be ignored [KIA1301]. If these errors do occur, they will still be logged. If you think the validation errors you see are incorrect, please report them to the Kiali team if you have not done so already and provide the details of your scenario. This will keep Kiali validations strong for the whole community.
2023-12-04T17:35:36Z INF Tracing Enabled. Initializing tracer with collector url: http://localhost:3100
panic: context deadline exceeded

goroutine 1 [running]:
github.com/kiali/kiali/observability.InitTracer({0xc00005b0f8?, 0x3b?})
	/home/jmazzite/source/kiali/kiali/observability/tracing.go:62 +0x825
github.com/kiali/kiali/server.NewServer()
	/home/jmazzite/source/kiali/kiali/server/server.go:37 +0xc5
main.main()
	/home/jmazzite/source/kiali/kiali/kiali.go:111 +0x3aa
@jmazzitelli jmazzitelli added the bug Something isn't working label Dec 4, 2023
@jshaughn jshaughn added the backlog Triaged Issue added to backlog label Dec 4, 2023
@nrfox
Copy link
Contributor

nrfox commented Dec 5, 2023

This tracing setup is mainly for debugging Kiali itself so I agree that Kiali should still start/run even if it has some issue with emitting traces about itself. In other words, instead of panicing there should be some log.Error(...) as @jmazzitelli suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Triaged Issue added to backlog bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

3 participants