Giter Site home page Giter Site logo

Comments (4)

kahest avatar kahest commented on June 10, 2024 1

@supervacuus I see that this constructs opts->user_agent with name and version, but I couldn't find where this is used to set a user agent header on the transport, but I guess I looked at the wrong place - is this the relevant code?

state->user_agent = sentry__string_clone(options->user_agent);

state->user_agent = sentry__string_to_wstr(opts->user_agent);

from sentry-native.

supervacuus avatar supervacuus commented on June 10, 2024 1

Similarly, the minidump URL for crashpad is constructed from the DSN and the user-agent:

sentry__dsn_get_minidump_url(const sentry_dsn_t *dsn, const char *user_agent)
{
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__stringbuilder_append(&sb, user_agent);
sentry__stringbuilder_append(&sb, "&sentry_key=");
sentry__stringbuilder_append(&sb, dsn->public_key);
return sentry__stringbuilder_into_string(&sb);
}

That should also make it clearly visible when checking LB issues.

from sentry-native.

supervacuus avatar supervacuus commented on June 10, 2024

Hi @kahest

Currently, the SDK only sets the x-sentry-auth field in the transport:

This is not true. We also set the user-agent to sdk_name/version:

https://github.com/getsentry/sentry-native/blob/master/src/sentry_options.c#L322-L329

Since breakpad uses the same transport as any other envelope, this is also true with minidumps from breakpad.

With crashpad, the current solution is to append the sentry_client as part of a set of X-Sentry-Auth query parameters with the minidump request. The format is the same as with the user-agent above.

from sentry-native.

kahest avatar kahest commented on June 10, 2024

@supervacuus Perfect, thanks for confirming - closing this now

from sentry-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.