Skip to content

Commit

Permalink
Merge branch 'main' into redis-read-only
Browse files Browse the repository at this point in the history
  • Loading branch information
iKsSs authored Dec 2, 2024
2 parents 31cff83 + 6d7328e commit ac3ef40
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions src/Prometheus/RegistryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function getOrRegisterCounter(string $namespace, string $name, string $he
* @param string $name e.g. duration_seconds
* @param string $help e.g. A histogram of the duration in seconds.
* @param string[] $labels e.g. ['controller', 'action']
* @param float[] $buckets e.g. [100, 200, 300]
* @param float[]|null $buckets e.g. [100, 200, 300]
*
* @return Histogram
* @throws MetricsRegistrationException
Expand All @@ -96,7 +96,7 @@ public function registerHistogram(
string $name,
string $help,
array $labels = [],
array $buckets = null
?array $buckets = null
): Histogram;

/**
Expand All @@ -113,12 +113,18 @@ public function getHistogram(string $namespace, string $name): Histogram;
* @param string $name e.g. duration_seconds
* @param string $help e.g. A histogram of the duration in seconds.
* @param string[] $labels e.g. ['controller', 'action']
* @param float[] $buckets e.g. [100, 200, 300]
* @param float[]|null $buckets e.g. [100, 200, 300]
*
* @return Histogram
* @throws MetricsRegistrationException
*/
public function getOrRegisterHistogram(string $namespace, string $name, string $help, array $labels = [], array $buckets = null): Histogram;
public function getOrRegisterHistogram(
string $namespace,
string $name,
string $help,
array $labels = [],
?array $buckets = null
): Histogram;

/**
* @param string $namespace e.g. cms
Expand All @@ -137,7 +143,7 @@ public function registerSummary(
string $help,
array $labels = [],
int $maxAgeSeconds = 86400,
array $quantiles = null
?array $quantiles = null
): Summary;

/**
Expand All @@ -160,5 +166,12 @@ public function getSummary(string $namespace, string $name): Summary;
* @return Summary
* @throws MetricsRegistrationException
*/
public function getOrRegisterSummary(string $namespace, string $name, string $help, array $labels = [], int $maxAgeSeconds = 86400, array $quantiles = null): Summary;
public function getOrRegisterSummary(
string $namespace,
string $name,
string $help,
array $labels = [],
int $maxAgeSeconds = 86400,
?array $quantiles = null
): Summary;
}

0 comments on commit ac3ef40

Please sign in to comment.