Skip to content

Commit e16ffd3

Browse files
author
Tristan Sloughter
committed
update exporter readme and default ports
1 parent 956ffea commit e16ffd3

File tree

5 files changed

+24
-11
lines changed

5 files changed

+24
-11
lines changed

apps/opentelemetry_exporter/README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,27 @@ config :opentelemetry, :processors,
5151
- `otlp_endpoint`: The URL to send traces and metrics to, for traces the path `v1/traces` is appended to the path in the URL.
5252
- `otlp_traces_endpoint`: URL to send only traces to. This takes precedence for exporting traces and the path of the URL is kept as is, no suffix is appended.
5353
- `otlp_headers`: List of additional headers (`[{unicode:chardata(), unicode:chardata()}]`) to add to export requests.
54-
- `otlp_traces_headers`: Additional headers (`[{unicode:chardata(), unicode:chardata()}]`) to add to only trace export requests.
55-
54+
- `otlp_traces_headers`: Additional headers (`[{unicode:chardata(),
55+
unicode:chardata()}]`) to add to only trace export requests.
56+
- `otlp_protocol`: The transport protocol, supported values: `grpc` and `http_protobuf`. Defaults to `http_protobuf`.
57+
- `otlp_traces_protocol`: The transport protocol to use for exporting traces, supported values: `grpc` and `http_protobuf`. Defaults to `http_protobuf`.
58+
- `otlp_compression`: Compression type to use, supported values: `gzip`. Defaults to no compression.
59+
- `otlp_traces_compression`: Compression type to use for exporting traces, supported values: `gzip`. Defaults to no compression.
5660

5761
``` erlang
5862
{opentelemetry_exporter,
59-
[{otlp_endpoint, "https://api.honeycomb.io:443"},
63+
[{otlp_protocol, grpc},
64+
{otlp_compression, gzip},
65+
{otlp_endpoint, "https://api.honeycomb.io:443"},
6066
{otlp_headers, [{"x-honeycomb-dataset", "experiments"}]}]}
6167
```
6268

6369
An Elixir release uses `releases.exs`:
6470

6571
``` elixir
6672
config :opentelemetry_exporter,
73+
otlp_protocol: :grpc,
74+
otlp_compression: :gzip,
6775
otlp_endpoint: "https://api.honeycomb.io:443",
6876
otlp_headers: [{"x-honeycomb-dataset", "experiments"}]
6977
```
@@ -87,11 +95,16 @@ for more information on securing HTTP requests in Erlang.
8795
- `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`: URL to send only traces to. This takes precedence for exporting traces and the path of the URL is kept as is, no suffix is appended.
8896
- `OTEL_EXPORTER_OTLP_HEADERS`: List of additional headers to add to export requests.
8997
- `OTEL_EXPORTER_OTLP_TRACES_HEADERS`: Additional headers to add to only trace export requests.
98+
- `OTEL_EXPORTER_OTLP_PROTOCOL`: The transport protocol to use, supported values: `grpc` and `http_protobuf`. Defaults to `http_protobuf`
99+
- `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL`: The transport protocol to use for exporting traces, supported values: `grpc` and `http_protobuf`. Defaults to `http_protobuf`.
100+
- `OTEL_EXPORTER_OTLP_COMPRESSION`: Compression to use, supported value: gzip. Defaults to no compression.
101+
- `OTEL_EXPORTER_OTLP_TRACES_COMPRESSION`: Compression to use when exporting traces, supported value: gzip. Defaults to no compression.
90102

91103
Example usage of setting the environment variables:
92104
```
93105
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://api.honeycomb.io:443
94-
OTEL_EXPORTER_OTLP_PROTOCOL=grpc
106+
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc
107+
OTEL_EXPORTER_OTLP_TRACES_COMPRESSION=gzip
95108
OTEL_EXPORTER_OTLP_TRACES_HEADERS=x-honeycomb-team=<HONEYCOMB API TOKEN>,x-honeycomb-dataset=experiments
96109
```
97110

apps/opentelemetry_exporter/src/opentelemetry_exporter.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@
9393

9494
-define(DEFAULT_ENDPOINTS, [#{host => "localhost",
9595
path => [],
96-
port => 4317,
97-
scheme => "https"}]).
98-
-define(DEFAULT_PORT, 4317).
96+
port => 4318,
97+
scheme => "http"}]).
98+
-define(DEFAULT_PORT, 4318).
9999
-define(DEFAULT_TRACES_PATH, "v1/traces").
100100

101101
-type headers() :: [{unicode:chardata(), unicode:chardata()}].

apps/opentelemetry_exporter/test/opentelemetry_exporter_SUITE.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ configuration(_Config) ->
7777
?assertMatch([#{scheme := "https", host := "localhost", port := 443, path := "/used/path"}],
7878
opentelemetry_exporter:endpoints(<<"https://localhost:443/used/path">>, [])),
7979

80-
?assertMatch([#{scheme := "http", host := "localhost", port := 4317, path := []}],
80+
?assertMatch([#{scheme := "http", host := "localhost", port := 4318, path := []}],
8181
opentelemetry_exporter:endpoints("http://localhost", [])),
8282

8383
?assertMatch([], opentelemetry_exporter:endpoints("://badendpoint", [])),
@@ -243,7 +243,7 @@ verify_export(Config) ->
243243
grpc ->
244244
4317;
245245
http_protobuf ->
246-
55681
246+
4318
247247
end,
248248
{ok, State} = opentelemetry_exporter:init(#{protocol => Protocol,
249249
compression => Compression,

config/otel-collector-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ receivers:
55
grpc:
66
endpoint: "0.0.0.0:4317"
77
http:
8-
endpoint: "0.0.0.0:55681"
8+
endpoint: "0.0.0.0:4318"
99
processors:
1010
batch:
1111
send_batch_size: 1024

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ services:
55
command: ["--config=/conf/otel-collector-config.yaml"]
66
privileged: true
77
ports:
8-
- 55681:55681
98
- 4317:4317
9+
- 4318:4318
1010
volumes:
1111
- ./config/otel-collector-config.yaml:/conf/otel-collector-config.yaml
1212
links:

0 commit comments

Comments
 (0)