`pyroscope exec` fails silently & PHP examples are broken - Pyroscope 1.0.0
- Dominant language
- Go
- Stars
- 11.7k
- Forks
- 802
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 80
Description
#### Describe the bug
The PHP examples in https://github.com/grafana/pyroscope/tree/main/examples/php use `pyroscope exec`, which was removed in Pyroscope 1.0.0.
#### To Reproduce
@petethepig Updated this documentation in #2314, which breaks the examples, since the updated Pyroscope version in docker.io/grafana/pyroscope removed this command.
The change can be seen here:
https://github.com/grafana/pyroscope/pull/2314/files#diff-a5370a03fb6a7b0bb661f6cde62da21900bd91e734ef831c53c1758f0e46585a
When running this updated example, a Pyroscope Server is run, not an Agent, the exec argument is silently ignored, and the php code is never run.
#### Expected behavior
`pyroscope exec` should not fail silently
How should PHP applications be instrumented going forward?
#### Environment
- Infrastructure: Kubernetes, php-fpm
- Deployment tool: docker.io/grafana/pyroscope:1.0.0
#### Additional Context
Container logs from running a container with `ENTRYPOINT ["pyroscope", "exec", "-spy-name", "phpspy", "php-fpm"]` in Kubernetes:
```
/ _|
__ _ _ __ __ _| |_ __ _ _ __ __ _ _ __ _ _ _ __ ___ ___ ___ ___ _ __ ___
/ _' | '__/ _' | _/ _' | '_ \ / _' | | '_ \| | | | '__/ _ \/ __|/ __/ _ \| '_ \ / _ \
| (_| | | | (_| | || (_| | | | | (_| | | |_) | |_| | | | (_) \__ \ (_| (_) | |_) | __/
\__, |_| \__,_|_| \__,_|_| |_|\__,_| | .__/ \__, |_| \___/|___/\___\___/| .__/ \___|
__/ | | | __/ | | |
|___/ |_| |___/ |_|
ts=2023-09-18T16:48:56.827654105Z caller=server.go:335 level=info msg="server listening on addresses" http=[::]:4040 grpc=[::]:9095
ts=2023-09-18T16:48:56.839121592Z caller=worker.go:113 level=info component=querier-worker msg="Starting querier worker connected to query-scheduler" scheduler=
ts=2023-09-18T16:48:56.839960983Z caller=memberlist_client.go:434 level=info msg="Using memberlist cluster label and node name" cluster_label= node=xxxxxx-79d5ccdb45-tmtwp-8a1fa00a
ts=2023-09-18T16:48:56.846653749Z caller=module_service.go:82 level=info msg=initialising module=server
ts=2023-09-18T16:48:56.848346783Z caller=module_service.go:82 level=info msg=initialising module=memberlist-kv
ts=2023-09-18T16:48:56.848568564Z caller=module_service.go:82 level=info msg=initialising module=overrides-exporter
ts=2023-09-18T16:48:56.848847694Z caller=module_service.go:82 level=info msg=initialising module=ring
ts=2023-09-18T16:48:56.849022295Z caller=module_service.go:82 level=info msg=initialising module=usage-stats
ts=2023-09-18T16:48:56.849245445Z caller=module_service.go:82 level=info msg=initialising module=query-scheduler
ts=2023-09-18T16:48:56.849488297Z caller=module_service.go:82 level=info msg=initialising module=ingester
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the examples/php directory and the changes from pull request #2314, then inspect the Docker ENTRYPOINT using `pyroscope exec` with Pyroscope 1.0.0. Confirm how the image handles `php-fpm` and determine the supported PHP instrumentation path. Done means the PHP examples run the application under the supported setup and no longer silently ignore the command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, kubernetes, php
- Domain
- devops, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100