Skip to content

Commit 0c4382f

Browse files
authored
docs(dev): install OpenTelemetry (linux,macOS,source) (#1561)
1 parent 4901e25 commit 0c4382f

1 file changed

Lines changed: 22 additions & 30 deletions

File tree

src/getting-started/dev-env.md

Lines changed: 22 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -270,54 +270,46 @@ cd ../../../elasticms-admin/
270270
php bin/console a:i --symlink
271271
```
272272

273-
## Install OpenTelemetry on OS X
273+
## Install OpenTelemetry
274274

275-
Update Homebrew and install build tools:
275+
::: code-group
276276

277-
```shell
278-
brew update
279-
brew install gcc make autoconf
280-
```
281-
282-
Check that PHP8.5 is installed and running:
277+
```bash [Linux (apt)]
278+
sudo apt-get update
279+
sudo apt-get install gcc make autoconf
283280
284-
```shell
285-
php -v
286-
```
287-
288-
Must returns something like `PHP 8.5.x`
289-
290-
Otherwize:
291-
292-
```shell
293-
brew tap shivammathur/php
294-
brew install shivammathur/php/php@8.5
295-
brew link --force --overwrite php@8.5
281+
pecl install opentelemetry
282+
pecl install protobuf
296283
```
297284

298-
Install OpenTelemetry via PECL:
285+
```bash [macOS (homebrew)]
286+
brew update
287+
brew install gcc make autoconf
299288
300-
```shell
301289
pecl install opentelemetry
302290
pecl install protobuf
303291
```
304292

305-
Activate the OpenTelemetry in the php.ini. First locate the php.ini with
293+
```bash [From soruce]
294+
git clone https://github.com/open-telemetry/opentelemetry-php-instrumentation.git
295+
cd opentelemetry-php-instrumentation/ext
296+
phpize
297+
./configure
298+
make
299+
sudo make install
300+
```
306301

307-
```shell
308-
php --ini
309-
```
302+
:::
310303

311-
Ensure that those lines are there:
304+
Add the following to your php.ini
312305

313306
```ini
314307
[opentelemetry]
315308
extension=opentelemetry.so
316309
```
317310

318-
Check that the extension is on:
319-
320-
```shell
311+
Verify the installation with
312+
```bash
321313
php -m | grep opentelemetry
322314
```
323315

0 commit comments

Comments
 (0)