Description
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