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
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Sentry's Native SDK comes with its own set of signal handlers. There may be conf

* Refrain from registering a conflicting signal handler in your application.
* If you have to, register your handler after `sentry_init()` and let it invoke Sentry's handler after it finishes, or you won't get a report.
* If you or one of your dependencies register a handler for the signals listed below _before_ you call `sentry_init()`, Sentry will reinstall that handler as soon as you call `sentry_close()`. Only the `inproc` backend invokes your installed handler at the end of Sentry's handler.
* If you or one of your dependencies register a handler for the signals listed below _before_ you call `sentry_init()`, Sentry will reinstall that handler as soon as you call `sentry_close()`. Only the `inproc` and `native` backends invoke your installed handler at the end of Sentry's handler.
* If you want to act on any crash and not consider specific signals, [register an `on_crash()` hook](/platforms/native/configuration/filtering/#using-on_crash) instead of registering a signal handler.

### Signals of Interest
Expand Down
2 changes: 1 addition & 1 deletion platform-includes/configuration/sample-rate/native.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```c
sentry_options_t *options = sentry_options_new();
sentry_options_set_sample_rate(0.25);
sentry_options_set_sample_rate(options, 0.25);
sentry_init(options);
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ On this page you will learn how to manually propagate trace information into and

To obtain trace headers from a transaction, use `sentry_transaction_iter_headers()`. For a span, use `sentry_span_iter_headers()`. Pass the returned value to the downstream service. If communication happens over HTTP, we recommend you attach all headers to the outgoing HTTP request.

By default, only the `sentry-trace` header is generated. To also generate W3C `traceparent` headers for interoperability with other tracing systems, enable traceparent propagation:
By default, the `sentry-trace` and `baggage` headers are generated. To also generate W3C `traceparent` headers for interoperability with other tracing systems, enable traceparent propagation:

```c
sentry_options_set_propagate_traceparent(options, 1);
Expand Down
4 changes: 0 additions & 4 deletions platform-includes/logs/usage/native.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ sentry_log_debug("logging with %d custom attributes", attributes, 3);
sentry_log_debug("logging with %s custom attributes", sentry_value_new_object(), "no");
```

<Alert level="warning">
For now, logs can only take `bool`, `double`, `string` and signed `int` attributes. If you want to send unsigned integer values, you should convert these to strings before creating the attribute.
</Alert>

These additional attributes take precedence over the default attributes, except for `sentry.message.parameter.X` values; if you pass in a string with format specifiers, these are used for the message parameter values.

```c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sentry_transaction_context_t *tx_ctx = sentry_transaction_context_new(
sentry_transaction_t *tx = sentry_transaction_start(tx_ctx, sentry_value_new_null());

// Bind the transaction / span to the scope:
sentry_set_span(tx);
sentry_set_transaction_object(tx);

// Errors captured after the line above will be linked to the transaction
sentry_value_t exc = sentry_value_new_exception(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
```c
sentry_transaction_context_t *tx_ctx = sentry_transaction_context_new(
"transaction",
"op",
"op"
);
sentry_transaction_context_set_sampled(tx_ctx, 1);

Expand Down
2 changes: 1 addition & 1 deletion platform-includes/performance/improving-data/native.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ You can add Data Attributes to both Spans and Transactions. This data is visible
The data must be of type `sentry_value_t`, which can store:
* 32-bit signed integers,
* 64-bit signed integers,
* 64-bit unsigned integers (due to a current limitation in processing, these will be converted to strings before sending),
* 64-bit unsigned integers,
* double-precision floating-points,
* null-terminated strings, as well as
* lists and string-keyed maps containing `sentry_value_t` entries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ traces_sampler_callback(const sentry_transaction_context_t *transaction_ctx,
}

sentry_options_t *options = sentry_options_new();
sentry_options_set_traces_sampler(options, traces_sampler_callback);
sentry_options_set_traces_sampler(options, traces_sampler_callback, NULL);
sentry_init(options);
```
2 changes: 1 addition & 1 deletion platform-includes/set-extra/native.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
#include <sentry.h>

sentry_value_t extra_value = sentry_value_new_string("Mighty Fighter");
sentry_set_extra("character.name", screen);
sentry_set_extra("character.name", extra_value);
```
Loading