From daf2d1c9b7aebbc470f717c12133fdbbbb0f7cd7 Mon Sep 17 00:00:00 2001 From: Markus Hintersteiner Date: Fri, 28 Apr 2023 09:02:03 +0200 Subject: [PATCH] Allow setting sdk_name at runtime (#834) --- CHANGELOG.md | 1 + include/sentry.h | 32 ++++++++++++- src/backends/sentry_backend_crashpad.cpp | 3 +- src/sentry_options.c | 48 +++++++++++++++++++ src/sentry_options.h | 2 + src/sentry_scope.c | 11 ++++- src/sentry_transport.c | 5 +- src/sentry_transport.h | 2 +- src/sentry_utils.c | 21 ++++++--- src/sentry_utils.h | 6 ++- src/transports/sentry_transport_curl.c | 5 +- src/transports/sentry_transport_winhttp.c | 7 ++- tests/unit/CMakeLists.txt | 1 + tests/unit/test_envelopes.c | 8 ++-- tests/unit/test_options.c | 54 ++++++++++++++++++++++ tests/unit/test_utils.c | 56 ++++++++++++++++++++++- tests/unit/tests.inc | 8 ++++ 17 files changed, 244 insertions(+), 26 deletions(-) create mode 100644 tests/unit/test_options.c diff --git a/CHANGELOG.md b/CHANGELOG.md index 952f1c497..cf7d681b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ **Features**: - Extend API with ptr/len-string interfaces. ([#827](https://github.com/getsentry/sentry-native/pull/827)) +- Allow setting sdk_name at runtime ([#834](https://github.com/getsentry/sentry-native/pull/834)) ## 0.6.1 diff --git a/include/sentry.h b/include/sentry.h index 32cecb63a..17760e24c 100644 --- a/include/sentry.h +++ b/include/sentry.h @@ -1008,6 +1008,32 @@ SENTRY_API void sentry_options_set_transport_thread_name_n( SENTRY_API const char *sentry_options_get_transport_thread_name( const sentry_options_t *opts); +/* + * Configures the name of the sentry SDK. Returns 0 on success. + */ +SENTRY_API int sentry_options_set_sdk_name( + sentry_options_t *opts, const char *sdk_name); + +/* + * Configures the name of the sentry SDK. Returns 0 on success. + */ +SENTRY_API int sentry_options_set_sdk_name_n( + sentry_options_t *opts, const char *sdk_name, size_t sdk_name_len); + +/** + * Returns the configured sentry SDK name. Unless overwritten this defaults to + * SENTRY_SDK_NAME. + */ +SENTRY_API const char *sentry_options_get_sdk_name( + const sentry_options_t *opts); + +/** + * Returns the user agent. Unless overwritten this defaults to + * "SENTRY_SDK_NAME / SENTRY_SDK_VERSION". + */ +SENTRY_API const char *sentry_options_get_user_agent( + const sentry_options_t *opts); + /** * Enables or disables debug printing mode. */ @@ -1983,12 +2009,14 @@ SENTRY_EXPERIMENTAL_API int sentry_clear_crashed_last_run(void); SENTRY_EXPERIMENTAL_API const char *sentry_sdk_version(void); /** - * Sentry SDK name. + * Sentry SDK name set during build time. + * Deprecated: Please use sentry_options_get_sdk_name instead. */ SENTRY_EXPERIMENTAL_API const char *sentry_sdk_name(void); /** - * Sentry SDK User-Agent. + * Sentry SDK User-Agent set during build time. + * Deprecated: Please use sentry_options_get_user_agent instead. */ SENTRY_EXPERIMENTAL_API const char *sentry_sdk_user_agent(void); diff --git a/src/backends/sentry_backend_crashpad.cpp b/src/backends/sentry_backend_crashpad.cpp index c44672341..381779296 100644 --- a/src/backends/sentry_backend_crashpad.cpp +++ b/src/backends/sentry_backend_crashpad.cpp @@ -311,7 +311,8 @@ sentry__crashpad_backend_startup( data->db = crashpad::CrashReportDatabase::Initialize(database).release(); crashpad::CrashpadClient client; - char *minidump_url = sentry__dsn_get_minidump_url(options->dsn); + char *minidump_url + = sentry__dsn_get_minidump_url(options->dsn, options->user_agent); SENTRY_TRACEF("using minidump url \"%s\"", minidump_url); std::string url = minidump_url ? std::string(minidump_url) : std::string(); sentry_free(minidump_url); diff --git a/src/sentry_options.c b/src/sentry_options.c index 4814bfefd..014ec491f 100644 --- a/src/sentry_options.c +++ b/src/sentry_options.c @@ -36,6 +36,7 @@ sentry_options_new(void) if (!opts->environment) { opts->environment = sentry__string_clone("production"); } + sentry_options_set_sdk_name(opts, SENTRY_SDK_NAME); opts->max_breadcrumbs = SENTRY_BREADCRUMBS_MAX; opts->user_consent = SENTRY_USER_CONSENT_UNKNOWN; opts->auto_session_tracking = true; @@ -84,6 +85,8 @@ sentry_options_free(sentry_options_t *opts) } sentry__dsn_decref(opts->dsn); sentry_free(opts->release); + sentry_free(opts->sdk_name); + sentry_free(opts->user_agent); sentry_free(opts->environment); sentry_free(opts->dist); sentry_free(opts->http_proxy); @@ -295,6 +298,51 @@ sentry_options_get_transport_thread_name(const sentry_options_t *opts) return opts->transport_thread_name; } +int +sentry_options_set_sdk_name(sentry_options_t *opts, const char *sdk_name) +{ + if (!opts || !sdk_name) { + return 1; + } + const size_t sdk_name_len = strlen(sdk_name); + return sentry_options_set_sdk_name_n(opts, sdk_name, sdk_name_len); +} + +int +sentry_options_set_sdk_name_n( + sentry_options_t *opts, const char *sdk_name, size_t sdk_name_len) +{ + if (!opts || !sdk_name) { + return 1; + } + + sentry_free(opts->sdk_name); + opts->sdk_name = sentry__string_clone_n(sdk_name, sdk_name_len); + + sentry_stringbuilder_t sb; + sentry__stringbuilder_init(&sb); + sentry__stringbuilder_append(&sb, opts->sdk_name); + sentry__stringbuilder_append(&sb, "/"); + sentry__stringbuilder_append(&sb, SENTRY_SDK_VERSION); + + sentry_free(opts->user_agent); + opts->user_agent = sentry__stringbuilder_into_string(&sb); + + return 0; +} + +const char * +sentry_options_get_sdk_name(const sentry_options_t *opts) +{ + return opts->sdk_name; +} + +const char * +sentry_options_get_user_agent(const sentry_options_t *opts) +{ + return opts->user_agent; +} + void sentry_options_set_debug(sentry_options_t *opts, int debug) { diff --git a/src/sentry_options.h b/src/sentry_options.h index c6b3c10dc..060b17f70 100644 --- a/src/sentry_options.h +++ b/src/sentry_options.h @@ -38,6 +38,8 @@ typedef struct sentry_options_s { char *http_proxy; char *ca_certs; char *transport_thread_name; + char *sdk_name; + char *user_agent; sentry_path_t *database_path; sentry_path_t *handler_path; sentry_logger_t logger; diff --git a/src/sentry_scope.c b/src/sentry_scope.c index 0201a673b..a98a583ba 100644 --- a/src/sentry_scope.c +++ b/src/sentry_scope.c @@ -29,8 +29,15 @@ get_client_sdk(void) { sentry_value_t client_sdk = sentry_value_new_object(); - sentry_value_t name = sentry_value_new_string(SENTRY_SDK_NAME); - sentry_value_set_by_key(client_sdk, "name", name); + SENTRY_WITH_OPTIONS (options) { + sentry_value_t sdk_name = sentry_value_new_string(options->sdk_name); + sentry_value_set_by_key(client_sdk, "name", sdk_name); + } + // in case the SDK is not initialized yet, fallback to build-time value + if (sentry_value_is_null(sentry_value_get_by_key(client_sdk, "name"))) { + sentry_value_t sdk_name = sentry_value_new_string(SENTRY_SDK_NAME); + sentry_value_set_by_key(client_sdk, "name", sdk_name); + } sentry_value_t version = sentry_value_new_string(SENTRY_SDK_VERSION); sentry_value_set_by_key(client_sdk, "version", version); diff --git a/src/sentry_transport.c b/src/sentry_transport.c index 4ff909e03..ea62c5620 100644 --- a/src/sentry_transport.c +++ b/src/sentry_transport.c @@ -150,7 +150,8 @@ sentry_transport_free(sentry_transport_t *transport) sentry_prepared_http_request_t * sentry__prepare_http_request(sentry_envelope_t *envelope, - const sentry_dsn_t *dsn, const sentry_rate_limiter_t *rl) + const sentry_dsn_t *dsn, const sentry_rate_limiter_t *rl, + const char *user_agent) { if (!dsn || !dsn->is_valid) { return NULL; @@ -189,7 +190,7 @@ sentry__prepare_http_request(sentry_envelope_t *envelope, sentry_prepared_http_header_t *h; h = &req->headers[req->headers_len++]; h->key = "x-sentry-auth"; - h->value = sentry__dsn_get_auth_header(dsn); + h->value = sentry__dsn_get_auth_header(dsn, user_agent); h = &req->headers[req->headers_len++]; h->key = "content-type"; diff --git a/src/sentry_transport.h b/src/sentry_transport.h index f30788107..e29dc09f5 100644 --- a/src/sentry_transport.h +++ b/src/sentry_transport.h @@ -82,7 +82,7 @@ typedef struct sentry_prepared_http_request_s { */ sentry_prepared_http_request_t *sentry__prepare_http_request( sentry_envelope_t *envelope, const sentry_dsn_t *dsn, - const sentry_rate_limiter_t *rl); + const sentry_rate_limiter_t *rl, const char *user_agent); /** * Free a previously allocated HTTP request. diff --git a/src/sentry_utils.c b/src/sentry_utils.c index bb80a98f0..45f32081e 100644 --- a/src/sentry_utils.c +++ b/src/sentry_utils.c @@ -312,7 +312,7 @@ sentry__dsn_decref(sentry_dsn_t *dsn) } char * -sentry__dsn_get_auth_header(const sentry_dsn_t *dsn) +sentry__dsn_get_auth_header(const sentry_dsn_t *dsn, const char *user_agent) { if (!dsn || !dsn->is_valid) { return NULL; @@ -321,8 +321,14 @@ sentry__dsn_get_auth_header(const sentry_dsn_t *dsn) sentry__stringbuilder_init(&sb); sentry__stringbuilder_append(&sb, "Sentry sentry_key="); sentry__stringbuilder_append(&sb, dsn->public_key); - sentry__stringbuilder_append( - &sb, ", sentry_version=7, sentry_client=" SENTRY_SDK_USER_AGENT); + sentry__stringbuilder_append(&sb, ", sentry_version=7"); + + sentry__stringbuilder_append(&sb, ", sentry_client="); + if (user_agent) { + sentry__stringbuilder_append(&sb, user_agent); + } else { + sentry__stringbuilder_append(&sb, SENTRY_SDK_USER_AGENT); + } return sentry__stringbuilder_into_string(&sb); } @@ -353,15 +359,16 @@ sentry__dsn_get_envelope_url(const sentry_dsn_t *dsn) } char * -sentry__dsn_get_minidump_url(const sentry_dsn_t *dsn) +sentry__dsn_get_minidump_url(const sentry_dsn_t *dsn, const char *user_agent) { - if (!dsn || !dsn->is_valid) { + if (!dsn || !dsn->is_valid || !user_agent) { return NULL; } sentry_stringbuilder_t sb; init_string_builder_for_url(&sb, dsn); - sentry__stringbuilder_append( - &sb, "/minidump/?sentry_client=" SENTRY_SDK_USER_AGENT "&sentry_key="); + sentry__stringbuilder_append(&sb, "/minidump/?sentry_client="); + sentry__stringbuilder_append(&sb, user_agent); + sentry__stringbuilder_append(&sb, "&sentry_key="); sentry__stringbuilder_append(&sb, dsn->public_key); return sentry__stringbuilder_into_string(&sb); } diff --git a/src/sentry_utils.h b/src/sentry_utils.h index 6f96eea64..b5b8e9d3e 100644 --- a/src/sentry_utils.h +++ b/src/sentry_utils.h @@ -80,7 +80,8 @@ void sentry__dsn_decref(sentry_dsn_t *dsn); * described here: * https://docs.sentry.io/development/sdk-dev/overview/#authentication */ -char *sentry__dsn_get_auth_header(const sentry_dsn_t *dsn); +char *sentry__dsn_get_auth_header( + const sentry_dsn_t *dsn, const char *user_agent); /** * Returns the envelope endpoint url used for normal uploads as a newly @@ -92,7 +93,8 @@ char *sentry__dsn_get_envelope_url(const sentry_dsn_t *dsn); * Returns the minidump endpoint url used for uploads done by the out-of-process * crashpad backend as a newly allocated string. */ -char *sentry__dsn_get_minidump_url(const sentry_dsn_t *dsn); +char *sentry__dsn_get_minidump_url( + const sentry_dsn_t *dsn, const char *user_agent); /** * Returns the number of milliseconds since the unix epoch. diff --git a/src/transports/sentry_transport_curl.c b/src/transports/sentry_transport_curl.c index b9f52c881..11f87e5d2 100644 --- a/src/transports/sentry_transport_curl.c +++ b/src/transports/sentry_transport_curl.c @@ -16,6 +16,7 @@ typedef struct curl_transport_state_s { sentry_dsn_t *dsn; CURL *curl_handle; + char *user_agent; char *http_proxy; char *ca_certs; sentry_rate_limiter_t *ratelimiter; @@ -52,6 +53,7 @@ sentry__curl_bgworker_state_free(void *_state) sentry__dsn_decref(state->dsn); sentry__rate_limiter_free(state->ratelimiter); sentry_free(state->ca_certs); + sentry_free(state->user_agent); sentry_free(state->http_proxy); sentry_free(state); } @@ -100,6 +102,7 @@ sentry__curl_transport_start( state->dsn = sentry__dsn_incref(options->dsn); state->http_proxy = sentry__string_clone(options->http_proxy); + state->user_agent = sentry__string_clone(options->user_agent); state->ca_certs = sentry__string_clone(options->ca_certs); state->curl_handle = curl_easy_init(); state->debug = options->debug; @@ -168,7 +171,7 @@ sentry__curl_send_task(void *_envelope, void *_state) curl_bgworker_state_t *state = (curl_bgworker_state_t *)_state; sentry_prepared_http_request_t *req = sentry__prepare_http_request( - envelope, state->dsn, state->ratelimiter); + envelope, state->dsn, state->ratelimiter, state->user_agent); if (!req) { return; } diff --git a/src/transports/sentry_transport_winhttp.c b/src/transports/sentry_transport_winhttp.c index 93848c345..ffb114eb9 100644 --- a/src/transports/sentry_transport_winhttp.c +++ b/src/transports/sentry_transport_winhttp.c @@ -63,7 +63,7 @@ sentry__winhttp_transport_start( winhttp_bgworker_state_t *state = sentry__bgworker_get_state(bgworker); state->dsn = sentry__dsn_incref(opts->dsn); - state->user_agent = sentry__string_to_wstr(SENTRY_SDK_USER_AGENT); + state->user_agent = sentry__string_to_wstr(opts->user_agent); state->debug = opts->debug; sentry__bgworker_setname(bgworker, opts->transport_thread_name); @@ -152,9 +152,11 @@ sentry__winhttp_send_task(void *_envelope, void *_state) uint64_t started = sentry__monotonic_time(); + char *user_agent = sentry__string_from_wstr(state->user_agent); sentry_prepared_http_request_t *req = sentry__prepare_http_request( - envelope, state->dsn, state->ratelimiter); + envelope, state->dsn, state->ratelimiter, user_agent); if (!req) { + sentry_free(user_agent); return; } @@ -283,6 +285,7 @@ sentry__winhttp_send_task(void *_envelope, void *_state) state->request = NULL; WinHttpCloseHandle(request); } + sentry_free(user_agent); sentry_free(url); sentry_free(headers); sentry__prepared_http_request_free(req); diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index 93acedf27..840c85561 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -28,6 +28,7 @@ add_executable(sentry_test_unit test_logger.c test_modulefinder.c test_mpack.c + test_options.c test_path.c test_ratelimiter.c test_sampling.c diff --git a/tests/unit/test_envelopes.c b/tests/unit/test_envelopes.c index e0032706c..7be59db4a 100644 --- a/tests/unit/test_envelopes.c +++ b/tests/unit/test_envelopes.c @@ -29,7 +29,7 @@ SENTRY_TEST(basic_http_request_preparation_for_event) sentry__envelope_add_event(envelope, event); sentry_prepared_http_request_t *req - = sentry__prepare_http_request(envelope, dsn, NULL); + = sentry__prepare_http_request(envelope, dsn, NULL, NULL); TEST_CHECK_STRING_EQUAL(req->method, "POST"); TEST_CHECK_STRING_EQUAL( req->url, "https://sentry.invalid:443/api/42/envelope/"); @@ -58,7 +58,7 @@ SENTRY_TEST(basic_http_request_preparation_for_transaction) sentry__envelope_add_transaction(envelope, transaction); sentry_prepared_http_request_t *req - = sentry__prepare_http_request(envelope, dsn, NULL); + = sentry__prepare_http_request(envelope, dsn, NULL, NULL); TEST_CHECK_STRING_EQUAL(req->method, "POST"); TEST_CHECK_STRING_EQUAL( req->url, "https://sentry.invalid:443/api/42/envelope/"); @@ -91,7 +91,7 @@ SENTRY_TEST(basic_http_request_preparation_for_event_with_attachment) envelope, msg, sizeof(msg) - 1, "attachment"); sentry_prepared_http_request_t *req - = sentry__prepare_http_request(envelope, dsn, NULL); + = sentry__prepare_http_request(envelope, dsn, NULL, NULL); TEST_CHECK_STRING_EQUAL(req->method, "POST"); TEST_CHECK_STRING_EQUAL( req->url, "https://sentry.invalid:443/api/42/envelope/"); @@ -120,7 +120,7 @@ SENTRY_TEST(basic_http_request_preparation_for_minidump) envelope, msg, sizeof(msg) - 1, "attachment"); sentry_prepared_http_request_t *req - = sentry__prepare_http_request(envelope, dsn, NULL); + = sentry__prepare_http_request(envelope, dsn, NULL, NULL); TEST_CHECK_STRING_EQUAL(req->method, "POST"); TEST_CHECK_STRING_EQUAL( req->url, "https://sentry.invalid:443/api/42/envelope/"); diff --git a/tests/unit/test_options.c b/tests/unit/test_options.c new file mode 100644 index 000000000..529b91472 --- /dev/null +++ b/tests/unit/test_options.c @@ -0,0 +1,54 @@ +#include "sentry_options.h" +#include "sentry_testsupport.h" + +SENTRY_TEST(options_sdk_name_defaults) +{ + sentry_options_t *options = sentry_options_new(); + // when nothing is set + + // then both sdk name and user agent should default to the build time + // directives + TEST_CHECK_STRING_EQUAL( + sentry_options_get_sdk_name(options), SENTRY_SDK_NAME); + TEST_CHECK_STRING_EQUAL( + sentry_options_get_user_agent(options), SENTRY_SDK_USER_AGENT); + + sentry_options_free(options); +} + +SENTRY_TEST(options_sdk_name_custom) +{ + sentry_options_t *options = sentry_options_new(); + + // when the sdk name is set to a custom string + const int result + = sentry_options_set_sdk_name(options, "sentry.native.android.flutter"); + + // both the sdk_name and user_agent should reflect this change + TEST_CHECK_INT_EQUAL(result, 0); + TEST_CHECK_STRING_EQUAL( + sentry_options_get_sdk_name(options), "sentry.native.android.flutter"); + + TEST_CHECK_STRING_EQUAL(sentry_options_get_user_agent(options), + "sentry.native.android.flutter/" SENTRY_SDK_VERSION); + + sentry_options_free(options); +} + +SENTRY_TEST(options_sdk_name_invalid) +{ + sentry_options_t *options = sentry_options_new(); + + // when the sdk name is set to an invalid value + const char *sdk_name = NULL; + const int result = sentry_options_set_sdk_name(options, sdk_name); + + // then the value should should be ignored + TEST_CHECK_INT_EQUAL(result, 1); + TEST_CHECK_STRING_EQUAL( + sentry_options_get_sdk_name(options), SENTRY_SDK_NAME); + TEST_CHECK_STRING_EQUAL( + sentry_options_get_user_agent(options), SENTRY_SDK_USER_AGENT); + + sentry_options_free(options); +} diff --git a/tests/unit/test_utils.c b/tests/unit/test_utils.c index 57f1ffb4c..232303415 100644 --- a/tests/unit/test_utils.c +++ b/tests/unit/test_utils.c @@ -152,7 +152,7 @@ SENTRY_TEST(dsn_store_url_with_path) TEST_CHECK_STRING_EQUAL( url, "http://example.com:80/foo/bar/api/42/envelope/"); sentry_free(url); - url = sentry__dsn_get_minidump_url(dsn); + url = sentry__dsn_get_minidump_url(dsn, SENTRY_SDK_USER_AGENT); TEST_CHECK_STRING_EQUAL(url, "http://example.com:80/foo/bar/api/42/minidump/" "?sentry_client=" SENTRY_SDK_USER_AGENT "&sentry_key=username"); @@ -168,7 +168,7 @@ SENTRY_TEST(dsn_store_url_without_path) url = sentry__dsn_get_envelope_url(dsn); TEST_CHECK_STRING_EQUAL(url, "http://example.com:80/api/42/envelope/"); sentry_free(url); - url = sentry__dsn_get_minidump_url(dsn); + url = sentry__dsn_get_minidump_url(dsn, SENTRY_SDK_USER_AGENT); TEST_CHECK_STRING_EQUAL(url, "http://example.com:80/api/42/minidump/" "?sentry_client=" SENTRY_SDK_USER_AGENT "&sentry_key=username"); @@ -176,6 +176,18 @@ SENTRY_TEST(dsn_store_url_without_path) sentry__dsn_decref(dsn); } +SENTRY_TEST(dsn_store_url_custom_agent) +{ + sentry_dsn_t *dsn + = sentry__dsn_new("http://username:password@example.com/42?x=y#z"); + char *url = sentry__dsn_get_minidump_url(dsn, "custom_user_agent"); + TEST_CHECK_STRING_EQUAL(url, + "http://example.com:80/api/42/minidump/" + "?sentry_client=custom_user_agent&sentry_key=username"); + sentry_free(url); + sentry__dsn_decref(dsn); +} + SENTRY_TEST(page_allocator) { #ifndef SENTRY_PLATFORM_UNIX @@ -282,3 +294,43 @@ SENTRY_TEST(dsn_with_ending_forward_slash_will_be_cleaned) sentry__dsn_decref(dsn); } + +SENTRY_TEST(dsn_auth_header_no_user_agent) +{ + sentry_dsn_t *dsn = sentry__dsn_new("https://key@sentry.io/42"); + char *auth_header = sentry__dsn_get_auth_header(dsn, NULL); + TEST_CHECK_STRING_EQUAL(auth_header, + "Sentry sentry_key=key, sentry_version=7, " + "sentry_client=" SENTRY_SDK_NAME "/" SENTRY_SDK_VERSION); + + sentry_free(auth_header); + sentry__dsn_decref(dsn); +} + +SENTRY_TEST(dsn_auth_header_custom_user_agent) +{ + sentry_dsn_t *dsn = sentry__dsn_new("https://key@sentry.io/42"); + char *auth_header = sentry__dsn_get_auth_header(dsn, "user_agent"); + TEST_CHECK_STRING_EQUAL(auth_header, + "Sentry sentry_key=key, sentry_version=7, " + "sentry_client=user_agent"); + + sentry_free(auth_header); + sentry__dsn_decref(dsn); +} + +SENTRY_TEST(dsn_auth_header_null_dsn) +{ + char *auth_header = sentry__dsn_get_auth_header(NULL, NULL); + TEST_CHECK(!auth_header); +} + +SENTRY_TEST(dsn_auth_header_invalid_dsn) +{ + sentry_dsn_t *dsn = sentry__dsn_new("whatever"); + char *auth_header = sentry__dsn_get_auth_header(dsn, NULL); + TEST_CHECK(!auth_header); + + sentry_free(auth_header); + sentry__dsn_decref(dsn); +} diff --git a/tests/unit/tests.inc b/tests/unit/tests.inc index 94b1cbca5..1770edfc1 100644 --- a/tests/unit/tests.inc +++ b/tests/unit/tests.inc @@ -27,8 +27,13 @@ XX(custom_logger) XX(discarding_before_send) XX(distributed_headers) XX(drop_unfinished_spans) +XX(dsn_auth_header_custom_user_agent) +XX(dsn_auth_header_invalid_dsn) +XX(dsn_auth_header_no_user_agent) +XX(dsn_auth_header_null_dsn) XX(dsn_parsing_complete) XX(dsn_parsing_invalid) +XX(dsn_store_url_custom_agent) XX(dsn_store_url_with_path) XX(dsn_store_url_without_path) XX(dsn_with_ending_forward_slash_will_be_cleaned) @@ -51,6 +56,9 @@ XX(mpack_newlines) XX(mpack_removed_tags) XX(multiple_inits) XX(multiple_transactions) +XX(options_sdk_name_custom) +XX(options_sdk_name_defaults) +XX(options_sdk_name_invalid) XX(os) XX(overflow_spans) XX(page_allocator)