- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 460
Ref: Make hints Map<String, Object> instead of only Object #1929
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
Conversation
| Codecov Report
 @@             Coverage Diff              @@
##              6.x.x    #1929      +/-   ##
============================================
+ Coverage     80.48%   80.52%   +0.04%     
- Complexity     2907     2910       +3     
============================================
  Files           213      214       +1     
  Lines         10776    10851      +75     
  Branches       1427     1432       +5     
============================================
+ Hits           8673     8738      +65     
- Misses         1587     1595       +8     
- Partials        516      518       +2     
 Continue to review full report at Codecov. 
 | 
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.
I skimmed through it and the only question I have is: Do we plan on documenting these hint keys so folks can find/use them in beforeSend/eventProcessors?
Perhaps it'd be best to have them available in public static String's and use some sort of prefixing. To avoid conflict as more hints are added and to be easier to understand what the value represents.
        
          
                sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                sentry-android-core/src/main/java/io/sentry/android/core/EnvelopeFileObserver.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                sentry-android-okhttp/src/main/java/io/sentry/android/okhttp/SentryOkHttpInterceptor.kt
              
                Outdated
          
            Show resolved
            Hide resolved
        
      | 
 Yes, the idea is to document the considered public ones, as JS does, https://docs.sentry.io/platforms/javascript/configuration/filtering/#hints-for-breadcrumbs Some of them are already documented, e.g.  We could make a class with those constants or really just document it via docs. | 
| I think I'd also vote for having a class with constants, then all the keys are in the same place, which is easier for us and for those who is looking at the public API. Another thing I noticed - some of the keys are capitalized and some are full-lowercase - should we align all of them and use just lowercase? (I guess the lowercase comes from JS) | 
        
          
                ...droid-core/src/main/java/io/sentry/android/core/internal/gestures/SentryGestureListener.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
      | @ApiStatus.Internal public static final String SENTRY_TYPE_CHECK_HINT = "sentry:typeCheckHint"; | ||
|  | ||
| /** Used for Synthetic exceptions. */ | ||
| public static final String SENTRY_SYNTHETIC_EXCEPTION = "syntheticException"; | 
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.
Kept as it is since its part of the common docs for hints
Co-authored-by: Roman Zavarnitsyn <[email protected]>
📜 Description
Ref: Make hints Map<String, Object> instead of only Object
💡 Motivation and Context
Closes #1558
💚 How did you test it?
Adapted unit tests.
📝 Checklist
🔮 Next steps