OTel service version field should contain the version of the client app
When exporting to OTel, every telemetry item contains a field called telemetry.distro.version and one called service.version. Currently both are set to the version of the OpenTelemetry SDK. If I understand correctly, service.version was intended to contain the version of the "service" (= web server application) that the telemetry describes. Therefore the Embrace SDK should set this field to the version of the mobile app.
See https://github.com/embrace-io/embrace-android-sdk/blob/d2581cf323fdad3e11f380db8c02c757b7455d5f/embrace-android-otel/src/main/kotlin/io/embrace/android/embracesdk/internal/otel/config/OtelSdkConfig.kt#L32-L34
I would send a PR but I need some guidance regarding where to obtain the application version, because it seems OtelSdkConfig is initialized before CoreModule.
Hi there - this isn't done right now because it would require doing a disk read before starting the SDK, which would hamper performance. We have a task to automatically populate this in a performant way without doing a disk read before we start the SDK, but we haven't done it yet.
In the meantime, you can override what is set by re-setting this before you start the SDK by calling Embrace.setResourceAttribute()?
hi @mmarczell-graphisoft - i just wanted to follow up and see if that worked for you?
Hi @eliabsisay, yes the recommended workaround worked.
@bidetofevil can you provide some context on why this ended up "not planned"? I can see there was a PR resolving this in the way you mentioned (no disk reads) and it was closed without being merged.
I don't think this was supposed to be closed
Sorry - GitHub Actions auto closed this.
Yes, we're going to get to this soon. We are looking to release 8.0 soon, and we'll get to this right after, so likely looking at a late December time frame?
Which PR are you referencing? If it's done and tested we might even be able to get it in sooner (no promises 😅 )
#2484 was an AI-authored PR but @fractalwrench was not satisfied so it wasn't merged.