arku31/roadrunner-newrelic

Implementation of the communication between the golang and php sides of roadrunner

Installs: 10 583

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 3

Forks: 0

Open Issues: 0

pkg:composer/arku31/roadrunner-newrelic

0.1.5 2022-02-21 09:59 UTC

This package is auto-updated.

Last update: 2025-09-21 17:34:48 UTC


README

Usage

$transactionDetail = new TransactionDetail();
$transactionDetail->setName('test');
$transactionDetail->setCustomData('key', 'value');

$segment = new Segment();
$segment->setName('testSegment');
$segment->setDuration('1');
$segment->setMeta(['testmetakey' => 'testmetavalue']);

$transactionDetail->addSegment($segment);

$enricher = new EnrichResponse(new TransactionDetailTransformer());
$response = $enricher->enrich($response, $transactionDetail);

Note: Duration tracking is not available atm due to restriction of the newrelic golang library.

Transaction can be marked as ignored with

$transactionDetail->ignoreTransaction();

In this case, roadrunner will not send this transaction to newrelic. This is useful f.e. for some health endpoints

License: MIT

See https://github.com/arku31/newrelic-roadrunner-sample for example