`SentryEvent#getExtras` is package-private.
See original GitHub issuePlatform:
- Android -> If yes, which Device API (and compileSdkVersion/targetSdkVersion/Build tools) version?
Device
API
: 26compileSdkVersion
: 30targetSdkVersion
: 30buildTools
: applied by Android Gradle Plugin
IDE:
- Android Studio -> If yes, which version?
4.2 beta 3
Build system:
- Gradle -> If yes, which version?
6.7.1
Android Gradle Plugin:
- Yes -> If yes, which version?
4.2.0-beta03
Sentry Android Gradle Plugin:
- No
Proguard/R8:
- Disabled
Platform installed with:
- Maven Central
The version of the SDK: 4.3.0
I have the following issue:
I’m writing a library that proxies Sentry
. One of the use cases we have is to provide a callback to the library client before sending a SentryEvent
. In this callback we’d like to attach all SentryEvent
’s extras
so the client can decide what to do: add some new extras, update or existing ones.
As Sentry
doesn’t allow us to get all extras (only a single extra
for key
), I can’t see a way to implement our use case.
Would you consider making SentryEvent#getExtras
a public method?
Actual result:
SentryEvent#getExtras
is package-private
Expected result:
SentryEvent#getExtras
is public
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Issues - GitHub
Currently the only usage of getTags / getExtras is sentry-java that I can see is in ContextBuilderHelper.helpBuildingEvent where it is used ...
Read more >io.sentry.event.Event Maven / Gradle / Ivy - Download JAR files
The class is part of the package ➦ Group: io.sentry ➦ Artifact: sentry ... public class Event implements Serializable { private static final...
Read more >io.sentry.event.Event.setSentryInterfaces java code examples ...
Ensures that every field in the {@code Event} are immutable to avoid confusion later. */ private void makeImmutable() { // Make the tags...
Read more >Retrieve an Event for a Project - Sentry Documentation
Product documentation for Sentry.io and its SDKs. ... GET /api/0/projects/{organization_slug}/{project_slug}/events/{event_id}/.
Read more >EventBuilder.java - 4949.apk源代码分析 - 摸瓜
package io.sentry.event; ... private static final HostnameCache HOSTNAME_CACHE = new HostnameCache(HOSTNAME_CACHE_DURATION); ... getExtra().put(str, obj);.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
we made package-private because our public API already exposes a setter with key/value and a remove method with key, for every Map, so we don’t expose the field with a getter.
@maciejwalkowiak option of exposing the getter but returning an immutable copy was an option at that time, but we preferred to follow the other SDKs which is not exposing at all, I like this idea to be honest
The alternative would be to make
getExtras
public and return a copy of the map, but same pattern would have to be applied in other places in the SDK too.