You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now the generated code packages are meant to be only used by library components internally.
24
+
25
+
---
26
+
27
+
The [OpenTelemetry PHP Contrib repository](https://github.com/open-telemetry/opentelemetry-php-contrib/) hosts contributions that are not part of the core
28
+
distribution or components of the library. Typically, these contributions are vendor specific receivers/exporters and/or
29
+
components that are only useful to a relatively small number of users.
30
+
31
+
Additional packages, demos and tools are hosted or distributed in the [OpenTelemetry PHP organization](https://github.com/opentelemetry-php).
We attempt to keep the [OpenTelemetry Specification Matrix](https://github.com/open-telemetry/opentelemetry-specification/blob/master/spec-compliance-matrix.md) up to date in order to show which features are available and which have not yet been implemented.
34
55
35
56
If you find an inconsistency in the data in the matrix vs. the data in this repository, please let us know in our slack channel and we'll get it rectified.
@@ -46,7 +67,7 @@ A Google calendar invite with the included zoom link can be found [here](https:/
46
67
Our open issues can all be found in the [GitHub issues tab](https://github.com/open-telemetry/opentelemetry-php/issues). Feel free to reach out on Slack if you have any additional questions about these issues; we are always happy to talk through implementation details.
47
68
48
69
## Requirements
49
-
The library requires a PHP version of 7.4.x, 8.0.x or 8.1.x
70
+
The library and all separate packages requires a PHP version of 7.4.x, 8.0.x or 8.1.x
50
71
51
72
### Dependencies
52
73
@@ -55,7 +76,7 @@ The library requires a PHP version of 7.4.x, 8.0.x or 8.1.x
55
76
#### REQUIRED DEPENDENCIES
56
77
#### 1) Install PSR17/18 implementations
57
78
58
-
The library has a dependency on both a [HTTP Factories (PSR17)](https://www.php-fig.org/psr/psr-17/)
79
+
The **SDK** and **Contrib** packages have a dependency on both a [HTTP Factories (PSR17)](https://www.php-fig.org/psr/psr-17/)
59
80
and a [php-http/async-client](https://docs.php-http.org/en/latest/clients.html) implementation.
60
81
You can find appropriate composer packages implementing given standards on [packagist.org](https://packagist.org/).
61
82
Follow [this link](https://packagist.org/providers/psr/http-factory-implementation) to find a `PSR17 (HTTP factories)` implementation,
@@ -67,7 +88,7 @@ and [this link](https://packagist.org/providers/php-http/async-client-implementa
**The PHP protobuf extension is optional when using either the `OTLPHttp` or `OTLPGrpc` exporters.**
135
+
**The PHP protobuf extension is optional when using either the `OTLPHttp` or `OTLPGrpc` exporters from the Contrib package.**
115
136
116
137
The protobuf extension makes both exporters more performant. _Note that protobuf 3.20.0+ is required for php 8.1 support_
117
138
118
139
---
119
140
120
141
## Installation
121
-
The recommended way to install the library is through [Composer](http://getcomposer.org):
142
+
The recommended way to install the library's packages is through [Composer](http://getcomposer.org):
122
143
123
-
1) Install the composer package using [Composer's installation instructions](https://getcomposer.org/doc/00-intromd#installation-linux-unix-macos).
124
-
125
-
126
-
2) Add
144
+
Install Composer using the [installation instructions](https://getcomposer.org/doc/00-intromd#installation-linux-unix-macos) and add
127
145
```bash
128
146
"minimum-stability": "dev"
129
147
```
130
148
131
-
To your project's `composer.json` file, as this utility has not reached a stable release status yet.
149
+
To your project's `composer.json` file, as this library has not reached a stable release status yet.
132
150
133
-
3) Install the dependency with composer:
151
+
### Getting Started with OpenTelemetry
152
+
153
+
To install the complete library with all packages you can run:
134
154
135
155
```bash
136
156
$ composer require open-telemetry/opentelemetry
137
157
```
158
+
This is perfect for trying out our examples or demos.
159
+
160
+
### Using OpenTelemetry in an Application
161
+
162
+
Your application should only depend on Interfaces provided by the API package:
163
+
164
+
```bash
165
+
$ composer require open-telemetry/api
166
+
```
167
+
In the best case you will use [Dependency Inversion](https://en.wikipedia.org/wiki/Dependency_inversion_principle) and write an adapter to not depend on the API directly.
168
+
169
+
Make sure your application works with a dependency on the API only, however to make really use of the library you want to install the **SDK** package and probably the **Contrib** package as well:
For repeatability and consistency across different operating systems, we use the [3 Musketeers pattern](https://3musketeers.io/). If you're on Windows, it might be a good idea to use Git bash for following the steps below.
0 commit comments