Lambda runtime segments appearing in traces
bonybrown opened this issue · 3 comments
bonybrown commented
Adding x-ray instrumentation to a lambda causes segments in the trace that are due to the lambda runtime, like this:
These shouldn't appear, and should be filtered out by XRay::NetHttp::HTTPInstanceInterceptor#lambda_runtime_request?
but the current implementation is not correct.
A correct implementation is below (can be used as a monkey-patch to fix the current sdk release)
module XRay
module NetHttp
module HTTPInstanceInterceptor
def lambda_runtime_request?(_req)
ENV['AWS_LAMBDA_RUNTIME_API'] == "#{address}:#{port}"
end
end
end
end
I'll create a PR for this. Just need the issue to reference.
srprash commented
Reopening since the fix is pending release.
srprash commented
This issue is fixed in v0.11.4