Skip to content

Commit c29d317

Browse files
authored
symfony auto-instrumentation readme (#196)
removing some content from symfony readme, and directing users to the central docs on opentelemetry.io for most info (since most READMEs are repetitive, and not as good as the central docs)
1 parent 84ed6b3 commit c29d317

File tree

1 file changed

+21
-35
lines changed

1 file changed

+21
-35
lines changed

README.md

Lines changed: 21 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,28 @@
1+
[![Releases](https://img.shields.io/badge/releases-purple)](https://github.com/opentelemetry-php/contrib-auto-symfony/releases)
2+
[![Issues](https://img.shields.io/badge/issues-pink)](https://github.com/open-telemetry/opentelemetry-php/issues)
3+
[![Source](https://img.shields.io/badge/source-contrib-green)](https://github.com/open-telemetry/opentelemetry-php-contrib/tree/main/src/Instrumentation/Symfony)
4+
[![Mirror](https://img.shields.io/badge/mirror-opentelemetry--php--contrib-blue)](https://github.com/opentelemetry-php/contrib-auto-symfony)
5+
[![Latest Version](http://poser.pugx.org/open-telemetry/opentelemetry-auto-symfony/v/unstable)](https://packagist.org/packages/open-telemetry/opentelemetry-auto-symfony/)
6+
[![Stable](http://poser.pugx.org/open-telemetry/opentelemetry-auto-symfony/v/stable)](https://packagist.org/packages/open-telemetry/opentelemetry-auto-symfony/)
7+
8+
This is a read-only subtree split of https://github.com/open-telemetry/opentelemetry-php-contrib.
9+
110
# OpenTelemetry Symfony auto-instrumentation
211

3-
**Preferred and simplest way to install auto-instrumentation (c extension plus instrumentation libraries) is to use [opentelemetry-instrumentation-installer](https://github.com/open-telemetry/opentelemetry-php-contrib/tree/main/src/AutoInstrumentationInstaller).**
4-
**The same process can be done manually by installing [c extension](https://github.com/open-telemetry/opentelemetry-php-instrumentation#installation) plus all needed instrumentation libraries like [Symfony](#Installation-via-composer)**
12+
This is an OpenTelemetry auto-instrumentation package for Symfony framework applications.
13+
14+
Please read https://opentelemetry.io/docs/instrumentation/php/automatic/ for instructions on how to
15+
install and configure the extension and SDK.
516

617
## Requirements
718

8-
* OpenTelemetry extension
19+
* [OpenTelemetry extension](https://opentelemetry.io/docs/instrumentation/php/automatic/#installation)
920
* OpenTelemetry SDK and exporters (required to actually export traces)
1021

1122
## Overview
12-
Currently only root span creation is supported (Symfony\Component\HttpKernel\HttpKernel::handle hook).
13-
14-
To export spans, you will need to create and register a `TracerProvider` early in your application's
15-
lifecycle. This can be done either manually or using SDK autoloading.
16-
17-
### Using SDK autoloading
18-
19-
See https://github.com/open-telemetry/opentelemetry-php#sdk-autoloading
20-
21-
### Manual setup
22-
23-
```php
24-
<?php
25-
require_once 'vendor/autoload.php';
26-
27-
$tracerProvider = /*create tracer provider*/;
28-
$scope = \OpenTelemetry\API\Instrumentation\Configurator::create()
29-
->withTracerProvider($tracerProvider)
30-
->activate();
31-
32-
//your application runs here
33-
34-
$scope->detach();
35-
$tracerProvider->shutdown();
36-
```
23+
The following features are supported:
24+
* root span creation (`Symfony\Component\HttpKernel\HttpKernel::handle` hook)
25+
* context propagation
3726

3827
## Installation via composer
3928

@@ -52,11 +41,8 @@ $ ./vendor/bin/phpunit tests
5241

5342
## Configuration
5443

55-
Parts of this auto-instrumentation library can be configured, more options are available throught the
56-
[General SDK Configuration](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#general-sdk-configuration):
57-
58-
| Name | Default value | Values | Example | Description |
59-
|-------------------------------------|---------------|-------------------------|---------|---------------------------------------------------------------------------------|
60-
| OTEL_PHP_DISABLED_INSTRUMENTATIONS | [] | Instrumentation name(s) | symfony | Disable one or more installed auto-instrumentations, names are comma seperated. |
44+
The extension can be disabled via [runtime configuration](https://opentelemetry.io/docs/instrumentation/php/sdk/#configuration):
6145

62-
Configurations can be provided as environment variables, or via `php.ini` (or a file included by `php.ini`)
46+
```shell
47+
OTEL_PHP_DISABLED_INSTRUMENTATIONS=symfony
48+
```

0 commit comments

Comments
 (0)