Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instana exporter documentation. #5834

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions content/en/docs/languages/php/exporters.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,39 @@ $tracerProvider = new TracerProvider(
$tracer = $tracerProvider->getTracer('io.opentelemetry.contrib.php');
```

## Instana

To send collected trace data to an [Instana](https://www.ibm.com/products/instana) endpoint, you'll need the `open-telemetry/exporter-instana` package.

```shell
composer require open-telemetry/exporter-instana
```

This package allows for converting OpenTelemetry spans into Instana spans before sending them natively to the Instana backend.

To open a transport you can do one of the following

```php
$transport = new InstanaTransport('http://127.0.0.1:42699', 10);
$converter = new SpanConverter($transport->getUuid(), $transport->getPid());
$instanaExporter = new SpanExporter($transport, $converter);
$tracerProvider = new TracerProvider(
new SimpleSpanProcessor($instanaExporter)
);
$tracer = $tracerProvider->getTracer('io.opentelemetry.contrib.php');
```

or utilize the factory which loads the variables `OTEL_EXPORTER_INSTANA_ENDPOINT` and `OTEL_EXPORTER_INSTANA_TIMEOUT`.

```php
$tracerProvider = new TracerProvider(
new SimpleSpanProcessor(
(new SpanExporterFactory)->create()
)
);
$tracer = $tracerProvider->getTracer('io.opentelemetry.contrib.php');
```

## Minimizing export delays

Most PHP runtimes are synchronous and blocking. Sending telemetry data
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/docs/languages/exporters/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[OpenTelemetry Collector](/docs/collector/) to make sure it's exported
correctly. Using the Collector in production environments is a best practice. To
visualize your telemetry, export it to a backend such as
[Jaeger](https://jaegertracing.io/), [Zipkin](https://zipkin.io/),
[Jaeger](https://jaegertracing.io/), [Zipkin](https://zipkin.io/), [Instana](https://www.ibm.com/products/instana),
[Prometheus](https://prometheus.io/), or a
[vendor-specific](/ecosystem/vendors/) backend.

Expand Down
Loading