davydog187/website

Possible missing SSL configuration in Elixir Observability article

flupke opened this issue · 6 comments

Hello, I've been reading your excellent article and decided to give LightStep a try.

I added the configuration from the article, but I get these errors, both in production and when running tests:

19:13:38.134 [debug] OTLP exporter failed to initialize: exception throw: {application_either_not_started_or_not_ready,
                     tls_certificate_check}
  in function  tls_certificate_check_shared_state:latest_shared_state_key/0 (/home/flupke/src/jitter/jitter.video/elixir_backend/deps/tls_certificate_check/src/tls_certificate_check_shared_state.erl, line 338)
  in call from tls_certificate_check_shared_state:get_latest_shared_state/0 (/home/flupke/src/jitter/jitter.video/elixir_backend/deps/tls_certificate_check/src/tls_certificate_check_shared_state.erl, line 320)
  in call from tls_certificate_check_shared_state:authoritative_certificate_values/0 (/home/flupke/src/jitter/jitter.video/elixir_backend/deps/tls_certificate_check/src/tls_certificate_check_shared_state.erl, line 126)
  in call from tls_certificate_check:options/1 (/home/flupke/src/jitter/jitter.video/elixir_backend/deps/tls_certificate_check/src/tls_certificate_check.erl, line 78)
  in call from opentelemetry_exporter:parse_endpoint/2 (/home/flupke/src/jitter/jitter.video/elixir_backend/deps/opentelemetry_exporter/src/opentelemetry_exporter.erl, line 326)
  in call from opentelemetry_exporter:endpoint/2 (/home/flupke/src/jitter/jitter.video/elixir_backend/deps/opentelemetry_exporter/src/opentelemetry_exporter.erl, line 298)
  in call from lists:filtermap_1/2 (lists.erl, line 1417)
  in call from opentelemetry_exporter:init/1 (/home/flupke/src/jitter/jitter.video/elixir_backend/deps/opentelemetry_exporter/src/opentelemetry_exporter.erl, line 194)

Traces are printing fine with DEBUG_OTEL though.

I tried to add tls_certificate_check to extra_applications but no luck.

Do you by any chance know how to solve this?

Cheers

I'm glad you enjoyed it! Can you please share the versions of otel, as well as your elixir and OTP versions?

Solution is in open-telemetry/opentelemetry-erlang#419

Let me know if you still have issues after following the suggestions in the thread!

Yep that's it thanks, the solution was to add opentelemetry_exporter before opentelemetry in the release applications:

[
  releases: [
    jitter_backend: [
      applications: [
        jitter_backend: :permanent,
        opentelemetry_exporter: :temporary,
        opentelemetry: :temporary
      ]
    ]
  ]
]

Awesome, would you be interested in submitting a PR to update the blog post?

Sure here you go #18

Thanks!