Skip to content

Commit

Permalink
Turn parse errors into Traces with process state details.
Browse files Browse the repository at this point in the history
  • Loading branch information
ovalenti committed Jan 2, 2025
1 parent 2561ca3 commit b55b0e9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions collector/lib/ProcfsScraper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,10 @@ bool ReadContainerConnections(const char* proc_path, std::shared_ptr<ProcessStor
uint64_t netns_inode;
if (!GetNetworkNamespace(dirfd, &netns_inode)) {
COUNTER_INC(CollectorStats::procfs_could_not_get_network_namespace);
CLOG_THROTTLED(ERROR, std::chrono::seconds(10)) << "Could not determine network namespace: " << StrError();
CLOG(TRACE) << "Could not determine network namespace: " << StrError();
if (process_state) {
CLOG(TRACE) << "Process state: " << *process_state;
}
continue;
}

Expand All @@ -532,7 +535,10 @@ bool ReadContainerConnections(const char* proc_path, std::shared_ptr<ProcessStor

if (!GetSocketINodes(dirfd, pid, &container_ns_sockets)) {
COUNTER_INC(CollectorStats::procfs_could_not_get_socket_inodes);
CLOG_THROTTLED(ERROR, std::chrono::seconds(10)) << "Could not obtain socket inodes: " << StrError();
CLOG(TRACE) << "Could not obtain socket inodes: " << StrError();
if (process_state) {
CLOG(TRACE) << "Process state: " << *process_state;
}
continue;
}

Expand Down

0 comments on commit b55b0e9

Please sign in to comment.