# opentelemetry_exporter

![Common Test]( [![Gitter](](

The OpenTelemetry Protocol exporter for use with the [OpenTelemetry Collector](

Currently only supports the Tracer protocol. Metrics are to come soon.

## Using

Easiest way to setup is to add configuration for the batch processor in OpenTelemetry application environment.

For an Erlang release in `sys.config`:

``` erlang
        #{exporter => {opentelemetry_exporter, #{endpoints => [{http, "localhost", 9090, []}]}}}}]}]}

An Elixir release uses `releases.exs`:

``` elixir
config :opentelemetry,
    :processors, ot_batch_processor: %{exporter: {:opentelemetry_exporter, %{endpoints: [{http, "localhost", 9090, []}}}}

## Contributing

This project uses a submodule during developement, it is not needed if the application is being used as a dependency, so be sure to clone with the option `recurse-submodules`:

``` shell
$ git clone --recurse-submodules

### Upgrading OpenTelemetry Protos

The protos are in a separate repository, [opentelemetry-proto](, and used as a submodule in this repo. To update the Erlang protobuf modules and GRPC client first update the submodule and then use the [rebar3 grpcbox plugin]( to generate the client:

``` shell
$ git submodule update --remote opentelemetry-proto
$ rebar3 grpc gen -t client
===> Writing src/trace_service_pb.erl
===> Writing src/opentelemetry_proto_collector_trace_v_1_trace_service_client.erl (forcibly overwriting)
$ mv src/opentelemetry_proto_collector_trace_v_1_trace_service_client.erl src/opentelemetry_trace_service.erl

Then open `src/opentelemetry_trace_service.erl` and fix the module name.