resolve deptrac baseline (#844)

* resolve deptrac baseline
Nevay found that an @internal annotation in NonRecordingSpan was the cause of the violation, so
remove it.

* make psalm happy
This commit is contained in:
Brett McBride 2022-10-13 00:06:29 +11:00 committed by GitHub
parent 3866a82d92
commit 10830f2683
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,2 @@
deptrac:
skip_violations:
OpenTelemetry\SDK\Trace\Span:
- OpenTelemetry\API\Trace\NonRecordingSpan

View File

@ -9,7 +9,6 @@ use Throwable;
/**
* @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/api.md#wrapping-a-spancontext-in-a-span
*
* @internal
* @psalm-internal OpenTelemetry
*/
final class NonRecordingSpan extends Span

View File

@ -4,7 +4,7 @@ declare(strict_types=1);
namespace OpenTelemetry\Contrib\OtlpGrpc;
use grpc;
use Grpc;
use Grpc\ChannelCredentials;
use OpenTelemetry\Contrib\Otlp\ExporterTrait;
use OpenTelemetry\Contrib\Otlp\SpanConverter;

View File

@ -22,6 +22,9 @@ final class Process implements ResourceDetectorInterface
$attributes = [];
$attributes[ResourceAttributes::PROCESS_PID] = getmypid();
$attributes[ResourceAttributes::PROCESS_EXECUTABLE_PATH] = PHP_BINARY;
/**
* @psalm-suppress PossiblyUndefinedArrayOffset
*/
if ($_SERVER['argv'] ?? null) {
$attributes[ResourceAttributes::PROCESS_COMMAND] = $_SERVER['argv'][0];
$attributes[ResourceAttributes::PROCESS_COMMAND_ARGS] = $_SERVER['argv'];