Set metricset.name for breakdown metrics#4910
Conversation
48a331f to
9649cf6
Compare
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪 |
1c077d1 to
f3d2a86
Compare
Codecov Report
@@ Coverage Diff @@
## master #4910 +/- ##
==========================================
+ Coverage 76.64% 76.65% +0.01%
==========================================
Files 166 167 +1
Lines 10143 10158 +15
==========================================
+ Hits 7774 7787 +13
- Misses 2369 2371 +2
|
f3d2a86 to
9ab9f12
Compare
simitt
left a comment
There was a problem hiding this comment.
Looks good on a first high level review
02cba85 to
5dadb13
Compare
Introduce model/modelprocessor.SetMetricsetName, which sets metricset.name for all agent metrics. Breakdown metrics get a specific name, everything else is named "app". Also, add Go system tests for metrics and get rid of a couple of Python-based ones.
tests/system/metricset.approved.json is used for generating docs. Until we change hat, we can't get rid of this test.
5dadb13 to
9360f82
Compare
| continue | ||
| } | ||
| ms.Name = appMetricsetName | ||
| if ms.Transaction.Type == "" { |
There was a problem hiding this comment.
nit: would it make sense to move the code for defining when a metricset is a transaction_breakdown and when it is a span_breakdown directly to the metricset model? And then only consume this information here for setting the proper names?
There was a problem hiding this comment.
I'd rather not, but let's continue discussing this later. Ultimately I'd like the model package to be more or less just a data representation, along the lines of https://github.com/elastic/apm-agent-go/tree/master/model. I have in mind that all business logic, anything to do with interpreting or processing the types, will live outside the model package.
* Set metricset.name for breakdown metrics Introduce model/modelprocessor.SetMetricsetName, which sets metricset.name for all agent metrics. Breakdown metrics get a specific name, everything else is named "app". Also, add Go system tests for metrics and get rid of a couple of Python-based ones. * tests/system: reinstate metricset system test tests/system/metricset.approved.json is used for generating docs. Until we change hat, we can't get rid of this test. # Conflicts: # changelogs/head.asciidoc
* Set metricset.name for breakdown metrics Introduce model/modelprocessor.SetMetricsetName, which sets metricset.name for all agent metrics. Breakdown metrics get a specific name, everything else is named "app". Also, add Go system tests for metrics and get rid of a couple of Python-based ones. * tests/system: reinstate metricset system test tests/system/metricset.approved.json is used for generating docs. Until we change hat, we can't get rid of this test. # Conflicts: # changelogs/head.asciidoc
* Set metricset.name for breakdown metrics Introduce model/modelprocessor.SetMetricsetName, which sets metricset.name for all agent metrics. Breakdown metrics get a specific name, everything else is named "app". Also, add Go system tests for metrics and get rid of a couple of Python-based ones. * tests/system: reinstate metricset system test tests/system/metricset.approved.json is used for generating docs. Until we change hat, we can't get rid of this test. (cherry picked from commit 5747c1d) # Conflicts: # beater/beater.go # changelogs/head.asciidoc # systemtest/approvals/TestApprovedMetrics.approved.json
|
tested with BC-4 and go-apm-agent - works as expected |
Motivation/summary
Introduce model/modelprocessor.SetMetricsetName, which sets metricset.name for well-known (breakdown) agent metrics.
transaction.breakdown.count, etc.) will be named "transaction_breakdown".span.self_time.*) will be named "span_breakdown".Checklist
How to test these changes
metricset.namefield with the expected names.Related issues
Closes #4392