humanmade / humanmade/aws-xray
Trouble getting aws-xray running with Dockerized bedrock based WP instance
- Dominant language
- PHP
- Stars
- 29
- Forks
- 3
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 1
Description
Howdy folks,
I really enjoyed your [recent video](https://www.youtube.com/watch?v=-YAOrixzb-A)!
I struggled to get this plugin up and running in my local dev environment and have a few questions.
Here are the steps I took to get things up and running. My WP directory structure is [based on Bedrock](https://roots.io/bedrock/)
1. installed aws-xray by running `composer require humanmade/aws-xray` which adds the plugin to `/vendor/humanmade/aws-xray`
2. Added an mu-plugin to load the plugin
A few things of note below.
- mu-plugins exists in /web/app/mu-plugins with Bedrock - hence why the base path travels up 3 directories
- I manually called namespace.php and plugin.php based on the [very useful feedback](https://github.com/humanmade/aws-xray/issues/101#issuecomment-2239000148) provided by @mikelittle in #101
- given the plugin enqueues flamegraph.js using `plugin_dir_url` i'm confused as to how loading the plugin via composer in the vendor directory would ever fully work?
```
wp_enqueue_script( 'aws-xray-flamegraph', plugin_dir_url( dirname( __FILE__, 2 ) ) . 'assets/flamegraph.js', [], '2022-10-10' );
```
I ended up proxying those requests in my mu-plugin to save having to manually copy flamegraph.js into the plugins dir - crude - but it works :)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading inc/namespace.php, plugin.php, and assets/flamegraph.js to understand the Composer and asset-loading assumptions described in the report. Verify the installation flow for a Bedrock-based WordPress instance with Docker, then document the supported setup and confirm that the plugin and flamegraph asset load without manual copying or proxying.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker, php, wordpress
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100