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

Add a command to upload Android mapping.txt #1477

Open
brunck opened this issue Oct 12, 2024 · 4 comments
Open

Add a command to upload Android mapping.txt #1477

brunck opened this issue Oct 12, 2024 · 4 comments
Labels
enhancement New feature or request rum Related to [dsyms, flutter-symbols, unity-symbols, react-native, sourcemaps]

Comments

@brunck
Copy link

brunck commented Oct 12, 2024

Feature request description

There is a Gradle task to upload the Android symbols (mapping.txt) to Datadog. Not all Android apps use Gradle to build, however, such as .NET for Android. Decoupling the upload of symbol files from Gradle and providing that here for use in the CLI makes it easy to distribute them via automated builds.

It would be helpful to have a command to upload Android symbols as the Gradle task does. It wouldn't need to generate the file(s), just send them to the server.

Solution

A command to upload Android symbols, more or less like the commands that upload symbols now.

Additional context

No response

Command

None

@brunck brunck added the enhancement New feature or request label Oct 12, 2024
@Drarig29 Drarig29 added the rum Related to [dsyms, flutter-symbols, unity-symbols, react-native, sourcemaps] label Oct 15, 2024
@xgouchet
Copy link
Member

xgouchet commented Oct 16, 2024

Hi @brunck , thanks a lot for bringing our attention to this, we added this suggestion to our backlog.

As of now, we do not offer an official support to mobile apps built with Xamarin/Maui (which I guess is the framework you use since you mentioned .Net), so I can't confirm when we will get to write though.

Also note that the Gradle plugin not only uploads the mapping files, but also embeds a unique Build identifier to match the mapping file with a specific build. Performing the upload outside of that workflow might lead to errors matching an error at runtime with the relevant mapping file.

@fuzzybinary
Copy link
Member

Hi @brunck ,

There is a possible work around for you by utilizing the flutter-symbols upload command (docs). The command is tailored to find all of the files in locations Flutter puts them but it allows you to override almost all of them.

So the following command might work:

datadog-ci flutter-symbols upload --service-name [your-service] --flavor [your-flavor] --version [your-version] --android-mapping --android-mapping-location [location-of-mapping.txt]

Because this command can't determine anything about your application automatically, you'll need to make sure the service, flavor, and version exactly match what you're sending to Datadog in your events, otherwise we won't be able to locate the mapping file you've uploaded.

@brunck
Copy link
Author

brunck commented Oct 16, 2024

@xgouchet .NET MAUI is the cross-platform mobile library/framework, and it sits on top of .NET for Android and .NET for iOS, as 2 examples. It can also work with other platforms in addition to this.

Any native functionality is "down a level" from any cross-platform concerns. That native functionality isn't .NET MAUI, per se. In other words, you can have a native Android application that uses .NET for Android and does not use any .NET MAUI (or only uses some, but that's a different story). In other words, this context is platform-specific to .NET for Android which may or may not involve cross-platform concerns. Another way to look at it is a .NET for Android app is an Android app.

@fuzzybinary this is great news. On the surface it does sound like this might work.

In light of the lack of official support here, are community contributions accepted? It seems that if the flutter-symbols command workaround is successful, this could be adapted to add a command that provides somewhat less friction, perhaps focused only on the uploading of mapping.txt (and anything closely related, such as shrinking it) piece.

@fuzzybinary
Copy link
Member

Yes, community contributions are absolutely accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rum Related to [dsyms, flutter-symbols, unity-symbols, react-native, sourcemaps]
Projects
None yet
Development

No branches or pull requests

4 participants