Skip to content

[SVLS-8581] feat: Add durable_function:true tag to enhanced metrics#1048

Merged
lym953 merged 6 commits intomainfrom
yiming.luo/metrics-durable-tag
Feb 26, 2026
Merged

[SVLS-8581] feat: Add durable_function:true tag to enhanced metrics#1048
lym953 merged 6 commits intomainfrom
yiming.luo/metrics-durable-tag

Conversation

@lym953
Copy link
Copy Markdown
Contributor

@lym953 lym953 commented Feb 25, 2026

Overview

When the Lambda function's runtime version contains "RuntimeVersion", add the tag durable_function:true to enhanced metrics generated by the extension, so the facet durable_function appears on Serverless View.

Sample value of runtime version:

  • Python: python:3.14.DurableFunction.v9
  • Node.js: nodejs:24.DurableFunction.v10

Testing

Steps

  1. Build a layer and install it on a durable function
  2. Invoke it
  3. Check Serverless view

Result

  1. When I search by durable_function:true, the function appears in the result.
image
  1. A facet durable_function appears on the sidebar.
image
  1. When I search by -durable_function:true, other functions appear in the result.
image

@lym953 lym953 changed the title [SVLS-8581] feat: Add durable_function:true tag for enhanced metrics [SVLS-8581] feat: Add durable_function:true tag to enhanced metrics Feb 25, 2026
@lym953 lym953 requested a review from helen278 February 25, 2026 22:58
@lym953 lym953 force-pushed the yiming.luo/metrics-durable-tag branch from fe9e018 to 7784a8d Compare February 25, 2026 22:58
@lym953 lym953 marked this pull request as ready for review February 25, 2026 22:58
@lym953 lym953 requested a review from a team as a code owner February 25, 2026 22:58
pub fn on_platform_init_start(&mut self, time: DateTime<Utc>) {
pub fn on_platform_init_start(&mut self, time: DateTime<Utc>, runtime_version: Option<String>) {
if let Some(ref rv) = runtime_version {
debug!("Runtime version: {}", rv);
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.

Is this debug log required? It always appear at the top of the platform init start

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.

I don't have a strong opinion. I added this in case AWS changes the format one day. But that should be able to be captured by e2e tests when they are ready. Let me remove it then.

Copy link
Copy Markdown

@helen278 helen278 left a comment

Choose a reason for hiding this comment

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

LGTM but are there links for me to test this in the UI? (or is this just your local)? I noticed screenshots.

@lym953
Copy link
Copy Markdown
Contributor Author

lym953 commented Feb 26, 2026

@helen278 Here's the link.

However, sometimes it somehow stops working and recovers later. I'll investigate further.

lym953 and others added 6 commits February 26, 2026 16:01
…n runtimes

When the PlatformInitStart payload contains a runtime_version field with
"DurableFunction" (e.g. "python:3.14.DurableFunction.v6"), set the tag
durable_function:true on all enhanced metrics generated by the extension.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lym953 lym953 force-pushed the yiming.luo/metrics-durable-tag branch from d44d995 to 3c50d85 Compare February 26, 2026 21:05
@lym953 lym953 merged commit de0e7a0 into main Feb 26, 2026
11 of 15 checks passed
@lym953 lym953 deleted the yiming.luo/metrics-durable-tag branch February 26, 2026 21:05
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.

3 participants