Skip to content

[receiver/hostmetrics] Enable re-aggregation for process and system scrapers#47221

Open
kruthiwusirika5 wants to merge 1 commit intoopen-telemetry:mainfrom
kruthiwusirika5:feat/hostmetrics-process-reaggregation
Open

[receiver/hostmetrics] Enable re-aggregation for process and system scrapers#47221
kruthiwusirika5 wants to merge 1 commit intoopen-telemetry:mainfrom
kruthiwusirika5:feat/hostmetrics-process-reaggregation

Conversation

@kruthiwusirika5
Copy link
Copy Markdown

Part of #46386.

Enables the re-aggregation feature for the two remaining hostmetrics scrapers.

process scraper

  • Sets reaggregation_enabled: true
  • Classifies metric attributes as recommended (all four: context_switch_type, direction, paging_fault_type, state) — these are useful breakdowns but operators may want to aggregate them away
  • Classifies resource attributes by their role in process identity:
Attribute Level Rationale
process.pid required Uniquely identifies the process; dropping it conflates all processes
process.executable.name required Primary process identifier
process.command recommended Useful context, safe to drop for cross-process aggregation
process.executable.path recommended Full path is helpful but optional
process.owner recommended Username grouping; drop when not needed
process.command_line opt_in Verbose; already enabled by default but high-cardinality
process.parent_pid opt_in Rarely needed for aggregation
process.cgroup opt_in Linux-only; already enabled: false

system scraper

  • Sets reaggregation_enabled: true
  • No attribute classification needed: the single metric system.uptime has an empty attributes: [] list

Validation

  • All existing tests pass: go test ./internal/scraper/processscraper/... ./internal/scraper/systemscraper/...
  • Generated code regenerated via make generate

…rapers

Enable the re-aggregation feature for the two remaining hostmetrics
scrapers that were not yet covered.

process scraper:
- Add reaggregation_enabled: true
- Classify metric attributes (context_switch_type, direction,
  paging_fault_type, state) as requirement_level: recommended
- Classify resource attributes by their role in process identity:
  - required: process.pid, process.executable.name (uniquely identify
    a process; cannot be dropped without losing process-level
    granularity)
  - recommended: process.command, process.executable.path,
    process.owner (useful context, safe to drop for aggregation)
  - opt_in: process.cgroup, process.command_line, process.parent_pid
      (verbose or already disabled by default)

system scraper:
- Add reaggregation_enabled: true
- No metric or resource attributes require classification (the single
  metric system.uptime has an empty attributes list)

Part of open-telemetry#46386.
@kruthiwusirika5 kruthiwusirika5 requested review from a team, braydonk and dmitryax as code owners March 29, 2026 19:09
@github-actions github-actions bot added the first-time contributor PRs made by new contributors label Mar 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better!

@paulojmdias
Copy link
Copy Markdown
Member

/workflow-approve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants