open-telemetry / opentelemetry-erlang-api

Erlang/Elixir OpenTelemetry API
Apache License 2.0
60 stars 13 forks source link

Can't use from Elixir #39

Closed stephanos closed 4 years ago

stephanos commented 4 years ago

I merely added

{:opentelemetry, git: "git@github.com:open-telemetry/opentelemetry-erlang.git", tag: "master"},

to my Elixir project and when I run mix deps.compile, I see:

===> Compiling opentelemetry_api
===> vcs_vsn: Unknown vsn format: {file,"VERSION"}

Am I doing anything wrong?

PS: I'm using elixir 1.9.1 and erlang 22.0.5

tsloughter commented 4 years ago

Ah, I see the issue. Mix still uses a very old rebar3. Maybe we'll add a mix.exs to that repo as well to deal with it but for now you can fix this by manually updating the rebar3 mix uses:

A couple ways to do this are discussed at the end of this thread https://github.com/beam-telemetry/telemetry/issues/58

You can get the latest rebar3 here https://rebar3.s3.amazonaws.com/rebar3

tsloughter commented 4 years ago

Hopefully we'll be publishing 0.3.0 to hex soon, maybe even today and this issue will not exist when using the hex package.

stephanos commented 4 years ago

Thanks for the swift response! I'll see if that workaround works for me. Yes, a hex package would be much appreciated :)

stephanos commented 4 years ago

follow up: upgrading rebar did the trick!