Skip to content

Conversation

@nmoutschen
Copy link
Contributor

@nmoutschen nmoutschen commented Feb 16, 2022

Issue #, if available:

Closes #392
Closes #396

Description of changes:

Register the extension with the logs API, boot an http server in a new tokio task, and process incoming logs.

By submitting this pull request

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.

calavera and others added 13 commits January 22, 2022 12:55
Signed-off-by: David Calavera <david.calavera@gmail.com>
- Reorganize builder to support more options
- Use no-op processors to play nice with generic types

Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
Send request to the Lambda API to subscribe the extension to the logs API.
Use the 2021-03-18 schema version to receive all new log types.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
Copy link
Contributor

@calavera calavera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nmoutschen can you update the README.md in the lambda-extension directory with information about the logs api support?

@nmoutschen
Copy link
Contributor Author

@nmoutschen can you update the README.md in the lambda-extension directory with information about the logs api support?

Done! I've added a simple example with a logs processor.

@nmoutschen nmoutschen marked this pull request as ready for review February 16, 2022 19:29
@nmoutschen nmoutschen marked this pull request as draft February 16, 2022 19:53
@nmoutschen nmoutschen marked this pull request as ready for review February 16, 2022 19:57
@nmoutschen nmoutschen changed the title [WIP] Logs api connection feat(lambda-extension): Logs API processor Feb 16, 2022
Copy link
Contributor

@calavera calavera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤘

@@ -0,0 +1,23 @@
use lambda_extension::{service_fn, Error, Extension, LambdaLog, LambdaLogRecord, SharedService};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this example is so good! 🙀

@@ -0,0 +1,51 @@
use lambda_extension::{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another great example! 😻

@calavera calavera merged commit bc9367b into master Feb 16, 2022
@calavera calavera deleted the logs_api_connection branch February 16, 2022 21:43
@nmoutschen nmoutschen added the 0.5 label Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC] Lambda Logs API Integration Lambda Logs API?

2 participants