diff --git a/src/Tracing/SpanStatus.php b/src/Tracing/SpanStatus.php index 7cad0f216..33c384552 100644 --- a/src/Tracing/SpanStatus.php +++ b/src/Tracing/SpanStatus.php @@ -76,11 +76,22 @@ public static function failedPrecondition(): self * Gets an instance of this enum representing the fact that the server returned * 429 Too Many Requests. */ - public static function resourceExchausted(): self + public static function resourceExhausted(): self { return self::getInstance('resource_exhausted'); } + /** + * Gets an instance of this enum representing the fact that the server returned + * 429 Too Many Requests. + * + * @deprecated since version 4.7. To be removed in version 5.0. Use SpanStatus::resourceExhausted() instead. + */ + public static function resourceExchausted(): self + { + return self::resourceExhausted(); + } + /** * Gets an instance of this enum representing the fact that the server returned * 501 Not Implemented. @@ -163,7 +174,7 @@ public static function createFromHttpStatusCode(int $statusCode): self case $statusCode === 413: return self::failedPrecondition(); case $statusCode === 429: - return self::resourceExchausted(); + return self::resourceExhausted(); case $statusCode === 501: return self::unimplemented(); case $statusCode === 503: diff --git a/tests/Monolog/BreadcrumbHandlerTest.php b/tests/Monolog/BreadcrumbHandlerTest.php index 8cd6a4d2f..ffef9e192 100644 --- a/tests/Monolog/BreadcrumbHandlerTest.php +++ b/tests/Monolog/BreadcrumbHandlerTest.php @@ -76,7 +76,7 @@ public static function handleDataProvider(): iterable ]; yield 'with context' => [ - RecordFactory::create('foo bar', Logger::DEBUG, 'channel.foo', ['context' => ['foo' => 'bar']], []), + RecordFactory::create('foo bar', Logger::DEBUG, 'channel.foo', ['context' => ['foo' => 'bar']], []), $defaultBreadcrumb->withMetadata('context', ['foo' => 'bar']), ]; diff --git a/tests/Tracing/SpanStatusTest.php b/tests/Tracing/SpanStatusTest.php index 7e4969848..f9c2af443 100644 --- a/tests/Tracing/SpanStatusTest.php +++ b/tests/Tracing/SpanStatusTest.php @@ -45,7 +45,7 @@ public static function toStringDataProvider(): iterable ]; yield [ - SpanStatus::resourceExchausted(), + SpanStatus::resourceExhausted(), 'resource_exhausted', ];