Skip to content

Commit

Permalink
cumulative temporality
Browse files Browse the repository at this point in the history
  • Loading branch information
leocavalcante committed Apr 18, 2023
1 parent 49427f8 commit 53b9422
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
use OpenTelemetry\Contrib\Otlp\MetricExporter;
use OpenTelemetry\SDK\Common\Export\Stream\StreamTransport;
use OpenTelemetry\SDK\Common\Time\ClockFactory;
use OpenTelemetry\SDK\Metrics\Data\Temporality;
use OpenTelemetry\SDK\Metrics\MeterProvider;
use OpenTelemetry\SDK\Metrics\MetricReader\ExportingReader;
use OpenTelemetry\Contrib\Otlp\OtlpUtil;

require 'vendor/autoload.php';

$transport = (new GrpcTransportFactory())->create('http://localhost:4317' . OtlpUtil::method(Signals::METRICS));
$exporter = new MetricExporter($transport);
$exporter = new MetricExporter($transport, Temporality::CUMULATIVE);
$reader = new ExportingReader($exporter, ClockFactory::getDefault());

$meter = MeterProvider::builder()
Expand Down

0 comments on commit 53b9422

Please sign in to comment.