Skip to content

Conversation

basepi
Copy link
Contributor

@basepi basepi commented Sep 21, 2022

What does this pull request do?

  1. Collects metrics once per lambda invocation. Disables breakdown and CPU metrics, so only custom metrics and prometheus metrics will be collected.
  2. Allows MetricSet classes to be added to the MetricsRegistry. This allows inline metrics to be created, rather than relying on importing based on the class path.
  3. Renames MetricsSet to MetricSet for consistency.

Remaining:

  • Add docs for custom metrics
  • Manual testing for AWS lambda
  • Write some unit tests
  • Rename _metrics to metrics so we're not accessing a private attribute?

Related issues

Closes #1534

@ghost
Copy link

ghost commented Sep 21, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-10-12T23:07:57.586+0000

  • Duration: 44 min 8 sec

Test stats 🧪

Test Results
Failed 0
Passed 5039
Skipped 3461
Total 8500

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /test linters : Run the Python linters only.

  • /test full : Run the full matrix of tests.

  • /test benchmark : Run the APM Agent Python benchmarks tests.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@ghost
Copy link

ghost commented Sep 21, 2022

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (68/68) 💚
Files 100.0% (228/228) 💚
Classes 100.0% (228/228) 💚
Lines 91.022% (18097/19882) 👍 0.016
Conditionals 74.555% (2804/3761) 👍
@basepi basepi marked this pull request as ready for review October 3, 2022 21:39
@basepi
Copy link
Contributor Author

basepi commented Oct 3, 2022

I still need to do some testing around AWS lambda use, but I added a unit test and some docs. The docs in particular could use some review.

@basepi basepi requested review from beniwohli and bmorelli25 October 3, 2022 21:39
@basepi basepi requested review from beniwohli and bmorelli25 October 5, 2022 00:29
@basepi
Copy link
Contributor Author

basepi commented Oct 5, 2022

/test linters

@basepi
Copy link
Contributor Author

basepi commented Oct 5, 2022

Ah, lint is failing as referenced in #1658

Co-authored-by: Benjamin Wohlwend <bw@piquadrat.ch>
@basepi basepi requested a review from beniwohli October 12, 2022 17:13
Copy link
Contributor

@beniwohli beniwohli left a comment

Choose a reason for hiding this comment

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

Awesome work!

@basepi basepi enabled auto-merge (squash) October 12, 2022 23:07
@basepi basepi merged commit 8b88555 into elastic:main Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants