Combine multiple collectors into one that fans out every call to all of them.
Combine multiple collectors into one that fans out every call to all of them.
Every method of the trait is forwarded, the image-generation ones included; a collector that throws does not stop the others. A method added to the trait must be forwarded here too - MetricsCollectorComposeSpec fails otherwise.
Useful for running a CostTracker (in llm4s-observability) alongside PrometheusMetrics (in llm4s-observability-prometheus):
val combined = MetricsCollector.compose(prometheusMetrics, costTracker)
val client = LLMConnect.getClient(config, combined)
The most distinct values a backend records for one label of one Metric; further values are recorded as other, so a label fed an unbounded value by mistake cannot grow the registry without limit.
The most distinct values a backend records for one label of one Metric; further values are recorded as other, so a label fed an unbounded value by mistake cannot grow the registry without limit.