Commit cdf9084
feat(metrics): support to bring your own metrics provider (#2194)
* Use a different Metric class for different provider
* fix static checking error
* fix static checking error
* optimize docstring
* add alias CloudWatchEMF to original Metrics class
* add alias CloudWatchEMF to original Metrics class
* Move Metrics to Provider
* add sample document
* reformat code block
* add OTel provider draft for poc
* rebasing from upstream
* rebasing from upstream
* add test to metrics providers
* docstring + code coverage
* python annotations + imports
* fix docstring
polish datadog_provider
add flush_to_log parameter
remove OTEL provider draft
* add tests for datadog provider
* add tests for datadog provider
* migrate from ABC to protocol, support convert kwargs to tags, add test
* migrate from ABC to protocol, support convert kwargs to tags, add test
* migrate from ABC to protocol, support convert kwargs to tags, add test
* remove parent class, fix example
* base: fix small problems
* refactoring: removing Datadog provider
* refactoring: importing from typing_extensions
* refactoring EMF provider
* refactoring cloudwatchemf provider and cleaning code
* fix mypy error
* fix mypy error
* fix metric tests
* fix documentation
* adding test
---------
Signed-off-by: Leandro Damascena <[email protected]>
Co-authored-by: Leandro Damascena <[email protected]>
Co-authored-by: Leandro Damascena <[email protected]>
Co-authored-by: Cavalcante Damascena <[email protected]>1 parent 0916bc5 commit cdf9084
File tree
18 files changed
+1317
-206
lines changed- aws_lambda_powertools/metrics
- provider
- cloudwatch_emf
- docs
- tests/functional
18 files changed
+1317
-206
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
12 | 11 | | |
13 | 12 | | |
14 | | - | |
15 | | - | |
16 | 13 | | |
17 | | - | |
18 | 14 | | |
19 | | - | |
20 | 15 | | |
21 | 16 | | |
22 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
23 | 22 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | | - | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 14 | + | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 32 | + | |
| 33 | + | |
63 | 34 | | |
64 | 35 | | |
65 | 36 | | |
| |||
94 | 65 | | |
95 | 66 | | |
96 | 67 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
102 | 73 | | |
103 | 74 | | |
104 | 75 | | |
| |||
112 | 83 | | |
113 | 84 | | |
114 | 85 | | |
115 | | - | |
| 86 | + | |
116 | 87 | | |
117 | | - | |
| 88 | + | |
118 | 89 | | |
119 | 90 | | |
120 | 91 | | |
| |||
173 | 144 | | |
174 | 145 | | |
175 | 146 | | |
176 | | - | |
177 | | - | |
178 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
179 | 150 | | |
180 | 151 | | |
181 | 152 | | |
| |||
355 | 326 | | |
356 | 327 | | |
357 | 328 | | |
358 | | - | |
| 329 | + | |
359 | 330 | | |
360 | 331 | | |
361 | | - | |
| 332 | + | |
362 | 333 | | |
363 | 334 | | |
364 | 335 | | |
| |||
537 | 508 | | |
538 | 509 | | |
539 | 510 | | |
540 | | - | |
| 511 | + | |
541 | 512 | | |
542 | | - | |
| 513 | + | |
543 | 514 | | |
544 | 515 | | |
545 | 516 | | |
| |||
565 | 536 | | |
566 | 537 | | |
567 | 538 | | |
568 | | - | |
569 | | - | |
570 | | - | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
571 | 542 | | |
572 | 543 | | |
573 | 544 | | |
| |||
622 | 593 | | |
623 | 594 | | |
624 | 595 | | |
625 | | - | |
| 596 | + | |
626 | 597 | | |
627 | 598 | | |
628 | 599 | | |
| |||
635 | 606 | | |
636 | 607 | | |
637 | 608 | | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 1 | + | |
11 | 2 | | |
12 | 3 | | |
13 | 4 | | |
| |||
20 | 11 | | |
21 | 12 | | |
22 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
0 commit comments