-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
The configure_azure_monitor method is awesome, sets up everything nicely, however it is quite strange that only Span Processers can be added (to load additional span exporters), but you can't do the same for Log exporters and metrics exporters. Because I want to be able to simultaneously send telemetry to both azure and a local dashboard (in my case both AIToolkit in vscode, Aspire dashboard and Langfuse on docker). But I can only achieve that for spans, but not for metrics and logs, which is inconsistent.
Describe the solution you'd like
A clear and concise description of what you want to happen.
current code:
# exporters: list["LogRecordExporter | SpanExporter | MetricExporter"]
span_processors = [BatchSpanProcessor(exp) for exp in exporters if isinstance(exp, SpanExporter)]
configure_azure_monitor(
connection_string=self.applicationinsights_connection_string,
enable_live_metrics=self.applicationinsights_live_metrics,
credential=credential,
resource=self.resource,
span_processors=span_processors,
views=self._get_metrics_views(),
logger_name="agent_framework",
)to:
# exporters: list["LogRecordExporter | SpanExporter | MetricExporter"]
span_processors = [BatchSpanProcessor(exp) for exp in exporters if isinstance(exp, SpanExporter)]
log_processors = [BatchLogRecordProcessor(exp) for exp in exporters if isinstance(exp, LogRecordExporter)]
metric_readers = [PeriodicExportingMetricReader(exp, ...) for exp in exporters if isinstance(exp, MetricExporter)]
configure_azure_monitor(
connection_string=self.applicationinsights_connection_string,
enable_live_metrics=self.applicationinsights_live_metrics,
credential=credential,
resource=self.resource,
span_processors=span_processors,
log_processors=log_processors,
metric_readers=metric_readers,
views=self._get_metrics_views(),
logger_name="agent_framework",
)Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Alternative is to set things up yourself, but the totality of the setup that is done by the configure function is so vast and non-trivial that that leads to a lot of code duplication.
Additional context
Add any other context or screenshots about the feature request here.