From 4af2dc268aa6e5f4e2277a29a44ebb6a4bdea2a4 Mon Sep 17 00:00:00 2001 From: svrnm Date: Wed, 19 Jun 2024 17:48:45 +0200 Subject: [PATCH 1/3] Move php automatic page to zero-code Signed-off-by: svrnm --- .../blog/2023/php-auto-instrumentation/index.md | 2 +- .../en/docs/concepts/instrumentation/zero-code.md | 2 +- content/en/docs/languages/php/exporters.md | 6 +++--- content/en/docs/languages/php/getting-started.md | 15 ++++++++------- content/en/docs/languages/php/libraries.md | 6 +----- .../php/automatic.md => zero-code/php.md} | 13 +++++++------ 6 files changed, 21 insertions(+), 23 deletions(-) rename content/en/docs/{languages/php/automatic.md => zero-code/php.md} (94%) diff --git a/content/en/blog/2023/php-auto-instrumentation/index.md b/content/en/blog/2023/php-auto-instrumentation/index.md index d24e5db88b71..8c8b924b47d3 100644 --- a/content/en/blog/2023/php-auto-instrumentation/index.md +++ b/content/en/blog/2023/php-auto-instrumentation/index.md @@ -153,7 +153,7 @@ We have all necessary components in place: and frameworks. - Development tools that can help lower barrier for users and developers interested in instrumenting arbitrary code. -- [Documentation](/docs/languages/php/automatic/) +- [Documentation](/docs/zero-code/php/) One of our goals is to increase awareness of this work and involve more people that will help us improve it, extend coverage and fix bugs. diff --git a/content/en/docs/concepts/instrumentation/zero-code.md b/content/en/docs/concepts/instrumentation/zero-code.md index 40144874aa87..d35cb56df3ff 100644 --- a/content/en/docs/concepts/instrumentation/zero-code.md +++ b/content/en/docs/concepts/instrumentation/zero-code.md @@ -47,5 +47,5 @@ Automatic instrumentation is available for the following languages: - [.NET](/docs/zero-code/net/) - [Java](/docs/zero-code/java/) - [JavaScript](/docs/zero-code/js/) -- [PHP](/docs/languages/php/automatic/) +- [PHP](/docs/zero-code/php/) - [Python](/docs/languages/python/automatic/) diff --git a/content/en/docs/languages/php/exporters.md b/content/en/docs/languages/php/exporters.md index 8f0a7a22bffd..7dd50a0190c0 100644 --- a/content/en/docs/languages/php/exporters.md +++ b/content/en/docs/languages/php/exporters.md @@ -8,9 +8,9 @@ cSpell:ignore: fastcgi pecl {{% alert title="Note" color="info" %}} -If you use [automatic instrumentation](/docs/languages/php/automatic/) you can -setup exporters with -[zero-code configuration to setup exporters](/docs/languages/php/automatic/#zero-code-configuration-for-automatic-instrumentation). +If you use [zero-code instrumentation](/docs/zero-code/php/) you can setup +exporters with +[zero-code configuration to setup exporters](/docs/zero-code/php#zero-code-configuration-for-automatic-instrumentation). {{% /alert %}} diff --git a/content/en/docs/languages/php/getting-started.md b/content/en/docs/languages/php/getting-started.md index 8a8d5667b063..1b75c50f9afc 100644 --- a/content/en/docs/languages/php/getting-started.md +++ b/content/en/docs/languages/php/getting-started.md @@ -10,13 +10,13 @@ OpenTelemetry for PHP can be used to generate and export [traces][], [metrics][] and [logs][]. This page will show you how to get started with OpenTelemetry in PHP. We will -create a simple "roll the dice" application, then apply both automatic and -manual instrumentation to generate [traces][] and export them to the console. We +create a simple "roll the dice" application, then apply both zero-code and code +based instrumentation to generate [traces][] and export them to the console. We will then emit some [logs][] which will also be sent to the console. ## Prerequisites -OpenTelemetry requires PHP 8.0+ for automatic instrumentation, however manual +OpenTelemetry requires PHP 8.0+ for zero-code instrumentation, however manual instrumentation will work with PHP 7.4 Ensure that you have the following installed: @@ -86,10 +86,10 @@ php -S localhost:8080 Open in your web browser to ensure it is working. -## Add automatic instrumentation +## Add zero-code instrumentation Next, you’ll use the OpenTelemetry PHP extension to -[automatically instrument](../automatic/) the application. +[automatically instrument](/docs/zero-code/php/) the application. 1. Since the extension is built from source, you need to install some build tools @@ -116,7 +116,8 @@ Next, you’ll use the OpenTelemetry PHP extension to {{% alert title="Note" color="warning" %}}Alternative methods of installing the extension are detailed in - [automatic instrumentation](../automatic/#installation). {{% /alert %}} + [zero-code instrumentation](/docs/zero-code/php/#installation). + {{% /alert %}} 3. Add the extension to your `php.ini` file: @@ -487,7 +488,7 @@ values correspond to the active span at the time the log message was generated. For more: - Run this example with another [exporter][] for telemetry data. -- Try [automatic instrumentation](../automatic/) on one of your own apps. +- Try [zero-code instrumentation](/docs/zero-code/php/) on one of your own apps. - Learn more about [manual instrumentation][] and try out some [examples](/docs/languages/php/examples/). - Take a look at the [OpenTelemetry Demo](/docs/demo/), which includes the PHP based [Quote Service](/docs/demo/services/quote/). diff --git a/content/en/docs/languages/php/libraries.md b/content/en/docs/languages/php/libraries.md index 2b21f6f61ad9..7b85fa5b9073 100644 --- a/content/en/docs/languages/php/libraries.md +++ b/content/en/docs/languages/php/libraries.md @@ -37,7 +37,7 @@ You can turn off any instrumentation by adding its identifier to the ## Available instrumentation libraries For a list of available instrumentations, see -[OpenTelemetry instrumentation packages](https://packagist.org/search/?query=open-telemetry&tags=instrumentation) +[OpenTelemetry instrumentation libraries](https://packagist.org/search/?query=open-telemetry&tags=instrumentation) on Packagist. ## Next steps @@ -49,7 +49,3 @@ custom telemetry data. You might also want to configure an appropriate exporter to [export your telemetry data](/docs/languages/php/exporters) to one or more telemetry backends. - -You can also check the -[automatic instrumentation for PHP](/docs/languages/php/automatic) for existing -library instrumentations. diff --git a/content/en/docs/languages/php/automatic.md b/content/en/docs/zero-code/php.md similarity index 94% rename from content/en/docs/languages/php/automatic.md rename to content/en/docs/zero-code/php.md index 1be02f687429..2becffe5d396 100644 --- a/content/en/docs/languages/php/automatic.md +++ b/content/en/docs/zero-code/php.md @@ -1,7 +1,8 @@ --- -title: Automatic Instrumentation -linkTitle: Automatic +title: PHP zero-code instrumentation +linkTitle: PHP weight: 30 +aliases: [/docs/languages/php/automatic] # prettier-ignore cSpell:ignore: centos configurator democlass epel myapp pecl phar remi unindented userland --- @@ -15,13 +16,13 @@ method runs. {{% alert title="Important" color="warning" %}}Installing the OpenTelemetry extension by itself will not generate traces. You must also install the [SDK](https://packagist.org/packages/open-telemetry/sdk) **and** one or more -[instrumentation packages](/ecosystem/registry/?component=instrumentation&language=php) +[instrumentation libraries](/ecosystem/registry/?component=instrumentation&language=php) for the frameworks and libraries that you are using, or alternatively write your own. You also _must_ use [composer autoloading](https://getcomposer.org/doc/01-basic-usage.md#autoloading), -as this is the mechanism all auto-instrumentation packages use to register +as this is the mechanism all instrumentation libraries use to register themselves. {{% /alert %}} ## Example @@ -224,8 +225,8 @@ commonly used PHP libraries. For the full list, see ## Next steps After you have automatic instrumentation configured for your app or service, you -might want to add [manual instrumentation](../instrumentation) to collect custom -telemetry data. +might want to add [manual instrumentation](/docs/languages/php/instrumentation) +to collect custom telemetry data. For more examples, see [opentelemetry-php-contrib/examples](https://github.com/open-telemetry/opentelemetry-php-contrib/tree/main/examples). From eb5ccd9c3ec9d8622abcf9ff7e5608dbc10c11fb Mon Sep 17 00:00:00 2001 From: svrnm Date: Wed, 19 Jun 2024 17:49:45 +0200 Subject: [PATCH 2/3] add codeowner entry Signed-off-by: svrnm --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f12a2bc5b35a..61652c5d7ba7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -44,6 +44,7 @@ content/en/docs/specs/ @open-telemetry/docs-approvers @open-te content/en/docs/zero-code/java/ @open-telemetry/docs-approvers @open-telemetry/java-approvers @open-telemetry/java-instrumentation-approvers content/en/docs/zero-code/js/ @open-telemetry/docs-approvers @open-telemetry/javascript-approvers content/en/docs/zero-code/net/ @open-telemetry/docs-approvers @open-telemetry/dotnet-approvers @open-telemetry/dotnet-instrumentation-approvers +content/en/docs/zero-code/php/ @open-telemetry/docs-approvers @open-telemetry/php-approvers content/en/ecosystem/demo/ @open-telemetry/demo-approvers @open-telemetry/demo-approvers content/zh/ @open-telemetry/docs-maintainers @open-telemetry/docs-zh-approvers content/ja/ @open-telemetry/docs-maintainers @open-telemetry/docs-ja-approvers From 40285b6bd40474d8dd393769949a725d06e92e6a Mon Sep 17 00:00:00 2001 From: Severin Neumann Date: Wed, 19 Jun 2024 18:05:36 +0200 Subject: [PATCH 3/3] Update content/en/docs/languages/php/exporters.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/docs/languages/php/exporters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/languages/php/exporters.md b/content/en/docs/languages/php/exporters.md index 7dd50a0190c0..d92534747a99 100644 --- a/content/en/docs/languages/php/exporters.md +++ b/content/en/docs/languages/php/exporters.md @@ -8,7 +8,7 @@ cSpell:ignore: fastcgi pecl {{% alert title="Note" color="info" %}} -If you use [zero-code instrumentation](/docs/zero-code/php/) you can setup +If you use [zero-code instrumentation](/docs/zero-code/php/) you can set up exporters with [zero-code configuration to setup exporters](/docs/zero-code/php#zero-code-configuration-for-automatic-instrumentation).