Skip to content
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

Billing explanation logs #7747

Merged
merged 2 commits into from
Feb 15, 2024
Merged

Conversation

VysotskiVadim
Copy link
Contributor

@VysotskiVadim VysotskiVadim commented Feb 12, 2024

Description

From time to time customers asks us why they are billed for a certain amount of trip/freedrive sessions? This PR introduces answer to that question. A customer can filter logcat output using BillingExplanation and see why exactly certain billed session started/stopped/paused/resumed.

This is port of #7710 which has already helped to a customer.

Screenshots or Gifs

@VysotskiVadim VysotskiVadim requested a review from a team as a code owner February 12, 2024 16:46
Copy link

github-actions bot commented Feb 12, 2024

Changelog

Features

  • Added billing explanation logs. Now Navigation SDK explains in the logs why certain Active Guidance or Free Drive Trip session started/stopped/paused/resumed. Billing explanations have [BillingExplanation] prefix in the logcat. [#7710](https://github.com/mapbox/mapbox-navigation-android/pull/7710)

Bug fixes and improvements

Known issues ⚠️

Other changes

  • Added Polish translation for UI elements.
Android Auto Changelog

Features

Bug fixes and improvements

  • The app is now considered as the one in active navigation only when an active route is set to MapboxNavigation. Previously it was always considered active. [#7366](https://github.com/mapbox/mapbox-navigation-android/pull/7366)
  • When Android Auto host tells the app to stop active navigation because another app starts navigating, now SDK will enter FreeDrive mode instead of stopping trip session completely. [#7366](https://github.com/mapbox/mapbox-navigation-android/pull/7366)

Copy link

codecov bot commented Feb 12, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (56332c6) 74.11% compared to head (94d352c) 74.12%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #7747      +/-   ##
============================================
+ Coverage     74.11%   74.12%   +0.01%     
  Complexity     6252     6252              
============================================
  Files           852      852              
  Lines         33672    33696      +24     
  Branches       4011     4012       +1     
============================================
+ Hits          24955    24977      +22     
- Misses         7167     7169       +2     
  Partials       1550     1550              
Files Coverage Δ
...pbox/navigation/core/accounts/BillingController.kt 91.08% <93.33%> (+0.10%) ⬆️

@DzmitryFomchyn
Copy link
Contributor

LGTM. Will we document it somewhere?

@@ -215,18 +217,23 @@ internal class BillingController(
is NavigationSessionState.Idle -> {
getRunningOrPausedSessionSkuId()?.let {
billingService.pauseBillingSession(it)
logI(BILLING_EXPLANATION_CATEGORY) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VysotskiVadim I think we can test it, and check that we print correct reason to logs.

Copy link
Contributor Author

@VysotskiVadim VysotskiVadim Feb 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, we can!
Let's not announce this feature in public documentation until unit tests are in place.

@VysotskiVadim VysotskiVadim merged commit 659d1ed into main Feb 15, 2024
39 of 43 checks passed
@VysotskiVadim VysotskiVadim deleted the NAVAND-1792-port-billing-explanation-logs branch February 15, 2024 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants