Skip to content

[FEATURE] Expose OpenTelemetry's SpanExporters init arguments on the SDK #363

Open
@mrtj

Description

@mrtj

Problem Statement

The initializers of OpenTelemetry's ConsoleSpanExporter and OTLPSpanExporter classes have some useful arguments (for example, for the console exporter you can specify an output stream other than the default STDOUT, and for the OTLP exporter you can specify server parameters dynamically, in addition to environment variable configuration). These arguments are currently not exposed in Strands' telemetry module, as the exporters are initialized internally with default arguments here and here.

Proposed Solution

This feature request proposes exposing the initializer arguments of these classes as optional, packed keyword arguments in the StrandsTelemetry.setup_console_exporter and StrandsTelemetry.setup_otlp_exporter APIs.

Use Case

I was looking for a simple way to save the telemetry output to a file. Redirecting the standard output to a file is certainly an option, but I believe the API would be improved with the proposed solution.

Alternatives Solutions

No response

Additional Context

No response

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