[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/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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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/)
|
||||
|
|
|
|||
|
|
@ -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 set up
|
||||
exporters with
|
||||
[zero-code configuration to setup exporters](/docs/zero-code/php#zero-code-configuration-for-automatic-instrumentation).
|
||||
|
||||
{{% /alert %}}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <http://localhost:8080/rolldice> 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/).
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
Loading…
Reference in New Issue