Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Tristan Sloughter
    @tsloughter
    cool :)
    Gustavo Aguiar
    @gugahoa
    the problem was the protocol key, for some reason it's throwing a badmatch error
    Petr Stepchenko
    @Nitrino

    Hi guys. I'm trying to set up elastic apm with opentelemetry, but I see messages with NULL in the otel-collector logs, it seems that there is something missing in my settings?
    https://gist.github.com/Nitrino/77cd49acc3517290eb8d880caef7ef42

    I use:

          {:opentelemetry_api, "~> 0.3"},
          {:opentelemetry_exporter, "~> 0.4"},
          {:opentelemetry_ecto, "~> 0.1.0"},
          {:opentelemetry_plug, github: "opentelemetry-beam/opentelemetry_plug"},
          {:opentelemetry_phoenix, github: "opentelemetry-beam/opentelemetry_phoenix"},

    And set up a configuration:

    config :opentelemetry, :resource,
      service: [
        name: "qb_calls",
        namespace: "qb_calls"
      ]
    
    config :opentelemetry,
           :processors,
           ot_batch_processor: %{
             exporter: {:opentelemetry_exporter, %{protocol: :http_protobuf, endpoints: [{:http, 'localhost', 55681, []}]}}
           }
    Petr Stepchenko
    @Nitrino

    I tried to enable ot_exporter_stdout for debugging (:ot_batch_processor.set_exporter(:ot_exporter_stdout, [])) and seemingly correct output in the console.
    https://gist.github.com/Nitrino/3d7375d7c75f1be1352280f63fcd64aa

    I can't figure out what's wrong with my settings

    Petr Stepchenko
    @Nitrino
    Oh, it's has already been fixed in the opentelemetry_exporter master.
    Sorry to bother
    Tristan Sloughter
    @tsloughter
    @Nitrino no worries, good to hear it is working for you :)
    Tristan Sloughter
    @tsloughter
    lots to discuss in the Otel Erlang meeting this afternoon https://docs.google.com/document/d/1EbBiRjBc_cBf0T_B5OtNRPhbD4jdBrVYJAy8euCDrUI/edit#
    Tristan Sloughter
    @tsloughter
    new PR is open. this is the important change to take note of (when reviewing, it isn't touched by a user) https://github.com/open-telemetry/opentelemetry-erlang/pull/126/files#diff-8411ab5f399a2f02fad4d7808c21f1f3e1450fbbdf7b007b499e7f9de2b79024R56
    6:43
    the main erlang macro api and elixir api (now with macros only for start_span and with_span since the tracer isn't needed in many calls anymore) remain the same
    ioolkos
    @ioolkos
    Hello all, wouldn't something like this always get sampled? I don't see this exported at all (using otel_exporter_stdout)
    span_with_sleep_ms(Delay) ->
    Sampler = otel_sampler:setup(always_on, #{}),
    Tracer = opentelemetry:get_tracer(otel_example),
    otel_tracer:with_span(Tracer, <<"span_with_sleep_ms/1">>, #{sampler => Sampler}, 
      fun(SpanCtx) ->
        otel_span:set_attribute(SpanCtx, <<"Delay">>, Delay),
        timer:sleep(Delay)
        end).
    Tristan Sloughter
    @tsloughter
    yes. are you using the latest git repo or hex packages?
    ioolkos
    @ioolkos
    am using Github master branch
    and I'm seeing SPANS FOR DEBUG output in the Erlang console, but not the spans.
    so I wanted to explicitly set an always_on sampler. I'll have to explore this a little further then
    Tristan Sloughter
    @tsloughter
    ok
    ioolkos
    @ioolkos
    but it's good to know this should work
    Tristan Sloughter
    @tsloughter
    I guess make sure the Tracer isn't noop
    you can just print out the Tracer and it'll be the first element in the tuple is the module
    if it ends with noop then that explains this
    ioolkos
    @ioolkos
    I register an application tracer, so I think it will just be otel_default_tracer
    jep, it's the default tracer. Would the default tracer not sample a call as above?
    Tristan Sloughter
    @tsloughter
    ok. no, it should
    ioolkos
    @ioolkos
    ok, thanks
    Tristan Sloughter
    @tsloughter
    no, they can return any subset
    ioolkos
    @ioolkos
    I put above example in a minimal app: https://github.com/ioolkos/otel_example/. I still must be missing some basic step in the setup, as I don't see that span exported.
    Tristan Sloughter
    @tsloughter
    oh, I bet the sampler arg isn't working
    becuase the way it is setup in your _app is slightly wrong
    yea
    @ioolkos you need to load and set the env variable before starting opentelemetry https://gist.github.com/tsloughter/7ff0ce8bfb0a884560de82e6b2a331a6
    ioolkos
    @ioolkos
    @tsloughter ah man, of course.
    thanks!
    Tristan Sloughter
    @tsloughter
    ok, hm, the sampler arg does work
    but still requires moving set_env of course
    ioolkos
    @ioolkos
    yeah, I can still set the sampler dynamically
    Tristan Sloughter
    @tsloughter
    oh, yea, so the processors weren't setup
    ioolkos
    @ioolkos
    jep
    Tristan Sloughter
    @tsloughter
    that was the issue before
    ok
    ioolkos
    @ioolkos
    exactly
    Tristan Sloughter
    @tsloughter
    better to just put this stuff in a sys.config and add the apps to applications in the .app.src :)
    ioolkos
    @ioolkos
    sure, just wanted to be as dynamic and explicit as possible
    great stuff :)
    Tristan Sloughter
    @tsloughter
    cool
    ioolkos
    @ioolkos
    thanks for your help
    ioolkos
    @ioolkos
    I noticed ?set_status(?OTEL_STATUS_OK) doesn't set status.code to 1 in opentelemetry-collector pipeline to jaeger. Always stays 'unset' and 0 in jaeger. But I guess that's an issue of the collector, not otel-erlang. (and there's also a set of deprecated status codes, it seems)
    Peter Saxton
    @CrowdHailer
    Howdy. Was just wondering if I could ask for a few more pointers. Relating to your comment in this issue. https://github.com/open-telemetry/opentelemetry-erlang/issues/160#issuecomment-734831168 stdout exporter is in the example config.exs. I'm looking at the example and can't see where the stdout exporter is set up. Looked at both the phoenix application https://github.com/opentelemetry-beam/opentelemetry-examples/blob/master/phoenix_backend/config/config.exs and the plug application that doesn't have a config file
    Tristan Sloughter
    @tsloughter
    "tdout exporter is in the example config.exs."
    ?
    Peter Saxton
    @CrowdHailer
    I've figured that part out. Was just asking for clarification on the linked comment on github.
    I now have a mostly functioning setup here https://github.com/did-app/glance/pull/2/files