Skip to content

Commit

Permalink
Add validity warning to Scala doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ybasket committed Oct 9, 2023
1 parent b25ba98 commit c3ee739
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,17 @@ object Prometheus {
metrics <- createMetricsCollection(registry, prefix, responseDurationSecondsHistogramBuckets)
} yield createMetricsOps(metrics, Applicative[F].pure(None))

/** Creates a [[MetricsOps]] that supports Prometheus metrics and records exemplars.
*
* Warning: The sampler effect is responsible for producing exemplar labels that are valid for the underlying
* implementation as errors happening during metric recording will not be handled! For Prometheus version < 1.0,
* this means the combined length of keys and values may not exceed 128 characters and the parts must adhere
* to the label regex Prometheus defines.
*
* @param registry a metrics collector registry
* @param sampleExemplar an effect that returns the corresponding exemplar labels
* @param prefix a prefix that will be added to all metrics
*/
def metricsOpsWithExemplars[F[_]: Sync](
registry: CollectorRegistry,
sampleExemplar: F[Option[Map[String, String]]],
Expand Down

0 comments on commit c3ee739

Please sign in to comment.