Skip to content

Commit

Permalink
Merge branch 'main' into opentelemetrybot/auto-update-registry-9ef3f5…
Browse files Browse the repository at this point in the history
…40f8a494f0de445aed3544217e8095f5d4
  • Loading branch information
svrnm authored Jun 20, 2024
2 parents 4a2054a + d07e234 commit 77f1438
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 23 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion content/en/blog/2023/php-auto-instrumentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/concepts/instrumentation/zero-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
6 changes: 3 additions & 3 deletions content/en/docs/languages/php/exporters.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}}

Expand Down
15 changes: 8 additions & 7 deletions content/en/docs/languages/php/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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:

Expand Down Expand Up @@ -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/).
Expand Down
6 changes: 1 addition & 5 deletions content/en/docs/languages/php/libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Original file line number Diff line number Diff line change
@@ -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
---
Expand All @@ -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
Expand Down Expand Up @@ -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).

0 comments on commit 77f1438

Please sign in to comment.