Skip to content

Commit

Permalink
Fix OTLP GRPC example (#856)
Browse files Browse the repository at this point in the history
  • Loading branch information
erdemkose authored Nov 4, 2022
1 parent 0b43fac commit 92e7a0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/metrics/features/exporters/otlp_grpc.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use OpenTelemetry\API\Common\Signal\Signals;
use OpenTelemetry\Contrib\Grpc\GrpcTransportFactory;
use OpenTelemetry\Contrib\Otlp\MetricExporter;
use OpenTelemetry\Contrib\Otlp\OtlpUtil;
use OpenTelemetry\Example\ExampleMetricsGenerator;
use OpenTelemetry\SDK\Common\Time\ClockFactory;
use OpenTelemetry\SDK\Metrics\MetricReader\ExportingReader;
Expand All @@ -17,7 +18,7 @@

$reader = new ExportingReader(
new MetricExporter(
(new GrpcTransportFactory())->withSignal(Signals::METRICS)->create('http://collector:4317')
(new GrpcTransportFactory())->create('http://collector:4317' . OtlpUtil::method(Signals::METRICS))
),
$clock
);
Expand Down

0 comments on commit 92e7a0d

Please sign in to comment.