forked from valkey-io/valkey-glide-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMetricsConfig.php
More file actions
43 lines (37 loc) · 893 Bytes
/
MetricsConfig.php
File metadata and controls
43 lines (37 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
declare(strict_types=1);
namespace ValkeyGlide\OpenTelemetry;
/**
* Configuration for OpenTelemetry metrics.
*/
class MetricsConfig
{
private string $endpoint;
/**
* Creates a new MetricsConfig from a builder.
*
* @param MetricsConfigBuilder $builder The builder containing configuration values.
*/
public function __construct(MetricsConfigBuilder $builder)
{
$this->endpoint = $builder->getEndpoint();
}
/**
* Creates a new MetricsConfig builder.
*
* @return MetricsConfigBuilder A new builder instance.
*/
public static function builder(): MetricsConfigBuilder
{
return new MetricsConfigBuilder();
}
/**
* Gets the endpoint.
*
* @return string The metrics endpoint URL.
*/
public function getEndpoint(): string
{
return $this->endpoint;
}
}