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

[receiver/expvar] Fix bug where measurement is recorded into wrong metric. #13172

Merged
merged 3 commits into from
Aug 12, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion receiver/expvarreceiver/scraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (e *expVarScraper) scrape(ctx context.Context) (pmetric.Metrics, error) {
e.mb.RecordProcessRuntimeMemstatsMspanInuseDataPoint(now, int64(memStats.MSpanInuse))
e.mb.RecordProcessRuntimeMemstatsMspanSysDataPoint(now, int64(memStats.MSpanSys))
e.mb.RecordProcessRuntimeMemstatsMcacheInuseDataPoint(now, int64(memStats.MCacheInuse))
e.mb.RecordProcessRuntimeMemstatsMspanSysDataPoint(now, int64(memStats.MCacheSys))
e.mb.RecordProcessRuntimeMemstatsMcacheSysDataPoint(now, int64(memStats.MCacheSys))
e.mb.RecordProcessRuntimeMemstatsBuckHashSysDataPoint(now, int64(memStats.BuckHashSys))
e.mb.RecordProcessRuntimeMemstatsGcSysDataPoint(now, int64(memStats.GCSys))
e.mb.RecordProcessRuntimeMemstatsOtherSysDataPoint(now, int64(memStats.OtherSys))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,17 @@
"startTimeUnixNano": "1653023581589787000",
"timeUnixNano": "1653023581592037000",
"asInt": "81600"
},
}
],
"aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE"
}
},
{
"name": "process.runtime.memstats.mcache_sys",
"description": "Bytes of memory obtained from the OS for mcache structures.",
"unit": "By",
"sum": {
"dataPoints": [
{
"startTimeUnixNano": "1653023581589787000",
"timeUnixNano": "1653023581592037000",
Expand Down
4 changes: 4 additions & 0 deletions unreleased/expvar-bug-fix-#13172.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
change_type: bug_fix
component: expvarreceiver
note: "Fixes an bug where the mSpanSys value was recorded into the mCacheSys metric."
issues: [13171]