Skip to content

Opentelemetry always uses https #1539

@prasads-h

Description

@prasads-h

Prerequisites

  • I've searched the current open issues
  • I've updated to the latest version of Toolbox

Toolbox version

0.15.0

Environment

This is my command to start the container

CMD ["toolbox", "--tools-file", "/app/tools.yaml", "--address", "0.0.0.0", "--port", "8080", "--ui", "--telemetry-otlp", "http://otel-collector:4318"]

I get this error.

ERROR "error setting up OpenTelemetry: unable to set up meter provider: parse "https://http:%2F%2Fotel-collector:4318/v1/metrics\": invalid URL escape

Looks like it is expecting only the host and port unlike what is mentioned in the documentation.

Also, Is there a way to pass to use only http instead of https?

WithEndpoint() seems to use https by default. There is no way to use ENV Variables as per the otlptracehttp documentation as the telemetry-otlp must be not empty when starting the toolbox, which will take precedence

Client

  1. Client:
  2. Version:
  3. Example: If possible, please include your code of configuration:
# Code goes here! 

Expected Behavior

docuementation should be updated that "--telemetry-otlp" should have only hostname and port like "otel-collector:4318"

Also provide option to pass insecure to use "http"

Current Behavior

documentation incorrectly states the example "--telemetry-otlp" to have full URL "http://otel-collector:4318"

No option to pass insecure to use "http" or have the opentelemetry to use the Environment variables.

Steps to reproduce?

  1. Run the container with
    CMD ["toolbox", "--tools-file", "/app/tools.yaml", "--address", "0.0.0.0", "--port", "8080", "--ui", "--telemetry-otlp", "http://otel-collector:4318"]

  2. Gets this error while setting up Open telemetry
    ERROR "error setting up OpenTelemetry: unable to set up meter provider: parse "https://http:%2F%2Fotel-collector:4318/v1/metrics\": invalid URL escape

Additional Details

No response

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions