Skip to content

Commit

Permalink
Limit app traces sent to Honeycomb.io (#482)
Browse files Browse the repository at this point in the history
* Limit app traces sent to Honeycomb.io to 10%

Otherwise we will exceed out monthly 100M limit.

FWIW: https://github.com/open-telemetry/opentelemetry-erlang/blob/4812195bfa52031dfceeddf6290d0a4cfbc5470c/apps/opentelemetry/src/otel_configuration.erl#L219-L237

Signed-off-by: Gerhard Lazu <[email protected]>

* Enable gzip compression when sending event traces

Typically results in ~80% less bandwidth used.

Signed-off-by: Gerhard Lazu <[email protected]>

---------

Signed-off-by: Gerhard Lazu <[email protected]>
  • Loading branch information
gerhard authored Sep 20, 2023
1 parent b58c96e commit ddd00d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 2022.fly/fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ PORT = "4000"
STATIC_URL_HOST = "cdn.changelog.com"
URL_HOST = "changelog.com"
DB_NAME = "changelog"
# Sample traces to 10%, otherwise we will exceed out monthly 100M limit
OTEL_TRACES_SAMPLER="parentbased_traceidratio"
OTEL_TRACES_SAMPLER_ARG="0.1"

[[services]]
internal_port = 4000
Expand Down
1 change: 1 addition & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ if System.get_env("HONEYCOMB_API_KEY") do
config :opentelemetry, traces_exporter: :otlp
config :opentelemetry_exporter,
otlp_protocol: :http_protobuf,
otlp_compression: :gzip,
otlp_endpoint: "https://api.honeycomb.io:443",
otlp_headers: [
{"x-honeycomb-team", SecretOrEnv.get("HONEYCOMB_API_KEY")},
Expand Down

0 comments on commit ddd00d0

Please sign in to comment.