Skip to content

Commit

Permalink
rename process.threads.count to process.threads
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme committed Aug 17, 2022
1 parent 61ff151 commit 55d3a17
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ These are the metrics available for this scraper.
| **process.disk.io.write** | Disk bytes written. | By | Sum(Int) | <ul> </ul> |
| **process.memory.physical_usage** | The amount of physical memory in use. | By | Sum(Int) | <ul> </ul> |
| **process.memory.virtual_usage** | Virtual memory size. | By | Sum(Int) | <ul> </ul> |
| process.threads.count | Process threads count. | {threads} | Sum(Int) | <ul> </ul> |
| process.threads | Process threads count. | {threads} | Sum(Int) | <ul> </ul> |

**Highlighted metrics** are emitted by default. Other metrics are optional and not emitted by default.
Any metric can be enabled or disabled with the following scraper configuration:
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ metrics:
aggregation: cumulative
monotonic: true

process.threads.count:
process.threads:
enabled: false
description: Process threads count.
unit: "{threads}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func (s *scraper) scrapeAndAppendThreadsMetrics(now pcommon.Timestamp, handle pr
if err != nil {
return err
}
s.mb.RecordProcessThreadsCountDataPoint(now, int64(threads))
s.mb.RecordProcessThreadsDataPoint(now, int64(threads))

return nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ func TestScrapeMetrics_ProcessErrors(t *testing.T) {
}

metricsSettings := metadata.DefaultMetricsSettings()
metricsSettings.ProcessThreadsCount.Enabled = true
metricsSettings.ProcessThreads.Enabled = true
scraper, err := newProcessScraper(componenttest.NewNopReceiverCreateSettings(), &Config{Metrics: metricsSettings})
require.NoError(t, err, "Failed to create process scraper: %v", err)
err = scraper.start(context.Background(), componenttest.NewNopHost())
Expand Down

0 comments on commit 55d3a17

Please sign in to comment.