Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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 modules/sentry-native
Submodule sentry-native updated 60 files
+1 −1 .github/workflows/ci.yml
+23 −0 CHANGELOG.md
+9 −0 CMakeLists.txt
+28 −2 examples/example.c
+1 −1 external/crashpad
+24 −3 include/sentry.h
+1 −1 ndk/gradle.properties
+1 −1 src/backends/native/minidump/sentry_minidump_linux.c
+2 −2 src/backends/native/sentry_crash_context.h
+132 −9 src/backends/native/sentry_crash_daemon.c
+18 −0 src/backends/sentry_backend_breakpad.cpp
+11 −14 src/backends/sentry_backend_crashpad.cpp
+62 −45 src/backends/sentry_backend_native.c
+30 −0 src/path/sentry_path.c
+66 −0 src/path/sentry_path_unix.c
+9 −0 src/path/sentry_path_windows.c
+38 −0 src/sentry_attachment.c
+22 −0 src/sentry_attachment.h
+45 −9 src/sentry_core.c
+289 −29 src/sentry_database.c
+41 −3 src/sentry_database.h
+308 −27 src/sentry_envelope.c
+56 −6 src/sentry_envelope.h
+2 −0 src/sentry_logger.h
+15 −0 src/sentry_options.c
+1 −0 src/sentry_options.h
+16 −0 src/sentry_path.h
+9 −7 src/sentry_retry.c
+1 −1 src/sentry_retry.h
+8 −0 src/sentry_string.c
+4 −0 src/sentry_string.h
+31 −0 src/sentry_utils.c
+12 −0 src/sentry_utils.h
+446 −51 src/transports/sentry_http_transport.c
+9 −0 src/transports/sentry_http_transport.h
+67 −5 src/transports/sentry_http_transport_curl.c
+76 −7 src/transports/sentry_http_transport_winhttp.c
+16 −11 tests/__init__.py
+1 −3 tests/test_e2e_sentry.py
+0 −1 tests/test_integration_client_reports.py
+2 −2 tests/test_integration_crashpad.py
+10 −11 tests/test_integration_logs.py
+7 −3 tests/test_integration_native.py
+568 −0 tests/test_integration_tus.py
+1 −0 tests/unit/CMakeLists.txt
+38 −9 tests/unit/test_attachments.c
+32 −0 tests/unit/test_basic.c
+128 −0 tests/unit/test_cache.c
+2 −0 tests/unit/test_client_report.c
+401 −0 tests/unit/test_envelopes.c
+3 −0 tests/unit/test_logger.c
+4 −12 tests/unit/test_logs.c
+7 −0 tests/unit/test_native_backend.c
+116 −0 tests/unit/test_path.c
+75 −4 tests/unit/test_retry.c
+41 −0 tests/unit/test_string.c
+332 −0 tests/unit/test_tus.c
+4 −2 tests/unit/test_unwinder.c
+22 −0 tests/unit/test_utils.c
+25 −1 tests/unit/tests.inc
6 changes: 6 additions & 0 deletions src/Sentry/Platforms/Native/CFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ public static bool Init(SentryOptions options)

// Note: DSN is not null because options.IsValid() must have returned true for this to be called.
sentry_options_set_dsn(cOptions, options.Dsn!);
sentry_options_set_enable_logs(cOptions, options.EnableLogs ? 1 : 0);
sentry_options_set_enable_metrics(cOptions, options.EnableMetrics ? 1 : 0);
Copy link
Copy Markdown
Member

@Flash0ver Flash0ver May 5, 2026

Choose a reason for hiding this comment

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

following up on: #5189 (comment)

thought: now I am second guessing myself

Ok ... I'm quite undecisive on this one ... here comes the bikeshedding:
If we sync these two options, shouldn't we then actually sync all options that from a "set intersection"?
Which then would be a behavioral breaking change ... wouldn't it?

My current thought is:
Do we instead only want to avoid the breaking change of changing the sentry-native semantics of disable-per-default to enable-per-default in a minor release of the .NET SDK?
On the other hand, we already suffered a breaking change in 0.13.5 of sentry-native where Metrics got enabled per default and we didn't change anything in the sentry-dotnet side.

And another thought:
Am I overthinking this?
Are the sentry-native APIs even exposed to the .NET consumer ... so would it even matter?
sentry-native has no "default-integration" for neither Logs nor Metrics (does it?), so if the APIs aren't called then nothing will happen, shall we then just leave the defaults of sentry-native as they are.
And instead in the next major release of sentry-dotnet forward all Options that appear in both down to sentry-native and then keep future options and changes of the default values in sync?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's keep them consistent - so if someone does not enable logs in the .NET SDK they don't get logs (from any of the SDKs) and the same for metrics.

If that's not what we're doing now, let's change it. That's not a breaking change - it's just fixing something that's broken... It is a change in behaviour (from broken to fixed).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK ... then let's bring the sync of Logs & Metrics options back,
and follow-up with PRs to pass-through more/all options we can.


if (options.Release is not null)
{
Expand Down Expand Up @@ -381,6 +383,10 @@ internal double Double

[DllImport("sentry-native")]
private static extern void sentry_options_set_auto_session_tracking(IntPtr options, int debug);
[DllImport("sentry-native")]
private static extern void sentry_options_set_enable_logs(IntPtr options, int enable);
[DllImport("sentry-native")]
private static extern void sentry_options_set_enable_metrics(IntPtr options, int enable);

[DllImport("sentry-native")]
private static extern void sentry_options_set_transport(IntPtr options, IntPtr transport);
Expand Down
Loading