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

Metric enhancement - use FQCN plus method name as metrics label #1332

Open
greenlaw110 opened this issue Apr 22, 2020 · 2 comments
Open

Metric enhancement - use FQCN plus method name as metrics label #1332

greenlaw110 opened this issue Apr 22, 2020 · 2 comments
Assignees
Milestone

Comments

@greenlaw110
Copy link
Contributor

Metric enhancement

  1. If no measure tag specified in @MeasureTime or @MeasureCount, it shall use ${class.simpleName}.${methodName} as tag, instead of ${methodName}

  2. Allow it to toggle measure time of every function call at runtime for any method even without @MeasureTime specified.

@greenlaw110 greenlaw110 self-assigned this Apr 22, 2020
@greenlaw110 greenlaw110 added this to the 1.9.3 milestone Nov 26, 2022
@greenlaw110
Copy link
Contributor Author

Before fix:

GH1332[2CmLfs0j9]>.amtl
+----------------------------------------------------+-------------+-------+---------+
|                        NAME                        | ACCUMULATED | COUNT |   AVG   |
+----------------------------------------------------+-------------+-------+---------+
| act:http:act:http:com.mycom.gh1322.AppEntry.getFoo | 40.93ms     |     1 | 40.93ms |
| act:http:act:http                                  | 40.93ms     |     1 | 40.93ms |
| act:http:act                                       | 41.05ms     |     2 | 20.52ms |
| act:http                                           | 41.05ms     |     2 | 20.52ms |
| act                                                | 632.39ms    |   103 | 6.13ms  |
| app:foo                                            | 0.10ms      |     1 | 0.10ms  | <<<<<<
| app                                                | 0.10ms      |     1 | 0.10ms  |
| act:http:act:routing                               | 0.11ms      |     1 | 0.11ms  |
+----------------------------------------------------+-------------+-------+---------+

@greenlaw110
Copy link
Contributor Author

greenlaw110 commented Dec 4, 2022

After fix:

GH1332[2CmLfs1ja]>.amtl
+----------------------------------------------------+-------------+-------+---------+
|                        NAME                        | ACCUMULATED | COUNT |   AVG   |
+----------------------------------------------------+-------------+-------+---------+
| act:http:act:http:com.mycom.gh1322.AppEntry.getFoo | 69.85ms     |     2 | 34.92ms |
| act:http:act:http                                  | 69.85ms     |     2 | 34.92ms |
| act:http:act                                       | 70.07ms     |     4 | 17.51ms |
| act:http                                           | 70.07ms     |     4 | 17.51ms |
| act                                                | 1.16s       |   206 | 5.67ms  |
| app:foo                                            | 0.10ms      |     1 | 0.10ms  |
| app:com.mycom.gh1322.AppEntry.foo                  | 0.05ms      |     1 | 0.05ms  | <<<<<
| app                                                | 0.16ms      |     2 | 0.08ms  |
| act:http:act:routing                               | 0.21ms      |     2 | 0.10ms  |
+----------------------------------------------------+-------------+-------+---------+
Items found: 9

@greenlaw110 greenlaw110 changed the title Metric enhancement Metric enhancement - use FQCN plus method name as metrics label Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant