-
-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow setting sdk_name at runtime #834
Conversation
|
@markushi how can we help to unblock this? |
@marandaneto No all good, I was just waiting for #827 to be merged, as it changes all public API with string args. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but a couple of issues regarding options-initialization need to be fixed first.
h->value = sentry__dsn_get_auth_header(dsn); | ||
SENTRY_WITH_OPTIONS (options) { | ||
h->value = sentry__dsn_get_auth_header(dsn, options->user_agent); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as with options in the scope-private get_client_sdk
... I would provide a fallback (even though, in this case, this is less probable to happen before the options have been initialized). But maybe we can shift the options access to sentry__curl_transport_start
and add a user_agent
field to curl_transport_state_s
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fact that no unit-test screams at this is also problematic. Can you please add assertions for "user-agent" in the unit tests that "cover" sentry__prepare_http_request()
? Thx!
@@ -0,0 +1,65 @@ | |||
#include "sentry_options.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most sentry_options_*
tests are in test_basic.c
, but I have no problems with a file focusing explicitly on option initialization.
Allows setting a custom
sdk_name
.This is useful for hybrid SDK which do not compile their own version of sentry_native (E.g. Dart/Flutter re-uses the pre-compiled Android NDK version).
Fixes: #821