Syntax
NewRelic.Api.Agent.NewRelic.GetLinkingMetadata();
Returns key/value pairs which can be used to link traces or entities.
Requirements
Agent version 8.19 or higher.
Compatible with all app types.
Description
The Dictionary of key/value pairs returned includes items used to link traces and entities in the APM product. It will only contain items with meaningful values. For instance, if distributed tracing is disabled, trace.id
will not be included.
Return values
Dictionary <string, string>() returned includes items used to link traces and entities in the APM product.
Examples
NewRelic.Api.Agent.IAgent Agent = NewRelic.Api.Agent.NewRelic.GetAgent();var linkingMetadata = Agent.GetLinkingMetadata();foreach (KeyValuePair<string, string> kvp in linkingMetadata){ Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value);}
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.