DataDog / dd-sdk-android

Datadog SDK for Android (Compatible with Kotlin and Java)
Apache License 2.0
150 stars 59 forks source link

How to send Version code of android app as Config to Datadog? #2289

Open manju1375 opened 4 days ago

manju1375 commented 4 days ago

Question

Im using Configuration.Builder(someproperties).build() to send config info to Datadog RUM. I understand from docs it will take version by gradle.

But I want to send versionCode as well to Datadog RUM and that should be separate Property. I used the below code for the same. setAdditionalConfiguration(mapOf(Pair(VERSION_CODE,BuildConfig.VERSION_CODE))).build() on Builder

Im expecting versioncode will displayed in black box like below. But it is not working as expected

Untitled.pdf

But it is not displayed anywhere in the RUM explorer.

Finally Im using now GlobalRumMonitor.get().addAttribute(VERSION_CODE,BuildConfig.VERSION_CODE)

This will send info to customAttributes which is not accurate for me.

Let me know how to achieve the same?

jonathanmos commented 4 days ago

Hi @manju1375! Regarding additionalConfiguration, it will not be helpful here as these parameters are mostly not displayed in the session. I'm looking to see if there is an alternative to customAttributes and will get back to you as soon as I have an answer.

jonathanmos commented 23 hours ago

@manju1375 after some checks, we do not allow custom tags with RUM nor do we currently have plans to support this. The correct way to send this is what you have been doing - with customAttributes - and you can create a facet based upon that. You mentioned that customAttributes is not accurate for you - can you explain further what issue you are having with using it?