Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ obj/

# clangd
.cache

sentry-native.sln
8 changes: 2 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,20 @@
## Unreleased

**Breaking changes**:

- Change transaction sampling to be trace-based. Now, for a given `traces_sample_rate`, either all transactions in a trace get sampled or none do with probability equal to that sample rate. ([#1254](https://github.com/getsentry/sentry-native/pull/1254))
- Moved Xbox toolchains to an Xbox-specific repository [sentry-xbox](https://github.com/getsentry/sentry-xbox). You can request access to the repository by following the instructions in [Xbox documentation](https://docs.sentry.io/platforms/xbox/) ([#1329](https://github.com/getsentry/sentry-native/pull/1329))

**Features**:

- Add `sentry_clear_attachments()` to allow clearing all previously added attachments in the global scope. ([#1290](https://github.com/getsentry/sentry-native/pull/1290))
- Compiles also on Xbox One ([#1294](https://github.com/getsentry/sentry-native/pull/1294))
- Provide `sentry_regenerate_trace()` to allow users to set manual trace boundaries. ([#1293](https://github.com/getsentry/sentry-native/pull/1293))
- Add `Dynamic Sampling Context (DSC)` to events. ([#1254](https://github.com/getsentry/sentry-native/pull/1254))
- Add `sentry_value_new_feedback` and `sentry_capture_feedback` to allow capturing [User Feedback](https://develop.sentry.dev/sdk/data-model/envelope-items/#user-feedback). ([#1304](https://github.com/getsentry/sentry-native/pull/1304))
- Deprecate `sentry_value_new_user_feedback` and `sentry_capture_user_feedback` in favor of the new API.
- Add `sentry_envelope_read_from_file`, `sentry_envelope_get_header`, and `sentry_capture_envelope`. ([#1320](https://github.com/getsentry/sentry-native/pull/1320))
- Add `(u)int64` `sentry_value_t` type. ([#1326](https://github.com/getsentry/sentry-native/pull/1326))

**Fixes**:

- Update Xbox toolchain to include `UseDebugLibraries` fix for Debug builds. ([#1302](https://github.com/getsentry/sentry-native/pull/1302))
- Fix GDK version selection for Xbox by propagating `XdkEditionTarget` to MSBuild. ([#1312](https://github.com/getsentry/sentry-native/pull/1312))

**Meta**:

- Marked deprecated functions with `SENTRY_DEPRECATED(msg)`. ([#1308](https://github.com/getsentry/sentry-native/pull/1308))
Expand Down
11 changes: 2 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ else()
cmake_minimum_required(VERSION 3.10)
cmake_policy(SET CMP0077 NEW)
endif()
set(SENTRY_TOOLCHAINS_DIR "${CMAKE_CURRENT_LIST_DIR}/toolchains")
if ("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "Gaming.Xbox.Scarlett.x64")
include("${SENTRY_TOOLCHAINS_DIR}/xbox/CMakeGDKScarlett.cmake")
set(XBOX TRUE)
endif()
if ("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "Gaming.Xbox.XboxOne.x64")
include("${SENTRY_TOOLCHAINS_DIR}/xbox/CMakeGDKXboxOne.cmake")
set(XBOX TRUE)
endif()

#read sentry-native version
file(READ "include/sentry.h" _SENTRY_HEADER_CONTENT)
Expand Down Expand Up @@ -60,6 +51,8 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "AIX" OR CMAKE_SYSTEM_NAME STREQUAL "OS400")
set(AIX TRUE)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Prospero")
set(PROSPERO TRUE)
elseif("${CMAKE_GENERATOR_PLATFORM}" MATCHES "Gaming\\.Xbox\\.(Scarlett|XboxOne)\\.x64")
set(XBOX TRUE)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Xbox Build Failures Due to Incorrect Variable Placement

Xbox support is broken. The new XBOX variable detection logic is incorrectly placed within an elseif chain that checks CMAKE_SYSTEM_NAME. Since Xbox builds set CMAKE_SYSTEM_NAME to "WINDOWS", the CMAKE_GENERATOR_PLATFORM condition for Xbox is never reached, and XBOX is never set. This, coupled with the removal of Xbox toolchain files that generated gdk_build.props (a file referenced by later CMake logic when XBOX is true), leads to build failures for Xbox targets.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's not true, there's no CMAKE_SYSTEM_NAME == windows condition in this if-elseif chain

endif()

#setup sentry library type
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Conan Center](https://shields.io/conan/v/sentry-native)](https://conan.io/center/recipes/sentry-native) [![homebrew](https://img.shields.io/homebrew/v/sentry-native)](https://formulae.brew.sh/formula/sentry-native) [![nixpkgs unstable](https://repology.org/badge/version-for-repo/nix_unstable/sentry-native.svg)](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/se/sentry-native/package.nix) [![vcpkg](https://shields.io/vcpkg/v/sentry-native)](https://vcpkg.link/ports/sentry-native)
[![Conan Center](https://shields.io/conan/v/sentry-native)](https://conan.io/center/recipes/sentry-native) [![homebrew](https://img.shields.io/homebrew/v/sentry-native)](https://formulae.brew.sh/formula/sentry-native) [![nixpkgs unstable](https://repology.org/badge/version-for-repo/nix_unstable/sentry-native.svg)](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/se/sentry-native/package.nix) [![vcpkg](https://shields.io/vcpkg/v/sentry-native)](https://vcpkg.link/ports/sentry-native)
<p align="center">
<a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
<picture>
Expand Down Expand Up @@ -72,6 +72,9 @@ The SDK currently supports and is tested on the following OS/Compiler variations
- macOS 13, 14, 15 with respective most recent Apple compiler toolchain and LLVM clang 15 + 18
- Android API35 built by NDK27 toolchain
- Android API16 built by NDK19 toolchain
- PlayStation via [sentry-playstation](https://github.com/getsentry/sentry-playstation). See [PlayStation documentation](https://docs.sentry.io/platforms/playstation/) to get access.
- Xbox via [sentry-xbox](https://github.com/getsentry/sentry-xbox). See [Xbox documentation](https://docs.sentry.io/platforms/xbox/) to get access.
- Nintendo Switch via [sentry-switch](https://github.com/getsentry/sentry-switch). See [Nintendo Switch documentation](https://docs.sentry.io/platforms/nintendo-switch/) to get access.

Additionally, the SDK should support the following platforms, although they are
not automatically tested, so breakage may occur:
Expand Down
70 changes: 0 additions & 70 deletions include/sentry.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@ typedef enum {
SENTRY_VALUE_TYPE_NULL,
SENTRY_VALUE_TYPE_BOOL,
SENTRY_VALUE_TYPE_INT32,
SENTRY_VALUE_TYPE_INT64,
SENTRY_VALUE_TYPE_UINT64,
SENTRY_VALUE_TYPE_DOUBLE,
SENTRY_VALUE_TYPE_STRING,
SENTRY_VALUE_TYPE_LIST,
Expand Down Expand Up @@ -252,16 +250,6 @@ SENTRY_API sentry_value_t sentry_value_new_null(void);
*/
SENTRY_API sentry_value_t sentry_value_new_int32(int32_t value);

/**
* Creates a new 64-bit signed integer value.
*/
SENTRY_API sentry_value_t sentry_value_new_int64(int64_t value);

/**
* Creates a new 64-bit unsigned integer value.
*/
SENTRY_API sentry_value_t sentry_value_new_uint64(uint64_t value);

/**
* Creates a new double value.
*/
Expand Down Expand Up @@ -400,16 +388,6 @@ SENTRY_API size_t sentry_value_get_length(sentry_value_t value);
*/
SENTRY_API int32_t sentry_value_as_int32(sentry_value_t value);

/**
* Converts a value into a 64-bit signed integer.
*/
SENTRY_API int64_t sentry_value_as_int64(sentry_value_t value);

/**
* Converts a value into a 64-bit unsigned integer.
*/
SENTRY_API uint64_t sentry_value_as_uint64(sentry_value_t value);

/**
* Converts a value into a double value.
*/
Expand Down Expand Up @@ -684,16 +662,6 @@ typedef struct sentry_envelope_s sentry_envelope_t;
*/
SENTRY_API void sentry_envelope_free(sentry_envelope_t *envelope);

/**
* Given an Envelope, returns the header if present.
*
* This returns a borrowed value to the headers in the Envelope.
*/
SENTRY_API sentry_value_t sentry_envelope_get_header(
const sentry_envelope_t *envelope, const char *key);
SENTRY_API sentry_value_t sentry_envelope_get_header_n(
const sentry_envelope_t *envelope, const char *key, size_t key_len);

/**
* Given an Envelope, returns the embedded Event if there is one.
*
Expand Down Expand Up @@ -730,44 +698,6 @@ SENTRY_API int sentry_envelope_write_to_file(
SENTRY_API int sentry_envelope_write_to_file_n(
const sentry_envelope_t *envelope, const char *path, size_t path_len);

/**
* De-serializes an envelope.
*
* The return value needs to be freed with sentry_envelope_free().
*
* Returns NULL on failure.
*/
SENTRY_API sentry_envelope_t *sentry_envelope_deserialize(
const char *buf, size_t buf_len);

/**
* De-serializes an envelope from a file.
*
* `path` is assumed to be in platform-specific filesystem path encoding.
*
* API Users on windows are encouraged to use `sentry_envelope_read_from_filew`
* instead.
*/
SENTRY_API sentry_envelope_t *sentry_envelope_read_from_file(const char *path);
SENTRY_API sentry_envelope_t *sentry_envelope_read_from_file_n(
const char *path, size_t path_len);

#ifdef SENTRY_PLATFORM_WINDOWS
/**
* Wide char versions of `sentry_envelope_read_from_file` and
* `sentry_envelope_read_from_file_n`.
*/
SENTRY_API sentry_envelope_t *sentry_envelope_read_from_filew(
const wchar_t *path);
SENTRY_API sentry_envelope_t *sentry_envelope_read_from_filew_n(
const wchar_t *path, size_t path_len);
#endif

/**
* Submits an envelope, first checking for consent.
*/
SENTRY_API void sentry_capture_envelope(sentry_envelope_t *envelope);

/**
* The Sentry Client Options.
*
Expand Down
Loading
Loading