[IA] Move php automatic page to zero-code (#4716)
Signed-off-by: svrnm <neumanns@cisco.com> Co-authored-by: Fabrizio Ferri-Benedetti <fferribenedetti@splunk.com>
This commit is contained in:
parent
c719fe4443
commit
d07e234487
|
|
@ -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/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/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/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/en/ecosystem/demo/ @open-telemetry/demo-approvers @open-telemetry/demo-approvers
|
||||||
content/zh/ @open-telemetry/docs-maintainers @open-telemetry/docs-zh-approvers
|
content/zh/ @open-telemetry/docs-maintainers @open-telemetry/docs-zh-approvers
|
||||||
content/ja/ @open-telemetry/docs-maintainers @open-telemetry/docs-ja-approvers
|
content/ja/ @open-telemetry/docs-maintainers @open-telemetry/docs-ja-approvers
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ We have all necessary components in place:
|
||||||
and frameworks.
|
and frameworks.
|
||||||
- Development tools that can help lower barrier for users and developers
|
- Development tools that can help lower barrier for users and developers
|
||||||
interested in instrumenting arbitrary code.
|
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
|
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.
|
that will help us improve it, extend coverage and fix bugs.
|
||||||
|
|
|
||||||
|
|
@ -47,5 +47,5 @@ Automatic instrumentation is available for the following languages:
|
||||||
- [.NET](/docs/zero-code/net/)
|
- [.NET](/docs/zero-code/net/)
|
||||||
- [Java](/docs/zero-code/java/)
|
- [Java](/docs/zero-code/java/)
|
||||||
- [JavaScript](/docs/zero-code/js/)
|
- [JavaScript](/docs/zero-code/js/)
|
||||||
- [PHP](/docs/languages/php/automatic/)
|
- [PHP](/docs/zero-code/php/)
|
||||||
- [Python](/docs/languages/python/automatic/)
|
- [Python](/docs/languages/python/automatic/)
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ cSpell:ignore: fastcgi pecl
|
||||||
|
|
||||||
{{% alert title="Note" color="info" %}}
|
{{% alert title="Note" color="info" %}}
|
||||||
|
|
||||||
If you use [automatic instrumentation](/docs/languages/php/automatic/) you can
|
If you use [zero-code instrumentation](/docs/zero-code/php/) you can set up
|
||||||
setup exporters with
|
exporters with
|
||||||
[zero-code configuration to setup exporters](/docs/languages/php/automatic/#zero-code-configuration-for-automatic-instrumentation).
|
[zero-code configuration to setup exporters](/docs/zero-code/php#zero-code-configuration-for-automatic-instrumentation).
|
||||||
|
|
||||||
{{% /alert %}}
|
{{% /alert %}}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,13 @@ OpenTelemetry for PHP can be used to generate and export [traces][], [metrics][]
|
||||||
and [logs][].
|
and [logs][].
|
||||||
|
|
||||||
This page will show you how to get started with OpenTelemetry in PHP. We will
|
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
|
create a simple "roll the dice" application, then apply both zero-code and code
|
||||||
manual instrumentation to generate [traces][] and export them to the console. We
|
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.
|
will then emit some [logs][] which will also be sent to the console.
|
||||||
|
|
||||||
## Prerequisites
|
## 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
|
instrumentation will work with PHP 7.4
|
||||||
|
|
||||||
Ensure that you have the following installed:
|
Ensure that you have the following installed:
|
||||||
|
|
@ -86,10 +86,10 @@ php -S localhost:8080
|
||||||
Open <http://localhost:8080/rolldice> in your web browser to ensure it is
|
Open <http://localhost:8080/rolldice> in your web browser to ensure it is
|
||||||
working.
|
working.
|
||||||
|
|
||||||
## Add automatic instrumentation
|
## Add zero-code instrumentation
|
||||||
|
|
||||||
Next, you’ll use the OpenTelemetry PHP extension to
|
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
|
1. Since the extension is built from source, you need to install some build
|
||||||
tools
|
tools
|
||||||
|
|
@ -116,7 +116,8 @@ Next, you’ll use the OpenTelemetry PHP extension to
|
||||||
|
|
||||||
{{% alert title="Note" color="warning" %}}Alternative methods of installing
|
{{% alert title="Note" color="warning" %}}Alternative methods of installing
|
||||||
the extension are detailed in
|
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:
|
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:
|
For more:
|
||||||
|
|
||||||
- Run this example with another [exporter][] for telemetry data.
|
- 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/).
|
- 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
|
- Take a look at the [OpenTelemetry Demo](/docs/demo/), which includes the PHP
|
||||||
based [Quote Service](/docs/demo/services/quote/).
|
based [Quote Service](/docs/demo/services/quote/).
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ You can turn off any instrumentation by adding its identifier to the
|
||||||
## Available instrumentation libraries
|
## Available instrumentation libraries
|
||||||
|
|
||||||
For a list of available instrumentations, see
|
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.
|
on Packagist.
|
||||||
|
|
||||||
## Next steps
|
## Next steps
|
||||||
|
|
@ -49,7 +49,3 @@ custom telemetry data.
|
||||||
You might also want to configure an appropriate exporter to
|
You might also want to configure an appropriate exporter to
|
||||||
[export your telemetry data](/docs/languages/php/exporters) to one or more
|
[export your telemetry data](/docs/languages/php/exporters) to one or more
|
||||||
telemetry backends.
|
telemetry backends.
|
||||||
|
|
||||||
You can also check the
|
|
||||||
[automatic instrumentation for PHP](/docs/languages/php/automatic) for existing
|
|
||||||
library instrumentations.
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
---
|
---
|
||||||
title: Automatic Instrumentation
|
title: PHP zero-code instrumentation
|
||||||
linkTitle: Automatic
|
linkTitle: PHP
|
||||||
weight: 30
|
weight: 30
|
||||||
|
aliases: [/docs/languages/php/automatic]
|
||||||
# prettier-ignore
|
# prettier-ignore
|
||||||
cSpell:ignore: centos configurator democlass epel myapp pecl phar remi unindented userland
|
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
|
{{% alert title="Important" color="warning" %}}Installing the OpenTelemetry
|
||||||
extension by itself will not generate traces. You must also install the
|
extension by itself will not generate traces. You must also install the
|
||||||
[SDK](https://packagist.org/packages/open-telemetry/sdk) **and** one or more
|
[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
|
for the frameworks and libraries that you are using, or alternatively write your
|
||||||
own.
|
own.
|
||||||
|
|
||||||
You also _must_ use
|
You also _must_ use
|
||||||
[composer autoloading](https://getcomposer.org/doc/01-basic-usage.md#autoloading),
|
[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 %}}
|
themselves. {{% /alert %}}
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
@ -224,8 +225,8 @@ commonly used PHP libraries. For the full list, see
|
||||||
## Next steps
|
## Next steps
|
||||||
|
|
||||||
After you have automatic instrumentation configured for your app or service, you
|
After you have automatic instrumentation configured for your app or service, you
|
||||||
might want to add [manual instrumentation](../instrumentation) to collect custom
|
might want to add [manual instrumentation](/docs/languages/php/instrumentation)
|
||||||
telemetry data.
|
to collect custom telemetry data.
|
||||||
|
|
||||||
For more examples, see
|
For more examples, see
|
||||||
[opentelemetry-php-contrib/examples](https://github.com/open-telemetry/opentelemetry-php-contrib/tree/main/examples).
|
[opentelemetry-php-contrib/examples](https://github.com/open-telemetry/opentelemetry-php-contrib/tree/main/examples).
|
||||||
Loading…
Reference in New Issue