Guance.Windows
0.1.0-alpha.9
dotnet add package Guance.Windows --version 0.1.0-alpha.9
NuGet\Install-Package Guance.Windows -Version 0.1.0-alpha.9
<PackageReference Include="Guance.Windows" Version="0.1.0-alpha.9" />
<PackageVersion Include="Guance.Windows" Version="0.1.0-alpha.9" />
<PackageReference Include="Guance.Windows" />
paket add Guance.Windows --version 0.1.0-alpha.9
#r "nuget: Guance.Windows, 0.1.0-alpha.9"
#:package Guance.Windows@0.1.0-alpha.9
#addin nuget:?package=Guance.Windows&version=0.1.0-alpha.9&prerelease
#tool nuget:?package=Guance.Windows&version=0.1.0-alpha.9&prerelease
Guance Windows SDK
Introduction
Guance Windows SDK provides real user monitoring, logging, HTTP trace correlation, and experimental Session Replay for Windows desktop applications. It supports managed .NET applications, native C/C++ applications, WebView2, and Electron integrations.
Compatibility
| Integration | Supported scope | Distribution |
|---|---|---|
| .NET / C# | Windows 10+; net6.0 and net8.0; WPF, WinForms, and WinUI 3 |
Guance.Windows on NuGet |
| Native C/C++ | Windows 10+; C11 ABI and C++17 adapters; dynamic x64-windows vcpkg port |
guance-windows-native in the GuanceCloud vcpkg registry |
| NuGet native runtime | win-x64, win-x86, and win-arm64 assets used by the managed SDK |
Included in Guance.Windows |
| Electron Full Mode | Electron application owns no existing Native SDK instance; Windows x64, x86, and ARM64 runtimes | @cloudcare/electron-native-adapter on npm |
| Electron Mixed Mode | C/C++ host owns the Native SDK; currently uses the dynamic x64-windows vcpkg port |
vcpkg Native SDK plus npm adapter |
Application architecture, native import library, and DLL architecture must match. Session Replay is disabled by default and remains experimental.
Optional Session Replay installation
Keep the existing GuanceConfig.SessionReplay settings and recording calls. To enable recording, install the matching optional component as well as the base SDK:
| Integration | Replay component |
|---|---|
| .NET | Add Guance.Windows.SessionReplay at the same version as Guance.Windows. |
| Native C/C++ | Install guance-windows-native[replay] and deploy guance_windows_replay.dll beside guance_windows_native.dll. |
| Electron Full Mode | Run npx guance-electron-native --sdk-version <sdk-tag> --target win32-x64 --with-replay during development or packaging, then stage the runtime with stageWindowsRuntime(). |
| Electron Mixed Mode | Install the Native replay feature in the host and deploy its DLL beside the host SDK. |
The base SDK continues to work if Replay is configured but its component is absent; the existing diagnostics channel reports the missing component. The optional component must match the base SDK version and architecture. Installing it does not enable Replay unless the application enables Replay in its existing configuration. Electron can also use --replay-archive <path> with a matching .sha256 sidecar for an offline installation.
Installation
Choose the package for the application technology stack. Pin a version validated by your application and follow the Windows SDK Quick Start for registry and initialization steps.
| Application | Package | Minimal installation entry point |
|---|---|---|
| .NET / C# | Guance.Windows |
dotnet add package Guance.Windows --version <version> |
| Native C/C++ | guance-windows-native |
Configure the GuanceCloud vcpkg registry, then install the x64-windows port. |
| Electron | @cloudcare/electron-native-adapter |
npm install @cloudcare/electron-native-adapter@alpha |
Electron integration modes
Both Electron modes install the npm adapter. Full Mode downloads and starts its Native runtime; Mixed Mode connects to an SDK handle owned by the C/C++ application.
| Mode | Select with | Native SDK owner | User-provided configuration |
|---|---|---|---|
| Full Mode | native.mode: "managed" |
Adapter-managed Bridge process | In Electron Main native.settings: applicationId, service, environment, version, and either datakitUrl or datawayUrl with clientToken. |
| Mixed Mode | native.mode: "external" |
Application-owned C/C++ host | In guance_sdk_config_v2: application identity and intake settings. Electron supplies only a matching pipeName when the shared default is not used. |
Keep the RUM application ID and intake credentials in the trusted Main/Native layer, not in the Renderer. See the Electron examples below for current initialization, preload, packaging, and lifecycle details.
Sampling configuration
New sampling properties use float percentages in the inclusive range 0 through 100; decimals such as 0.1 mean 0.1%. The former SampleRate properties remain available for source compatibility, are deprecated, and continue to use fractions from 0 through 1.
| Capability | Percentage property | Legacy fractional property | Default |
|---|---|---|---|
| RUM session | GuanceConfig.SessionSamplingRate |
GuanceConfig.SampleRate |
100 |
| RUM error session | GuanceConfig.SessionOnErrorSamplingRate |
GuanceConfig.SessionErrorSampleRate |
0 |
| Logs | LogConfig.SamplingRate |
LogConfig.SampleRate |
100 |
| Traces | TraceConfig.SamplingRate |
TraceConfig.SampleRate |
100 |
| Session Replay | RumSessionReplayConfig.SamplingRate |
RumSessionReplayConfig.SampleRate |
100 |
| Session Replay on error | RumSessionReplayConfig.OnErrorSamplingRate |
RumSessionReplayConfig.OnErrorSampleRate |
0 |
When both forms are assigned on one configuration object, the percentage property wins, including an explicit 0. Invalid percentage values (NaN, infinity, or values outside 0 through 100) are rejected instead of falling back to the legacy value. Internal sampling and wire fields remain fractions; the SDK performs the percentage conversion once.
var config = new GuanceConfig
{
RumAppId = "your-rum-application-id",
SessionSamplingRate = 20.5f,
SessionOnErrorSamplingRate = 100f,
Logging = new LogConfig { SamplingRate = 50f },
Trace = new TraceConfig { SamplingRate = 10f },
SessionReplay = new RumSessionReplayConfig
{
SamplingRate = 5f,
OnErrorSamplingRate = 100f,
},
};
Native applications use the ABI-safe v2 structures and entry points. The original structures and functions retain their 0-through-1 fields and ABI.
guance_sdk_config_v2 config;
guance_sdk_config_v2_init(&config);
config.rum_app_id = "your-rum-application-id";
config.datakit_url = "http://127.0.0.1:9529";
config.session_sampling_rate = 20.5f;
guance_sdk_handle sdk = guance_sdk_init_v2(&config);
guance_log_config_v2 logging;
guance_log_config_v2_init(&logging);
logging.enable_custom_log = 1;
logging.sampling_rate = 50.0f;
guance_log_configure_v2(sdk, &logging);
Electron Full Mode accepts the percentage settings sessionSamplingRate, logSamplingRate, traceSamplingRate, and sessionReplaySamplingRate. The npm adapter's corresponding *SampleRate settings remain supported with their previous fractional units. Legacy sample-app environment and JSON aliases keep their historical percentage-and-clamping behavior during migration.
Official documentation
- Quick Start: choose a package and complete the first verified upload.
- Windows Application Integration: supported capabilities and integration entry points.
- RUM Configuration: sampling, collection boundaries, and Session Replay.
- Troubleshooting: configuration validation, loading, reporting, and lifecycle issues.
Examples
- .NET WPF
- .NET WinForms
- .NET WinUI 3
- Native C console
- Electron sample
- Electron Full Mode acceptance fixture
- Electron Mixed Mode acceptance fixture
License
Licensed under the Apache License 2.0.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net6.0-windows10.0.17763 is compatible. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net8.0-windows10.0.17763 is compatible. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- No dependencies.
-
net6.0-windows10.0.17763
- No dependencies.
-
net8.0
- No dependencies.
-
net8.0-windows10.0.17763
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Guance.Windows:
| Package | Downloads |
|---|---|
|
Guance.Windows.SessionReplay
Optional Session Replay recorder. Requires the exactly matching Guance.Windows core package. |
|
|
Guance.Windows.Diagnostics
Optional local-only self-traffic diagnostics for Guance Windows SDK. Requires the matching core bridge version. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-alpha.9 | 60 | 10/6/2026 |
| 0.1.0-alpha.8 | 56 | 9/25/2026 |
| 0.1.0-alpha.7 | 90 | 8/14/2026 |
| 0.1.0-alpha.6 | 74 | 8/13/2026 |
| 0.1.0-alpha.4 | 74 | 8/12/2026 |
| 0.1.0-alpha.2 | 84 | 8/9/2026 |
| 0.1.0-alpha.1 | 80 | 8/8/2026 |
0.1.0-alpha.9 moves Session Replay implementation into the matching optional Guance.Windows.SessionReplay package while preserving existing configuration, recording, and privacy APIs. Replay users must add this package when upgrading; unavailable components emit a diagnostic without stopping other telemetry. The Session Replay package requires the exact core version and remains disabled until explicitly enabled.