← All changes
|
vendor_prefixed/sentry/sentry/src/State/RuntimeContext.php
+20
-1
1.10.10
→
1.10.23
View file →
| @@ -10,9 +10,10 @@ | ||
| 10 | 10 | * |
| 11 | 11 | * A unit of work can be an HTTP request, a queue job, a worker task, or any |
| 12 | 12 | * explicit lifecycle wrapped with startContext()/endContext(). |
| 13 | 13 | * |
| 14 | - * @internal | |
| 14 | + * Storage implementations should treat instances as opaque values owned by the | |
| 15 | + * SDK and must not create or mutate them directly. | |
| 15 | 16 | */ |
| 16 | 17 | final class RuntimeContext |
| 17 | 18 | { |
| 18 | 19 | /** |
| @@ -30,8 +31,11 @@ | ||
| 30 | 31 | /** |
| 31 | 32 | * @var MetricsAggregator |
| 32 | 33 | */ |
| 33 | 34 | private $metricsAggregator; |
| 35 | + /** | |
| 36 | + * @internal | |
| 37 | + */ | |
| 34 | 38 | public function __construct(string $id, HubInterface $hub) |
| 35 | 39 | { |
| 36 | 40 | $this->id = $id; |
| 37 | 41 | $this->hub = $hub; |
| @@ -37,24 +41,39 @@ | ||
| 37 | 41 | $this->hub = $hub; |
| 38 | 42 | $this->logsAggregator = new LogsAggregator(); |
| 39 | 43 | $this->metricsAggregator = new MetricsAggregator(); |
| 40 | 44 | } |
| 45 | + /** | |
| 46 | + * @internal | |
| 47 | + */ | |
| 41 | 48 | public function getId() : string |
| 42 | 49 | { |
| 43 | 50 | return $this->id; |
| 44 | 51 | } |
| 52 | + /** | |
| 53 | + * @internal | |
| 54 | + */ | |
| 45 | 55 | public function getHub() : HubInterface |
| 46 | 56 | { |
| 47 | 57 | return $this->hub; |
| 48 | 58 | } |
| 59 | + /** | |
| 60 | + * @internal | |
| 61 | + */ | |
| 49 | 62 | public function setHub(HubInterface $hub) : void |
| 50 | 63 | { |
| 51 | 64 | $this->hub = $hub; |
| 52 | 65 | } |
| 66 | + /** | |
| 67 | + * @internal | |
| 68 | + */ | |
| 53 | 69 | public function getLogsAggregator() : LogsAggregator |
| 54 | 70 | { |
| 55 | 71 | return $this->logsAggregator; |
| 56 | 72 | } |
| 73 | + /** | |
| 74 | + * @internal | |
| 75 | + */ | |
| 57 | 76 | public function getMetricsAggregator() : MetricsAggregator |
| 58 | 77 | { |
| 59 | 78 | return $this->metricsAggregator; |
| 60 | 79 | } |