Add required $contentType arguments (#1225)

This commit is contained in:
安正超 2024-01-27 15:23:12 +08:00 committed by GitHub
parent f2ab3c5e1d
commit 84cf0a5635
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ See https://github.com/open-telemetry/opentelemetry-php/blob/main/examples/trace
## Http transport
```php
$transport = (new \OpenTelemetry\Contrib\Otlp\OtlpHttpTransportFactory())->create('http://collector:4318');
$transport = (new \OpenTelemetry\Contrib\Otlp\OtlpHttpTransportFactory())->create('http://collector:4318', 'application/json');
$exporter = new \OpenTelemetry\Contrib\Otlp\SpanExporter($transport);
```