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

feat(host_metrics source): Add process virtual memory metric #22183

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nionata
Copy link
Contributor

@nionata nionata commented Jan 11, 2025

Summary

Add virtual memory metric to the process host metrics collector. The current metric only covers process RSS.

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

How did you test this PR?

make environment CONTAINER_TOOL="podman"

mkdir /etc/vector && cat << EOF > /etc/vector/vector.yaml
sources:
  in:
    type: "host_metrics"
    collectors:
      - "process"

sinks:
  out:
    inputs:
      - "in"
    type: "console"
    encoding: 
      codec: "native_json"
EOF

cargo run | jq .
...
{
  "metric": {
    "name": "process_memory_virtual_usage",
    "namespace": "host",
    "tags": {
      "collector": "process",
      "command": "target/debug/vector",
      "host": "...",
      "name": "vector-worker",
      "pid": "74413"
    },
    "timestamp": "2025-01-11T01:14:11.300421047Z",
    "kind": "absolute",
    "gauge": {
      "value": 836136960
    }
  }
}

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the "no-changelog" label to this PR.

Checklist

  • Please read our Vector contributor resources.
    • make check-all is a good command to run locally. This check is
      defined here. Some of these
      checks might not be relevant to your PR. For Rust changes, at the very least you should run:
      • cargo fmt --all
      • cargo clippy --workspace --all-targets -- -D warnings
      • cargo nextest run --workspace (alternatively, you can run cargo test --all)
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run dd-rust-license-tool write to regenerate the license inventory and commit the changes (if any). More details here.

References

@nionata nionata requested review from a team as code owners January 11, 2025 00:55
@github-actions github-actions bot added domain: sources Anything related to the Vector's sources domain: external docs Anything related to Vector's external, public documentation labels Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: external docs Anything related to Vector's external, public documentation domain: sources Anything related to the Vector's sources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant