cpp_client_telemetry
cpp_client_telemetry copied to clipboard
How to override the DeviceInfo.OsVersion field from client app?
Discussed in https://github.com/microsoft/cpp_client_telemetry/discussions/1092
Originally posted by nishchith-cp January 20, 2023
Need to set the DeviceInfo.OsVersion
from the client side.
Currently, the DeviceInfo.OsVersion
is being populated within the SDK. We want to set this from our client to support the format xx.xx.xx
I don't see any APIs exposed for the same. I tried to override the field using setContext API but it doesn't seem to work.
Kindly help with the same. Is there any way to override this from the client side?
Sorry for confusion, moving this back from Discussion to Issue. Adding comment here again -
The 1ds core C++ provides ISemanticContext::SetOsVersion() to explicitly set the OS version. But I don't see this implemented for iOS - https://github.com/microsoft/cpp_client_telemetry/blob/974c581854d4f6d72a3f889b5520e0e08ba96d86/wrappers/obj-c/ODWSemanticContext.mm. I faster way would be to contribute the change.
@lalitb When can we expect this change from the OneDS team?
@nishchith-cp - faster way would be to contribute the change. I don't think it is any of the maintainers would have required bandwidth for this anytime soon.
@lalitb @nishchith-cp - I have a change that'd expose this via C API, verifying in a test that ext.os.ver
is populated. You can also use C++ semantic context pattern that'd be shown in my PR. One of the tricks that in CS3 schema the field should actually be set via COMMONFIELDS_OS_BUILD
.
@maxgolov Would the setContext API work with your changes? Could you share your PR for the same?