PHP functions and URLS?

I am not sure if I have set things up correctly, but I am only getting traces of mysql queries, not php functions. It is helpful, but would help even more if I knew which functions are called etc.

Also, the application I have setup have "messy urls", and therefor (I guess?) I more or less only have transactions for index.php. Is it possible to get also the query string?

I think the query string also gets collected. Do you see it when you click on the transaction' metadata?

If yes you only need to override the defaults a bit to get a solution for both of your questions

Hi,

Seems that I can't find the query string, when click on the transaction metadata I get this:

It could be how we run the application that could be the issue? The application, Matomo, is running on Kubernernetes and in one container we run Matomo (alpine php-fpm) and nginx in another. I guess I do not get all the information because of that?

That image maybe didn't say so much maybe, but only this metadata is available:

###### Trace

**trace.id** 70c7f975f2e87e19c75462b9984b1bea

###### Transaction

**transaction.id** 3b7e4a2427b772b7

###### Host

**host.ip** 10.128.0.10

###### Service

|**service.language.name**|PHP|
| --- | --- |
|**service.language.version**|7.4.15|
|**service.name**|AF|
|**service.runtime.name**|PHP|
|**service.runtime.version**|7.4.15|

###### Process

**process.pid** 71

###### Agent

|**agent.name**|php|
| --- | --- |
|**agent.version**|1.0.0|

###### User

No data available

Okay in that case you need to use the API to set the transaction names based on the query string yourself'

Hi @EwertTheDragon! Welcome to our community!

Regarding missing query string - you are right, it's indeed missing. As @Felix_Roessel correctly pointed out it should be displayed at the Transaction details flyout. I've opened a bug (#389) - thank you very much for reporting it. We will release a new version with the fix ASAP.

Regarding query string not being included in transaction's name - this is as expected according to the spec. I agree with @Felix_Roessel - the best way to include any info in transaction's name is to use the agent's public API. At any point in your code you can call:

ElasticApm::getCurrentTransaction()->setName('my custom TX name');

Hi @EwertTheDragon. We released 1.0.1 version of the agent that contains the fix for missing query string bug. Please give it a try and let us know how it works out for you.

1 Like