Before You Begin
Ensure your deployment has:
- An AWS Lambda function instrumented with the Java Serverless Tracer.
- Active EUM licenses and JavaScript agents.
Add and Return EUM Metadata
To integrate EUM with the tracer, you need to query the transaction
object
and return EUM metadata.
Call the method below after stopping a transaction. Assign each string separately, in the order specified, to the headers ADRUM_0, ADRUM_1, ADRUM_2, and ADRUM_3 for consumption by the downstream JavaScript Agent.
public void stopTransactionAndRecordEUM(OutputStream output) throws IOException {
Transaction transaction = getTransaction();
// Your AWS Lambda function code
//You must call transaction.stop(); before calling transaction.getEumMetadata();
transaction.stop();
// call transaction.getEumMetadata(); function to query transaction object for EUM metadata
List<String> eumMetadata = transaction.getEumMetadata();