Skip to content

Commit

Permalink
Merge pull request #146 from tsloughter/add-rebar-dep
Browse files Browse the repository at this point in the history
Add rebar dep
  • Loading branch information
tsloughter committed Nov 16, 2020
2 parents b5e6b65 + 2e9c432 commit b9581a1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,17 @@ Applications can be used.

``` elixir
{:opentelemetry_api, github: "open-telemetry/opentelemetry-erlang", sparse:
"apps/opentelemetry_api"},
{:opentelemetry, github: "open-telemetry/opentelemetry-erlang", sparse: "apps/opentelemetry"},
"apps/opentelemetry_api", override: true},
{:opentelemetry, github: "open-telemetry/opentelemetry-erlang", sparse: "apps/opentelemetry", override: true},
```

The `override: true` is required because the SDK Application, `opentelemetry`, has
the API in its `deps` list of its `rebar.config` as a hex dependency and this will
clash when `mix` tries to resolve the dependencies and fail without the
override. `override: true` is also used on the SDK because the
`opentelemetry_exporter` application depends on it and the API as hex deps so if
it is included the override is necessary.

### Including in Release

In an Erlang project add `opentelemetry` as the first element of the release's applications:
Expand Down
2 changes: 1 addition & 1 deletion apps/opentelemetry/rebar.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{erl_opts, [debug_info]}.
{deps, []}.
{deps, [opentelemetry_api]}.
4 changes: 3 additions & 1 deletion apps/opentelemetry_exporter/rebar.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{erl_opts, [debug_info]}.
{deps, [grpcbox]}.
{deps, [grpcbox,
opentelemetry,
opentelemetry_api]}.

{grpc, [{protos, ["opentelemetry-proto/opentelemetry/proto/collector/trace/v1"]},
{gpb_opts, [{module_name_prefix, "opentelemetry_exporter_"},
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ defmodule OtelElixirTests.MixProject do

def deps do
[{:opentelemetry, path: "apps/opentelemetry", only: :test},
{:opentelemetry_api, path: "apps/opentelemetry_api", only: :test}]
{:opentelemetry_api, path: "apps/opentelemetry_api", only: :test, override: true}]
end
end

0 comments on commit b9581a1

Please sign in to comment.