diff --git a/README.md b/README.md index 8b3578f..889ddc2 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ include(FetchContent) FetchContent_Declare( scarf_cpp GIT_REPOSITORY https://github.com/scarf-sh/cpp-sdk.git - GIT_TAG main # replace with a release tag once available + GIT_TAG v0.1.0 ) FetchContent_MakeAvailable(scarf_cpp) @@ -46,10 +46,10 @@ int main() { scarf::EventLogger logger("https://your-scarf-endpoint.com"); scarf::LogResult result = logger.log_event({ - {"event", "custom_event"}, - {"package", "my-package"}, - {"version", "1.2.3"}, - {"metadata", scarf::PropertyValue::Object{{"channel", "stable"}}}, + {"sdk", "scarf-cpp"}, + {"release", "v0.1.0"}, + {"source", "my-application"}, + {"metadata", scarf::PropertyValue::Object{{"channel", "stable"}, {"feature", "install"}}}, }); return result.success ? 0 : 1; @@ -58,6 +58,10 @@ int main() { `log_event` sends a `POST` request to the configured endpoint with `Content-Type: application/json`. Event properties are encoded as a JSON request body so strings, numbers, booleans, arrays, objects, and nulls round-trip without query-string encoding. +When sending events through the Scarf gateway, use metadata-style property names that describe your client or integration. Avoid overloading common event-processing names such as `event` and `package` unless your Scarf endpoint is configured to expect them. + +Scarf analytics are processed asynchronously. A successful gateway response means the event was accepted, but it can take a couple of hours before the event appears in analytics exports or dashboard views. + ## Configuration The client follows the same defaults as the other Scarf SDKs: @@ -88,6 +92,8 @@ ctest --test-dir build --output-on-failure The test suite does not make network calls; it uses an injected transport to validate request construction, opt-out behavior, errors, and the User-Agent format. +CI currently validates Linux and macOS builds. Windows/MSVC support is intended by the CMake configuration but is not yet covered by CI. + ## License Apache 2.0