Skip to content

[Feature Request] Correct docs for OtelCollectorExporter #1854

@clintonb

Description

@clintonb

Is your feature request related to a problem? Please describe.

The docstring for the Otel url is incorrect/confusing. It states that OTEL_EXPORTER_OTLP_ENDPOINT will override the value provided. This appears to be incorrect given that there is no code that references the environment variable. Additionally, if such code existed, it would break metrics export since OTEL_EXPORTER_OTLP_ENDPOINT for HTTP is typically http://localhost:4318 but this package expects a URL with the path (e.g., http://localhost:4318/v1/metrics).

/**
* URL of a gRPC OpenTelemetry collector.
*
* Syntax generally looks like `http://server:4317` or `grpc://server:4317` for OTLP/gRPC exporters,
* or `http://server:4318/v1/metrics` for OTLP/HTTP exporters. Make sure to set the `http` option
* to `true` for OTLP/HTTP endpoints.
*
* @format Starts with "grpc://" or "http://" for an unsecured connection (typical),
* or "grpcs://" or "https://" for a TLS connection.
* @note The `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable, if set, will override this property.
*/
url: string;

Describe the solution you'd like

Remove this note to avoid confusion.

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions