Skip to content

Commit 1f14c97

Browse files
authored
update readmes (#200)
Following on from Laravel's readme updates, apply the same to other readme files. Add some badges, and a note to make clear that people are probably looking at a read-only subtree split. In passing, update wordpress dockerfile and metapackage to use RC
1 parent d47851a commit 1f14c97

File tree

1 file changed

+15
-53
lines changed

1 file changed

+15
-53
lines changed

README.md

+15-53
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,24 @@
1-
# OpenTelemetry Laravel auto-instrumentation
1+
[![Releases](https://img.shields.io/badge/releases-purple)](https://github.com/opentelemetry-php/contrib-auto-laravel/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/Laravel)
4+
[![Mirror](https://img.shields.io/badge/mirror-opentelemetry--php--contrib-blue)](https://github.com/opentelemetry-php/contrib-auto-laravel)
5+
[![Latest Version](http://poser.pugx.org/open-telemetry/opentelemetry-auto-laravel/v/unstable)](https://packagist.org/packages/open-telemetry/opentelemetry-auto-laravel/)
6+
[![Stable](http://poser.pugx.org/open-telemetry/opentelemetry-auto-laravel/v/stable)](https://packagist.org/packages/open-telemetry/opentelemetry-auto-laravel/)
27

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 [Laravel](#Installation-via-composer)**
8+
This is a read-only subtree split of https://github.com/open-telemetry/opentelemetry-php-contrib.
59

6-
## Requirements
10+
# OpenTelemetry Laravel auto-instrumentation
711

8-
* OpenTelemetry extension
9-
* OpenTelemetry SDK and exporters (required to actually export traces)
12+
Please read https://opentelemetry.io/docs/instrumentation/php/automatic/ for instructions on how to
13+
install and configure the extension and SDK.
1014

1115
## Overview
12-
Currently only root span creation is supported (Illuminate\Foundation\Http\Kernel::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-
```
37-
38-
## Installation via composer
39-
40-
```bash
41-
$ composer require open-telemetry/opentelemetry-auto-laravel
42-
```
43-
44-
## Installing dependencies and executing tests
45-
46-
From Laravel subdirectory:
47-
48-
```bash
49-
$ composer install
50-
$ ./vendor/bin/phpunit tests
51-
```
16+
Auto-instrumentation hooks are registered via composer, and spans will automatically be created.
5217

5318
## Configuration
5419

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):
20+
The extension can be disabled via [runtime configuration](https://opentelemetry.io/docs/instrumentation/php/sdk/#configuration):
5721

58-
| Name | Default value | Values | Example | Description |
59-
|-------------------------------------|---------------|-------------------------|---------|---------------------------------------------------------------------------------|
60-
| OTEL_PHP_DISABLED_INSTRUMENTATIONS | [] | Instrumentation name(s) | laravel | Disable one or more installed auto-instrumentations, names are comma seperated. |
61-
62-
Configurations can be provided as environment variables, or via `php.ini` (or a file included by `php.ini`)
22+
```shell
23+
OTEL_PHP_DISABLED_INSTRUMENTATIONS=laravel
24+
```

0 commit comments

Comments
 (0)