Skip to content

Commit

Permalink
Merge pull request #660 from tsloughter/collector-0.89
Browse files Browse the repository at this point in the history
Collector 0.89
  • Loading branch information
bryannaegele authored Nov 20, 2023
2 parents b5764e6 + 45e4221 commit 311948a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
30 changes: 17 additions & 13 deletions apps/opentelemetry_exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,24 +156,28 @@ The second element of the configuration tuple is a configuration map. It can con
- `compression` - an atom. Setting it to `gzip` enables gzip compression.
- `ssl_options` - a list of SSL options. See Erlang's [SSL docs](https://www.erlang.org/doc/man/ssl.html#TLS/DTLS%20OPTION%20DESCRIPTIONS%20-%20CLIENT) for what options are available.

## Contributing
### Upgrading OpenTelemetry Protos

This project uses a submodule during development, it is not needed if the application is being used as a dependency, so be sure to clone with the option `recurse-submodules`:
The protos are in a separate repository,
[opentelemetry-proto](https://github.com/open-telemetry/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](https://github.com/tsloughter/grpcbox_plugin/) to generate the client:

```shell
$ git clone --recurse-submodules https://github.com/opentelemetry-beam/opentelemetry_exporter
```
$ pushd apps/opentelemetry_exporter/opentelemetry-proto
$ git fetch origin
$ git checkout <tag>
$ popd

### Upgrading OpenTelemetry Protos
# bug in grpcbox plugin means we need to delete _pb files first to regenerate them
$ rm./apps/opentelemetry_exporter/src/opentelemetry_exporter_trace_service_pb.erl ./apps/opentelemetry_exporter/src/opentelemetry_exporter_metrics_service_pb.erl ./apps/opentelemetry_exporter/src/opentelemetry_exporter_logs_service_pb.erl

The protos are in a separate repository, [opentelemetry-proto](https://github.com/open-telemetry/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](https://github.com/tsloughter/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
...
$ mv apps/opentelemetry_exporter/src/opentelemetry_proto_collector_trace_v_1_trace_service_client.erl apps/opentelemetry_exporter/src/opentelemetry_trace_service.erl
$ mv apps/opentelemetry_exporter/src/opentelemetry_proto_collector_logs_v_1_logs_service_client.erl apps/opentelemetry_exporter/src/opentelemetry_logs_service.erl
$ mv apps/opentelemetry_exporter/src/opentelemetry_proto_collector_metrics_v_1_metrics_service_client.erl apps/opentelemetry_exporter/src/opentelemetry_metrics_service.erl
```

Then open `src/opentelemetry_trace_service.erl` and fix the module name.
Then open each moved module and fix the module name.
2 changes: 1 addition & 1 deletion apps/opentelemetry_exporter/opentelemetry-proto
6 changes: 3 additions & 3 deletions config/otel-collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ exporters:
zipkin:
endpoint: "http://zipkin:9411/api/v2/spans"

jaeger:
endpoint: jaeger-all-in-one:14250
otlp/jaeger:
endpoint: jaeger-all-in-one:4317
tls:
insecure: true

Expand All @@ -31,7 +31,7 @@ service:
traces:
receivers: [otlp]
processors: [batch]
exporters: [logging, zipkin, jaeger]
exporters: [logging, zipkin, otlp/jaeger]
metrics:
receivers: [otlp]
processors: [batch]
Expand Down
5 changes: 1 addition & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3"
services:
otel:
image: otel/opentelemetry-collector-contrib:0.79.0
image: otel/opentelemetry-collector-contrib:0.89.0
command: ["--config=/conf/otel-collector-config.yaml"]
privileged: true
ports:
Expand All @@ -20,8 +20,5 @@ services:

jaeger-all-in-one:
image: jaegertracing/all-in-one:latest
restart: always
ports:
- "16686:16686"
- "14268"
- "14250"

0 comments on commit 311948a

Please sign in to comment.