Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Add possibility to setup custom request #74

Merged
merged 1 commit into from
May 3, 2019

Conversation

ricco24
Copy link
Contributor

@ricco24 ricco24 commented May 1, 2019

In some cases it can be useful to have opportunity setup custom request data.

E.g. I have custom proxy setup with another IP forwarding and need to change $remote_address before i send data to APM agent.

$transaction = $agent->getTransaction('myTransaction');
$request = $transaction->generateRequest();
$request['socket']['remote_address'] = $_SERVER['HTTP_X_REAL_IP'];
$transaction->setRequest($request);
$agent->send();

Copy link
Owner

@philkra philkra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@philkra philkra merged commit 124b6ca into philkra:master May 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants