-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP: Updates to instrumentation docs #3855
Conversation
Signed-off-by: svrnm <[email protected]>
To highlight the difference between instrumenting a _library_ and a standalone | ||
_app_, split out the dice rolling into a _library file_, which then will be | ||
imported as a dependency by the _app file_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd remove the italics here. Not needed.
_app_, split out the dice rolling into a _library file_, which then will be | ||
imported as a dependency by the _app file_. | ||
|
||
Create the _library file_ named `dice.php` and add the following code to it: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
|
||
The example also sets up the mandatory SDK default attribute `service.name`, | ||
which holds the logical name of the service, and the optional (but highly | ||
encouraged!) attribute `service.version`, which holds the version of the service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I've left similar comments in #3834 — we should sweep the docs everywhere to fix the issues...
[`Tracer`](/docs/concepts/signals/traces/#tracer). | ||
If a `TracerProvider` is not created, the OpenTelemetry APIs for tracing will | ||
use a no-op implementation and fail to generate data. As explained next, modify | ||
the `instrumentation.ts` (or `instrumentation.js`) file to include all the SDK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
js/node/browser references here. The filename references probably need index.php
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh... let me double check on that
Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]> Co-authored-by: Brett McBride <[email protected]>
Signed-off-by: svrnm <[email protected]>
Contributes to #3229, this updates the tracing instructions to follow a similar path what we have for some other languages already (JS was the example I took for reference). Note that my PHP knowledge is a little bit outdated, so if there are better ways to inject tracers etc advice me accordingly.