TelemetryDeck / KotlinSDK

Kotlin SDK for TelemetryDeck, a privacy-conscious analytics service for apps and websites.
Other
7 stars 6 forks source link

Environment provider should allow clients to set environment values #19

Closed kkostov closed 7 months ago

kkostov commented 7 months ago

This PR changes the behaviour of the default EnvironmentMetadataProvider so that if an environment value is already set in a signal payload, it will not be overwritten.

We need this for the Flutter SDK where the flutter layer (or the user) will set some client version information.

In the iOS SDK this is known as precedence: https://github.com/TelemetryDeck/SwiftClient/blob/main/Tests/TelemetryClientTests/TelemetryClientTests.swift#L77

It will be up to every TelemetryProvider to implement the desired behaviour.

winsmith commented 7 months ago

Fantastico!