# What additional steps need to be performed for Laravel?

**URL:** <https://discuss.elastic.co/t/what-additional-steps-need-to-be-performed-for-laravel/309919>\
**Category:** APM\
**Tags:** docker, php\
**Created:** [July 18, 2022, 3:08pm UTC](https://discuss.elastic.co/t/what-additional-steps-need-to-be-performed-for-laravel/309919 "2022-07-18T15:08:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhishek\_Sharma1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhishek_sharma1/32/98478_2.png) [@Abhishek\_Sharma1](https://discuss.elastic.co/u/Abhishek_Sharma1)\
**Post date:** [July 18, 2022, 3:08pm UTC](https://discuss.elastic.co/t/what-additional-steps-need-to-be-performed-for-laravel/309919/1 "2022-07-18T15:08:36Z")

</div>

I recently installed a _dockerized_ Laravel application. I followed the instructions as mentioned here: [apm-agent-php/setup.asciidoc at main · elastic/apm-agent-php · GitHub](https://github.com/elastic/apm-agent-php/blob/main/docs/setup.asciidoc) inside my Docker container. My container is using Ubuntu while my host machine is Windows.

Somehow, requests made to my Laravel application from my browser (accessed from my host machine) are not getting recorded in my Elastic Cloud APM instance. I would like to notify you that Transactions are getting recorded if I run any Command from the CLI of my container. For example, if run `php artisan config:clear`, then the info is accurately recorded in my Cloud instance:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/d/2df669919033b14708e106cfcc01be53da463dfc.png)

Am I missing some additional step in order to send Transactional data from Laravel?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 8, 2022, 11:08am UTC](https://discuss.elastic.co/t/what-additional-steps-need-to-be-performed-for-laravel/309919/2 "2022-08-08T11:08:46Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [December 2, 2022, 7:49am UTC](https://discuss.elastic.co/t/what-additional-steps-need-to-be-performed-for-laravel/309919/3 "2022-12-02T07:49:11Z")

</div>



---

<div class="post-metadata">

**Author:** ![Peter\_Elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/peter_elastic/32/91235_2.png) [@Peter\_Elastic](https://discuss.elastic.co/u/Peter_Elastic)\
**Post date:** [December 4, 2022, 10:18am UTC](https://discuss.elastic.co/t/what-additional-steps-need-to-be-performed-for-laravel/309919/4 "2022-12-04T10:18:17Z")

</div>

Hi Abhishek Sharma,

What version of the agent are you using? It looks like you are using an older version of the APM Agent. Version 1.5.x/16.x onwards also saves the artisan command that is being run. So not only artisan.

PDO/MySQL queries are measured out of the box within the transaction. The handle itself is not processed as a span at this moment unless there is an error. Than the handle() command will be shown in the error with the stack trace.

We currently have auto instrumentation at Laravel for queries, errors, curl commands. We are working on a feature called inferred spans, where more auto instrumentation for slow methods is being traced.

That being said, do you have any output when you set this into a view?

```auto
{{ Elastic\Apm\ElasticApm::getCurrentTransaction()->getTraceId() }}

```

If an error is being shown then the APM Agent is not being triggered. If you a php\_info(); file does it show the outputs of the APM agent?
