Skip to content

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

Merged
shreyamalpani merged 3 commits intojordan.gonzalez/bottlecap/universal-instrumentationfrom
shreya.malpani/network-enhanced-metrics
Oct 23, 2024
Merged

[SVLS-5714] Add lambda network enhanced metrics#424
shreyamalpani merged 3 commits intojordan.gonzalez/bottlecap/universal-instrumentationfrom
shreya.malpani/network-enhanced-metrics

Conversation

@shreyamalpani
Copy link
Copy Markdown
Contributor

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
Comment thread bottlecap/src/proc/mod.rs Outdated
Comment thread bottlecap/src/proc/mod.rs Outdated
Comment thread bottlecap/src/metrics/enhanced/lambda.rs Outdated
Comment thread bottlecap/src/proc/mod.rs Outdated
Comment thread bottlecap/src/metrics/enhanced/lambda.rs Outdated
Comment thread bottlecap/src/metrics/enhanced/lambda.rs Outdated
);
lambda_enhanced_metrics.increment_invocation_metric();
let mut p = invocation_processor.lock().await;
p.on_invoke_event(request_id);
Copy link
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
Contributor

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

Comment thread bottlecap/src/proc/mod.rs Outdated
Comment thread bottlecap/src/proc/mod.rs Outdated
Comment thread bottlecap/src/proc/mod.rs Outdated
Copy link
Copy Markdown
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
@shreyamalpani shreyamalpani deleted the shreya.malpani/network-enhanced-metrics branch October 23, 2024 20:33
duncanista pushed a commit that referenced this pull request Nov 15, 2024
* send network enhanced metrics

* naming fixes

* reformatting reading data from proc
duncanista pushed a commit that referenced this pull request Nov 19, 2024
* send network enhanced metrics

* naming fixes

* reformatting reading data from proc
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