-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix: Making it possible to set extra properties for AV/Media heartbeats #3
Bugfix: Making it possible to set extra properties for AV/Media heartbeats #3
Conversation
…rops for exempt/custom privacy mode
…unnables when processing the heartbeat
Hi @felix-ulmer, we're planning to release |
@felix-ulmer Due to global changes in the |
c5255bc
to
5df7efe
Compare
…ps_for_heartbeats # Conflicts: # build.gradle.kts # piano-analytics/build.gradle # piano-analytics/build.gradle.kts # piano-analytics/src/main/java/io/piano/analytics/ConfigurationStep.java # piano-analytics/src/main/java/io/piano/analytics/InternalContextPropertiesStep.java # piano-analytics/src/main/java/io/piano/analytics/PrivacyStep.java # piano-analytics/src/main/java/io/piano/analytics/avinsights/AVRunnable.java # piano-analytics/src/main/java/io/piano/analytics/avinsights/Media.java # piano-analytics/src/test/java/io/piano/analytics/BuildStepTest.java # piano-analytics/src/test/java/io/piano/analytics/InternalContextPropertiesStepAPI16Test.java # piano-analytics/src/test/java/io/piano/analytics/TestResources.java # settings.gradle.kts
Yes, I saw that today unfortunately! :( I'm currently redoing the changes based on the new architecture of the |
*/ | ||
@Suppress("unused", "MemberVisibilityCanBePrivate") // Public API. | ||
fun setExtraProps(extraProps: Array<out Property>) = apply { | ||
this.extraProps = extraProps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Array values can be modified outside, it's better to make a copy here via extraProps.copyOf()
* @return this [MediaHelper] instance | ||
*/ | ||
@Suppress("unused", "MemberVisibilityCanBePrivate") // Public API. | ||
fun setExtraProps(extraProps: Array<out Property>) = apply { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be we should add fun setExtraProps(vararg extraProps: Property) = setExtraProps(extraProps)
also. What do you think?
…he array to avoid external side effects
We had the problem with the SDK before that all our heartbeat events were missing all of the av insights standard + custom properties like the
av_content_x
- Properties.This PR is fixing this by:
Media
- class to store theextraProps
- map + making it accessible.AVRunnable
to pass the extraProps instead ofnull
as it was before.