Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after updating to OpenTelemetry_exporter to 1.8.0 #788

Open
kevinkirkup opened this issue Oct 11, 2024 · 3 comments
Open

Error after updating to OpenTelemetry_exporter to 1.8.0 #788

kevinkirkup opened this issue Oct 11, 2024 · 3 comments

Comments

@kevinkirkup
Copy link

kevinkirkup commented Oct 11, 2024

Here is my configuration:

      otel_collector_hostname = System.get_env("OTEL_COLLECTOR_HOSTNAME") || "localhost"

      otel_collector_protocol =
        if System.get_env("OTEL_COLLECTOR_PROTOCOL") == "grpc" do
          :grpc
        else
          :http_protobuf
        end

      otel_collector_port =
        System.get_env("OTEL_COLLECTOR_PORT") |> Utilities.envvar_to_integer_or_default(4318)

      otel_collector_http =
        if System.get_env("OTEL_COLLECTOR_SSL") |> Utilities.enabled?() do
          :https
        else
          :http
        end

      config :opentelemetry,
        span_processor: :batch,
        traces_exporter: :otlp

      config :opentelemetry_exporter,
        otlp_protocol: otel_collector_protocol,
        otlp_traces_protocol: otel_collector_protocol,
        otlp_traces_compression: :gzip,
        otlp_traces_endpoint: {
          otel_collector_http,
          otel_collector_hostname,
          otel_collector_port,
          [verify: :verify_none]
        }

Here is the error being reported:

{"function":"init/1","line":61,"message":"OTLP exporter failed to initialize: exception error: bad key: exporter_otlp_traces_protocol
 in function otel_configuration:update_config_map/5 (/app/deps/opentelemetry/src/otel_configuration.erl, line 280)
 in call from lists:foldl_1/3 (lists.erl, line 2151)
 in call from otel_exporter_otlp:merge_with_environment/8 (/app/deps/opentelemetry_exporter/src/otel_exporter_otlp.erl, line 363)
 in call from otel_exporter_traces_otlp:init/1 (/app/deps/opentelemetry_exporter/src/otel_exporter_traces_otlp.erl, line 122)
 in call from otel_exporter:init/1 (/app/deps/opentelemetry/src/otel_exporter.erl, line 48)
 in call from otel_batch_processor:init_exporter/2 (/app/deps/opentelemetry/src/otel_batch_processor.erl, line 327)
 in call from otel_batch_processor:idle/3 (/app/deps/opentelemetry/src/otel_batch_processor.erl, line 212)
 in call from gen_statem:loop_state_callback/11 (gen_statem.erl, line 3735)
 in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 329)","module":"otel_exporter","name":"mercury","pid":8,"time":"2024-10-11T12:56:01.126Z","file":"/app/deps/opentelemetry/src/otel_exporter.erl","level":"DEBUG","v":0}

It should be defined here:

{"OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", exporter_otlp_traces_protocol, otlp_protocol},

This was working with opentelemetry_exporter ~> 1.7.
Not sure what would be causing this.

@tsloughter
Copy link
Member

Sorry for the delay, wanted to let you know we are looking into this.

@tsloughter
Copy link
Member

From first glance looks like exporter_otlp_traces_protocol is a clear "typo". Trying to verify and track where it came from and any effect changing it will have. Test will be added as well of course.

@tsloughter
Copy link
Member

Ugh, I think I did a find-replace when moving things around modules and it did so on that atom too :(.

tsloughter added a commit to tsloughter/opentelemetry-erlang that referenced this issue Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants