How to send Version code of android app as Config to Datadog?
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
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?
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.
@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?
There is no issue in sending Version code as customAttribute.
It is about the usage like as per the attached image, My team wants to see VersioCode at a glance.
It will be very helpful, sometimes for the same build we will have multiple version codes . Easy to identify versionCode changes across the sessions.
Thanks for your reply. If you add the versionCode as a custom facet then you can add it as a column to the session dashboard. You would then see the version codes at a glance for all the sessions. Would this solve the problem?
Yes. We can add custom facet. I'm aware of it.
But the actual problem here is we have a team who focused on core features does not aware of Datadog RUM options. Myself is like responsible for Datadog integration for android.
All devs within team cannot configure these options and as version code is very vital for builds. It will be great if you guys consider to add custom tag support with RUM. It can be minimum in number definitely it will help.
Different teams/stack holders definitely have req to see particular attributes at initial glance without much configuration. Not now atleast in future.
@manju1375 Unfortunately, there are technical considerations that do not allow us currently to add this sort of support for custom tags. I hope this changes in the future, but cannot guarantee that this will be supported.
It's picked up correctly in iOS (build number). What's the hold up in Android?
@kevin-abiera On ios this attribute is automatically collected, however what I think @manju1375 is referring to is seeing the attribute in the tags at the top of the session, and this is not possible on ios either. I'll look into automatically collecting the versionCode on android so that this behavior will be aligned
Hi @jonathanmos
Is there any update on this? On the datadog web app I cannot query by Android version code. I'm not sure if I missed it but I do not see version code when looking at the sessions explorer
Thank you
@ersen-lw this has recently been added in this pr, so it should be available in the next version