Closed keegoid-nr closed 2 months ago
Hi @keegoid-nr thanks for the details on this issue.
How often does this issue come up for you and what's its impact to your application/service?
Have you identified a workaround in the meantime?
@kford-newrelic The issue happens 100% of the time.
NR_LAMBDA_MONITORING
payload does not appear to cause any issues with New Relic's ingest of telemetry. It's possible we are doing some magic to parse the encoded telemetry and trim the escape chars automatically, because telemetry isn't missing from the New Relic UI.NR_LAMBDA_MONITORING
payload ought to be standardized across agents. The NodeJS and Python agents do not add escape chars into the payload when written to the console.NodeJS example payload:
[1,"NR_LAMBDA_MONITORING","H4sIAKGxdWIAA+1YWY/bNhB+968whD7akqhbfnOzW3SBoAlit31YLARKGrlsaEolKXudxf73UpK1kVXvAR9FGlcv1JDDOT7ODI+HwXCoLUHiFEusTYYPilY9mDNFVM0Er8WE4mWc4kkpxmsQcmxNbj9dX03fza+v7iZZyRJJcjb5vCwpxQw2Y0HFWFaMLE/hT4Gce23UyG2ZoxVwodpKyQ/vp/Pr2bxlgXtIypoH2IrwnC2ByYpv+vssel8bErVy9SfBBc9lnuS0Ixh52zG8UBK6GgMdmbqpqdHHikXb9V2hwUkSbTtv687hkCnnRtt/5LkoCEwLuXqA0L7eMGh72/ndv+FWVftpDC+hMmxWFkXOJY4JJXJj/FK7afzWWG4gR+tMexx1iNsdeWi0Q5rHkB3q7un/bnS8V9OioCTB1UobHwpghC2Mq5LXHQf6qSPb8gPPR+EZB0zke7ZlI8t3FIcTev8KQjeMSIIp+dKQxwJlOf7JukwPmWZ4ehSmH28MAbJJ+Z8xSynw7ykB5hwzgetyKIwZLKo6Jw5z0DqCdE7v4KzA7Hql3DHmucS0/hUzgEPD9dtavme8U5vUf9K7D/IP4J1YNH7a7tHGixv6gYXHNE3Lsh3XO9uAo4ehbbmBHdoejM3gDBDV6z4nS/gfq1exMjClFw3AU7BcFArtAeXHzTsVAMCNX9lnlq/Zs+2lhckhANWhdVEo9Y+EDNONJIloNt3v8njxoo/f0CFj0G23HmtCnY0iqIx96f78FQiNgwC+ygmPBPlSwWGp4PqqX6tliUhUq6uu9IOe42+6XctN0QCtjNNGvTGOE7hJq2HLgSyG2PJt27JC5KpbDUozK/N9bPqxifpTFyWp52HTCwLXi103DMGzYY+Kdi9oFPleEiYhznDqZbYVxv0JAi8LChWr5CX0BgtOcq7ipEJD91UOuqP9YXXgua4nTV0/YZHzSp22AAacJP/wT+1tQiqb6zeX9g0kCJ0eX9reWSfPlxCNcV0tON98zEn96rMHgQ6e+pkOsQ+71K5+vBZ68yCmn+mZbEcVh79KxdSEDmSugzInHXux540dL4jHQRiG49gJkiTwUxVW/j4hW3uTnKYzifkzyDIewX1CS0FWELXLFS0JpUTUq9YsWRe1V+oB3haz42qCysSTF4U1xFe7AVmlvR1Yb4zuPt9p0y59k2lPJ8uXMqqtfh2b+tqA85wrngxTsSfbji2Qr9W7V0vabkG89KR9S/oNqrHHwd9DSA6N3hcAAA=="]
This is how they generate it: https://github.com/newrelic/node-newrelic/blob/a07d045bdce148f60c0842ee4859052bbbdeff8a/lib/collector/serverless.js#L299-L315
Not selected for the Jan-Mar quarter.
Issue
Escape characters have to be removed before the payload can be base64 decoded.
Is this adding escape chars to NR_LAMBDA_MONITORING payload? https://github.com/newrelic/newrelic-lambda-tracer-java/blob/9db7d75b5cbcd070db4d6a321da464931ae166ef/src/main/java/com/newrelic/opentracing/util/ProtocolUtil.java#L107
Log output from function
Reproduce the error
Install a function with the NewRelicJava11 layer.
SAM config:
Copy
NR_LAMBDA_MONITORING
payload from CloudWatch logs or the function's log output on the Test page and attempt to decode it.After trimming escape chars from the payload, it can be decoded.
Expected behavior
It's worth noting that this only happens for the New Relic OpenTracing Java Agent. Both NodeJS and Python agents omit escape characters from the
NR_LAMBDA_MONITORING
payload.(Migrate to Jira)