Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Tristan Sloughter
    @tsloughter
    hm, don't know. but you can use the zipkin exporter to write to jaeger
    if you don't want to have to to the collector to get to jaeger
    Peter Saxton
    @CrowdHailer
    The zipkin exporter doesn't work with {opentelemetry, 0.5.0}
    What would you use to look at traces generated locally?
    Or perhaps more relevant what services or local things can will accept what https://github.com/open-telemetry/opentelemetry-erlang/tree/master/apps/opentelemetry_exporter is sending
    Tristan Sloughter
    @tsloughter
    not sure what else exists, opentelemetry collector might have a visualization option in its contrib repo
    Tristan Sloughter
    @tsloughter
    and the update to the zipkin exporter to 0.5.0 shouldn't be much to change
    Chulki Lee
    @chulkilee
    Hi - I'm working on improving docs - open-telemetry/opentelemetry-erlang#176 - and I have a few questions. 1) I see this gitter room is mentioned in one of README. Is this the place to join? Then I'll add it to all README
    Chulki Lee
    @chulkilee
    Also.. do we have benchmark? seems like c25ac353602cf1ce8d655e2f5c7e850e147151ce removed code from samples.
    Tristan Sloughter
    @tsloughter
    if I remember correctly the benchmarks were removed because the particular ones didn't make sense anymore and none have been added since
    this gitter is like the official opentelemetry channel for the Erlang SIG. but discussion also happens through the Erlang Ecosystem Foundation observability working group channel in the Erlang slack
    Chulki Lee
    @chulkilee

    When instrumenting a project your application should only depend on the OpenTelemetry API application, found in directory apps/opentelemetry_api of this repo which is published as the hex package opentelemetry_api.

    This is confusing - since to instrumnet my project, isn’t it supposed to use SDK, not API? e.g. SDK actually holds the implementation, and sdk depends on api, not vice versa

    Tristan Sloughter
    @tsloughter
    instrumentation is done with just the API -- meaning just adding calls to create spans and instruments and record metrics
    you then include an SDK that makes the instrumentation actually do something
    phrasing can be better for sure, that or start with definitions of stuff like "instrumenting", so it is clear that just refers to adding those calls like with_span to the code
    Tristan Sloughter
    @tsloughter
    I gotta go but if you leave more questions tomorrow my morning. thanks for the work on docs!
    Chulki Lee
    @chulkilee
    Instrumentation is hooked with just the API - but it’s no-op so end users MUST include an implementation - and opentelemetry provides it. So saying “you should only depned on opentelemetry-api” is definitely incorrect. I’ll make some changes in the PR - open-telemetry/opentelemetry-erlang#176
    Chulki Lee
    @chulkilee

    Aha probably the confusion is whether “application” is of the end-user project (e.g. project to run a web service), or my library package (e.g. HTTP library “application”). Is there any good terminology in Erlang?

    https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/library-guidelines.md uses “final application” vs “third party libraries/frameworks” btw.

    Chulki Lee
    @chulkilee
    Oh… and another source of confusion - we use apps/opentelemetry_api is for API, apps/opentelemetry for SDK.. but opentelemetry module is defined at opentelemetry_api. Hm..
    3 replies
    Tristan Sloughter
    @tsloughter
    yea, we shouldn't use "application" the same way opentelemetry spec does because it has special meaning in OTP.
    Chulki Lee
    @chulkilee

    For traces to actually be tracked, propagated and exported, the opentelemetry Application must be included as a dependency of your project, likely as part of a Release and not as a dependency of an individual Application within the Release.

    What’s the reason? I guess it is to start and supervise opentelemetry application (SDK) at the top level, not a child of a specific application. Is it correct?

    Tristan Sloughter
    @tsloughter
    no, either way it is started at the top level. it is simply to try driving home the fact that you should be depending on only the API unless you are writing something like an exporter
    Tristan Sloughter
    @tsloughter
    meeting tomorrow morning will discuss: open-telemetry/opentelemetry-erlang#188 so the more attendance the better :)
    Tristan Sloughter
    @tsloughter
    yo, I'm on vaca and won't be around for a meeting today.
    Bogdan Drutu
    @bogdandrutu
    @tsloughter can I delete this repo https://github.com/open-telemetry/opentelemetry-erlang-api ?
    Tristan Sloughter
    @tsloughter
    eh... I'd say yes except there is the possibility someone somewhere still points to it in the dependencies and then their build will break
    Bogdan Drutu
    @bogdandrutu
    :))
    so the final answer is?
    Tristan Sloughter
    @tsloughter
    preferably wait. when 1.0 is cut I'd say its fine to delete
    Bogdan Drutu
    @bogdandrutu
    ok
    If I change the default branch to main do I cause the same issue ?
    Tristan Sloughter
    @tsloughter
    nope, thats fine
    dmy-gh
    @dmy-gh

    Hey there :)
    Playing around with Elixir I can't figure out how to set the parent span for a new span declared in an anonymous function in a Task.async.
    I tried something like this:

        OpenTelemetry.Tracer.with_span "span_1" do
          span_ctx = OpenTelemetry.Tracer.current_span_ctx()
    
          task =
            Task.async(fn ->
              OpenTelemetry.Tracer.with_span "span_2", %{parent: span_ctx} do
                nil
              end
            end)
    
          ... 
        end

    But the parent option does not seem to do anything.
    Can you please help me on what I am probably doing wrong here?

    dmy-gh
    @dmy-gh
    Digging into the code I couldn't find the parent key involved in the span creation.
    Tristan Sloughter
    @tsloughter
    actually working on an example for this for the docs page right now :)
    parent as an optoin is gone
    what is suggested for a spawned process is to create a new span before spawning and setting it to active in the spawned function
    in erlang this would look like
    SpanCtx = ?start_span(<<"child">>),
    Ctx = otel_ctx:get_current(),
    
    proc_lib:start_link(fun() ->
                            otel_ctx:attach(Ctx),
                            ?set_current_span(SpanCtx)
                            %% do work here
                        end),
    spawn not start...
    I don't do much Elixir so haven't got the Task version done yet
    linking is also an option when spawning a new process, since it doesn't necessarily have a parent/child relationship:
    SpanCtx = ?current_span_ctx,
    proc_lib:spawn_link(fun() ->
                            Link = opentelemetry:link(SpanCtx),
                            ?with_span(<<"other-process">>, #{links => [Link]},
                                       fun() -> ok end)
                        end),
    Tristan Sloughter
    @tsloughter
    ok, made a test that shows how to do this. should really have a way to automatically end a Task's span.. for now I'm just ending it manually
    there are a couple ways of doing the context part which may make it confusing
    dmy-gh
    @dmy-gh

    parent as an optoin is gone

    Ok, I switched from the hex package to the master of the git repository for the libs.

    Thank you for the examples!
    I can't make the link one work on my side as I can't get anything else than :undefined when doing parent_link = OpenTelemetry.link(parent).
    dmy-gh
    @dmy-gh
    parent = Tracer.start_span("parent") returns:
    {:span_ctx, 125339188436856308036143319152412608740, 14087508596670444880, 1,
     :undefined, true, :undefined, true,
     {:otel_span_ets, #Function<1.123713657/1 in :otel_tracer_server.on_end/1>}}