Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 src/agent/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if(CMAKE_HOST_WIN32 AND NOT DEFINED VCPKG_TARGET_TRIPLET)
set(VCPKG_TARGET_TRIPLET "x64-windows-static" CACHE STRING "vcpkg triplet for the self-contained agent build")
endif()

project(HsmAgent VERSION 0.5.27 LANGUAGES CXX)
project(HsmAgent VERSION 0.5.28 LANGUAGES CXX)

if(MSVC)
# Static CRT (/MT) to match the static triplet — the exe must run on a clean machine with no VC++
Expand Down
2 changes: 1 addition & 1 deletion src/native/collector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.21)

# VERSION tracks the C ABI semver (HSM_COLLECTOR_VERSION_* in include/hsm_collector/hsm_collector.h);
# keep the two in sync. It feeds the find_package(hsm_collector x.y) version check (#1100).
project(HsmCollectorNative VERSION 0.6.1 LANGUAGES CXX)
project(HsmCollectorNative VERSION 0.6.2 LANGUAGES CXX)

# ---------------------------------------------------------------------------
# Target topology (epic #1093 / issue #1095 §1 — "core lib / C ABI lib / C++
Expand Down
2 changes: 1 addition & 1 deletion src/native/collector/include/hsm_collector/hsm_collector.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ extern "C"
reported as the ".module/Collector version" sensor. */
#define HSM_COLLECTOR_VERSION_MAJOR 0
#define HSM_COLLECTOR_VERSION_MINOR 6
#define HSM_COLLECTOR_VERSION_PATCH 1
#define HSM_COLLECTOR_VERSION_PATCH 2
#define HSM_COLLECTOR_VERSION \
((HSM_COLLECTOR_VERSION_MAJOR * 10000) + (HSM_COLLECTOR_VERSION_MINOR * 100) + HSM_COLLECTOR_VERSION_PATCH)

Expand Down
20 changes: 17 additions & 3 deletions src/native/collector/src/hsm_collector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4661,9 +4661,23 @@ namespace
// to one line per window (the batch is re-enqueued by the dispatcher — the retry itself is
// not logged, matching the queue's silent re-enqueue).
if (!response.IsSuccess())
LogError(
"Failed to send " + std::to_string(batch.size()) + " value(s): HTTP " +
std::to_string(response.status_code) + (response.error.empty() ? "" : " " + response.error));
{
const std::string msg = "Failed to send " + std::to_string(batch.size()) + " value(s): HTTP " +
std::to_string(response.status_code) +
(response.error.empty() ? "" : " " + response.error);
// A send whose in-flight POST was cancelled by a graceful stop is expected, not an
// error — log it at Debug (same treatment as the stop-drop). A genuine failure while
// running still logs at Error (deduplicated).
bool cancelled_by_stop;
{
std::lock_guard<std::mutex> guard(hang_mutex_);
cancelled_by_stop = send_cancelled_;
}
if (cancelled_by_stop)
LogMessage(HSM_LOG_LEVEL_DEBUG, msg);
else
LogError(msg);
}

return response.IsSuccess();
}
Expand Down
Loading