Serverless instrumentation - #716
Closed
basepi wants to merge 34 commits into
Closed
Conversation
This function appears to have been replaced by Client.queue() anywhere that it actually matters. I can't find any code paths that actually use this function, which further makes DummyClient useless.
The http transport has wandered from the parent Transport class
I also let black restructure this file. I don't see anything semantically different with black's version and it does look nicer.
We're going to need context helpers and the like, makes sense for it to live in its own area
basepi
commented
Feb 20, 2020
basepi
marked this pull request as ready for review
February 20, 2020 23:28
basepi
commented
Feb 20, 2020
beniwohli
reviewed
Feb 21, 2020
| from elasticapm.conf import setup_logging # noqa: F401 | ||
| from elasticapm.contrib.serverless import capture_serverless # noqa: F401 | ||
| from elasticapm.instrumentation.control import instrument, uninstrument # noqa: F401 | ||
| from elasticapm.traces import ( # noqa: F401 |
Contributor
There was a problem hiding this comment.
IIRC, last time I did this, all our linters got into a kerfuffle. I think it was black and flake8 duking it out
Contributor
Author
There was a problem hiding this comment.
As far as I can tell, both are running on that file in my IDE and both are happy. Took some experimentation as to the location of the # noqa: F401 line (which is why I know both were running).
Could you try checking it out and see if your IDE gives you problems?
Since it's (usually) just `$LATEST`, it's not useful for annotations
This is already included in the framework_name (and the runtime info)
If it's relevant to a given user they can collect it as custom context or we can add it (config-gated) later
Contributor
Author
|
Closing for now. We will probably go a different direction (via Lambda extensions) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this pull request do?
Adds support for instrumenting serverless functions. Logs to CloudWatch so that those logs can be collected and sent to the APM Server later. Disables all background threads.
Note: This "works", but isn't useful without the connecting lambda from CloudWatch to the APM Server. Thus the lack of docs or references to this code.
Related issues
Ref #428