Syntax
newrelic_get_linking_metadata()
Returns a collection of metadata necessary for linking data to a trace or an entity.
Requirements
Requires PHP agent version 9.3 or higher.
Must be called inside a transaction.
Description
This call returns an opaque map of key-value pairs that can be used to correlate this application to other data in the New Relic backend.
Examples
Create a linking payload
Obtains the linking data and encodes it as JSON for exporting to tooling:
if (extension_loaded('newrelic')) { $linking_md = newrelic_get_linking_metadata(); $payload = json_encode($linking_md);}
For more help
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's and and documentation.