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

[SVLS-5714] Add lambda network enhanced metrics #424

Conversation

shreyamalpani
Copy link

What does this PR do?

This PR introduces three new enhanced lambda metrics. Each of the metrics are emitted once per invocation and represent network usage by the lambda function.

The three new metrics are:

  • aws.lambda.enhanced.rx_bytes - bytes received by the function
  • aws.lambda.enhanced.tx_bytes - bytes transmitted by the function
  • aws.lambda.enhanced.total_network - sum of aws.lambda.enhanced.rx_bytes and aws.lambda.enhanced.tx_bytes

Describe how to test/QA changes

Additional Notes

  • Will implement the structure to store the offsets for the different types of metrics together in the next PR

@shreyamalpani shreyamalpani requested a review from a team as a code owner October 22, 2024 21:36
@@ -375,6 +375,9 @@ async fn extension_loop_active(
request_id, deadline_ms, invoked_function_arn
);
lambda_enhanced_metrics.increment_invocation_metric();
let mut p = invocation_processor.lock().await;
p.on_invoke_event(request_id);
Copy link
Contributor

Choose a reason for hiding this comment

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

Wonder since this is always invoked first, if we might need to change the constructor for the context buffer, simplifying our logic. As I'm not sure if this would guarantee us to always have this operation to exist before any other hook from the telemetry API, we might need some experiment to check!

Copy link
Author

Choose a reason for hiding this comment

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

Had a discussion about this with Jordan, will do in a future PR!

@duncanista
Copy link
Contributor

Amazing work, this is taking a much much better form! 🎉

Copy link
Contributor

@duncanista duncanista left a comment

Choose a reason for hiding this comment

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

Left some non-blocking comments! Amazing work

@shreyamalpani shreyamalpani merged commit ada1414 into jordan.gonzalez/bottlecap/universal-instrumentation Oct 23, 2024
20 checks passed
@shreyamalpani shreyamalpani deleted the shreya.malpani/network-enhanced-metrics branch October 23, 2024 20:33
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

Successfully merging this pull request may close these issues.

2 participants