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

APM UI changes for serverless services / AWS lambda #122775

Merged
merged 30 commits into from
Jan 31, 2022

Conversation

gbamparop
Copy link
Contributor

@gbamparop gbamparop commented Jan 12, 2022

Closes #106552

Requires elastic/apm-server#6576 to properly work with metric documents.

Summary

Some APM agents now support AWS lambda instrumentations. In this context some of the data is not available while some additional, serverless-specific information is available that is very valuable for APM use cases. This PR contains UI changes to reflect these aspects for serverless services.

With AWS lambda currently all kind of metric collection are disabled at the agents. Thus, metrics for system, JVM, transaction breakdown are not available.

Screen.Recording.2022-01-28.at.12.18.52.mov

Changes

  • Added meta-information for AWS lambda services in the service-icons panel
    image

  • Added cloud.service.name and cloud.region (before only availability zone was shown) as additional info being shown in cloud metainfo section
    image

  • Replaced transaction breakdown chart with cold start rate chart for serverless services

    • In service overview
      image

    • In transactions overview
      image

    • In transaction details
      image

  • Added cold start badge to waterfall transaction items (when they represent cold start requests)
    image

  • Added cold start badge to transaction flyout (when it represents cold start requests)
    image

  • Hidden metrics-related views (for which metrics are not available)

    • Instances latency distribution chart and instance table
    • Metrics and JVM tab

Testing

Synthtrace

Run the following scenario with synthrace CLI

aws_lambda_with_multiple_functions.ts.zip

Cloud

@gbamparop can help to set this up.

  1. Create a deployment using the latest snapshot (e.g. 8.1.0-SNAPSHOT)
  2. Add lambda extension and instrument a lambda function by following this guide
  3. Invoke the lambda function to ingest data in APM
  4. Connect local kibana instance to the cloud

Todo

@gbamparop
Copy link
Contributor Author

@elasticmachine merge upstream

@gbamparop gbamparop force-pushed the aws-lambda branch 5 times, most recently from 5330d2f to e34bd5b Compare January 12, 2022 16:17
@dannycroft dannycroft added Team:APM All issues that need APM UI Team support v8.1.0 labels Jan 17, 2022
@gbamparop gbamparop force-pushed the aws-lambda branch 2 times, most recently from 6d14201 to 53a3bf9 Compare January 19, 2022 15:11
@gbamparop
Copy link
Contributor Author

gbamparop commented Jan 19, 2022

@formgeist shall we add the coldstart badge to the transaction flyout as well? Also, if there's a requirement to have a beta badge for this piece of work where do you think it's the best place to add it?

@formgeist
Copy link
Contributor

formgeist commented Jan 19, 2022

@formgeist shall we add the coldstart badge to the transaction flyout as well?

Yes, I think it makes sense similar to the async badge in this example;

CleanShot 2022-01-19 at 19 32 42@2x

Also, if there's a requirement to have a beta badge for this piece of work where do you think it's the best place to add it?

I think the only place where I think it has the most impact is when the user clicks on the Lambda service icon and looks at the content. So adding a EuiBetaBadge (EUI docs) which will show a tooltip on hover.

Slice 1

cc @alex-fedotyev

@gbamparop
Copy link
Contributor Author

@formgeist thanks, I'll get those added

@gbamparop gbamparop added auto-backport Deprecated - use backport:version if exact versions are needed release_note:feature Makes this part of the condensed release notes labels Jan 20, 2022
@gbamparop gbamparop marked this pull request as ready for review January 20, 2022 18:11
@gbamparop gbamparop requested a review from a team as a code owner January 20, 2022 18:11
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@gbamparop
Copy link
Contributor Author

@elasticmachine merge upstream

@alex-fedotyev
Copy link

@gbamparop - do you know why docker icon is displayed next to lambda icon on some of the screenshots?
Is that discrepancy in your test data, or something we need to have logic for to better prioritize?

cc @AlexanderWert

@AlexanderWert
Copy link
Member

do you know why docker icon is displayed next to lambda icon on some of the screenshots?
Is that discrepancy in your test data, or something we need to have logic for to better prioritize?

I'd guess it's because the data comes from Synthtrace which in addition to the Lambda fields also generated some docker fields. Shouldn't happen with real data.

@gbamparop correct me if I'm wrong.

@formgeist
Copy link
Contributor

On a related note, has anyone opened an issue for adding a Lambda service to our fleet of Opbeans test data for continued testing?

@gbamparop
Copy link
Contributor Author

gbamparop commented Jan 25, 2022

do you know why docker icon is displayed next to lambda icon on some of the screenshots?
Is that discrepancy in your test data, or something we need to have logic for to better prioritize?

I'd guess it's because the data comes from Synthtrace which in addition to the Lambda fields also generated some docker fields. Shouldn't happen with real data.

@gbamparop correct me if I'm wrong.

This is it, I've put as much data as I could in synthrace to help write some tests.

@gbamparop gbamparop closed this Jan 25, 2022
@gbamparop gbamparop reopened this Jan 25, 2022
@gbamparop
Copy link
Contributor Author

@gbamparop Do you think it's possible that when we list out badges that just keep the badges to float as exemplified here;

As discussed we decided to go with the current version for now as there can be several functions with large names and the popup can get quite large.

@gbamparop gbamparop enabled auto-merge (squash) January 31, 2022 10:37
@gbamparop gbamparop merged commit 78643f4 into elastic:main Jan 31, 2022
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1180 1183 +3

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 2.8MB 2.8MB +6.0KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @gbamparop

@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jan 31, 2022
@kibanamachine
Copy link
Contributor

💔 Backport failed

The pull request could not be backported due to the following error:
There are no branches to backport to. Aborting.

How to fix

Re-run the backport manually:

node scripts/backport --pr 122775

Questions ?

Please refer to the Backport tool documentation

@kpatticha
Copy link
Contributor

@gbamparop
Copy link
Contributor Author

@gbamparop do you think the scenario aws_lambda_with_multiple_functions.ts.zip would be useful as an example in https://github.com/gbamparop/kibana/tree/aws-lambda/packages/elastic-apm-synthtrace/src/scripts/examples ?

I think that the intention was to just have a few generic examples as a base point in that folder so didn't add that in. Happy to get it added if this is what we aim for. @dgieselaar what do you think?

@gbamparop gbamparop added the apm:test-plan-done Pull request that was successfully tested during the test plan label Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:lamba-extension APM UI label for all Lambda support apm:test-plan-done Pull request that was successfully tested during the test plan auto-backport Deprecated - use backport:version if exact versions are needed backport:skip This commit does not require backporting release_note:feature Makes this part of the condensed release notes Team:APM All issues that need APM UI Team support v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] UI changes for AWS Lambda support
10 participants