Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lambda runtime segments appearing in traces #38

Closed
bonybrown opened this issue Nov 25, 2019 · 3 comments
Closed

Lambda runtime segments appearing in traces #38

bonybrown opened this issue Nov 25, 2019 · 3 comments

Comments

@bonybrown
Copy link
Contributor

Adding x-ray instrumentation to a lambda causes segments in the trace that are due to the lambda runtime, like this:

image

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.

@bonybrown
Copy link
Contributor Author

PR #39 ready for review.

@srprash
Copy link
Contributor

srprash commented Jan 10, 2020

Reopening since the fix is pending release.

@srprash srprash reopened this Jan 10, 2020
@srprash
Copy link
Contributor

srprash commented Apr 2, 2020

This issue is fixed in v0.11.4

@srprash srprash closed this as completed Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants