Skip to content
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

RUM-1915: Add buildId property to the Error event schema #171

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

0xnm
Copy link
Member

@0xnm 0xnm commented Nov 30, 2023

This PR adds error.build_id property, which will contain unique build ID to be used to match with a mapping file (source map) for more precise symbolication, because different builds may have same version and relying on the version is not enough then.

@0xnm 0xnm requested review from a team as code owners November 30, 2023 10:02
xgouchet
xgouchet previously approved these changes Nov 30, 2023
@BenoitZugmeyer
Copy link
Member

Is it different than build_version introduced in #160 ? Can it be collocated with it? (meaning: put build_id in CommonProperties next to build_version)

@0xnm
Copy link
Member Author

0xnm commented Dec 4, 2023

@BenoitZugmeyer Yes, it is different. It is rather as versionCode on Android (which we don't sent yet, but probably we will), both version and build_version can be thought as marketing (shown to the user) and non-marketing (simple int) versions of the build set by the developer. While non-marketing version has to be unique for each app submission to the store (it is true for the AppStore and Play Store at least), it is possible to have different builds locally with same build_version.

The point of build_id though is to give unique UUID for each build made automatically, without the need for the developer to set it. It is a part of DataDog/dd-sdk-android-gradle-plugin#211 where we need to precisely match mapping file produced by the build with the error sent from the application.

@BenoitZugmeyer
Copy link
Member

BenoitZugmeyer commented Dec 4, 2023

Thanks for the explanation. Maybe it's worth adding a bit more context in the field description.

Is there a reason to nest this field in @error? Could it be collocated with @build_version? Or, since FMU this is not user facing, maybe it could be added to @_dd.build_id?

@0xnm 0xnm force-pushed the nogorodnikov/rum-1915/add-build-id-to-error-schema branch from 442a5bd to 8338837 Compare December 4, 2023 10:42
@0xnm
Copy link
Member Author

0xnm commented Dec 4, 2023

It is needed only for the symbolication process, to match stacktrace with symbols in the mapping file. And so since stacktrace is the property of error only, it is in the error level well, next to it, no need to pull it up to the common properties.

I've added a word that it is generated ID in the description.

xgouchet
xgouchet previously approved these changes Dec 4, 2023
@bcaudan
Copy link
Contributor

bcaudan commented Dec 6, 2023

I would also lean toward having this attribute at the same level than version or build_version.
For now, we only associate source code for error stack (and handling stack) but we could think of later collecting initiator stack for other events, for example to see from where in the source code a resource has been triggered.

@0xnm 0xnm force-pushed the nogorodnikov/rum-1915/add-build-id-to-error-schema branch from 8338837 to 0d895c5 Compare December 6, 2023 16:03
@0xnm
Copy link
Member Author

0xnm commented Dec 6, 2023

@bcaudan Thanks for the suggestion, it indeed makes sense keeping in mind the use-case you proposed. I pulled it up to the top level, in the common schema.

@0xnm 0xnm force-pushed the nogorodnikov/rum-1915/add-build-id-to-error-schema branch from 0d895c5 to 0c3ddb2 Compare December 6, 2023 16:05
Copy link

@andreicoj andreicoj left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@bcaudan bcaudan left a comment

Choose a reason for hiding this comment

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

LGTM

@0xnm 0xnm merged commit 8aa3734 into master Dec 7, 2023
6 of 7 checks passed
@0xnm 0xnm deleted the nogorodnikov/rum-1915/add-build-id-to-error-schema branch December 7, 2023 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants