Skip to content
This repository has been archived by the owner on Oct 26, 2020. It is now read-only.

Update readme #59

Merged
merged 1 commit into from
Jun 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ Registration is done through a single process and uses a [persistent_term](https

Naming the `Tracers` provides additional metadata on spans and allows the user of your Application to disable the traces from the dependency if it is needed.

### Dependency in Elixir

``` elixir
def deps do
[
{:opentelemetry_api, "~> 0.3.0"}
]
end
```

### Registering and Using Tracers Directly

If it is a runnable application then this registration should happen in `start/2`, example below is adding `Tracer` registration to the Postgres library [pgo](https://github.com/erleans/pgo):
Expand All @@ -33,7 +43,7 @@ defmodule MyApp do
use Application

def start(_type, _args) do
_ = OpenTelemetry.register_application_tracer(MyApp),
_ = OpenTelemetry.register_application_tracer(:my_app),
...
end
end
Expand Down Expand Up @@ -92,7 +102,7 @@ require OpenTelemetry.Tracer
require OpenTelemetry.Span

def some_fun() do
OpenTelemetry.Tracer.with_span \"some-span\" do
OpenTelemetry.Tracer.with_span "some-span" do
...
OpenTelemetry.Span.set_attribute("key", "value")
...
Expand Down