Closed
Description
Platform:
- Android -> If yes, which Device API (and compileSdkVersion/targetSdkVersion/Build tools) version?
- Java -> If yes, which Java (and sourceCompatibility/targetCompatibility) version?
- Kotlin -> If yes, which Kotlin (and jvmTarget) version?
- NDK -> If yes, which NDK/CMake version?
- React-Native -> If yes, which version?
- Timber -> If yes, which version?
- Log4j2 -> If yes, which version?
- Logback -> If yes, which version?
- Spring -> If yes, which version?
IDE:
- Android Studio -> If yes, which version?
- IntelliJ -> If yes, which version?
- Other -> NetBaens 12?
Build system:
- Gradle -> If yes, which version?
- Buck -> If yes, which version?
- Bazel -> If yes, which version?
- Maven -> If yes, which version?
- Other -> If yes, which one?
Android Gradle Plugin:
- Yes -> If yes, which version?
- No
Sentry Android Gradle Plugin:
- Yes -> If yes, which version?
- No
Proguard/R8:
- Enabled
- Disabled
Platform installed with:
- JCenter
- Bintray
- Maven Central
- Manually
The version of the SDK:
io.sentry:sentry:4.0.0
I have the following issue:
- documentation is not up to date https://docs.sentry.io/platforms/java/performance/custom-instrumentation/
- when using 4.0.0-alpha.3 it was working
- I'm trying to work with spans
Steps to reproduce:
public List<Org> getOrgsFamaly() {
ITransaction transaction = Sentry.startTransaction("getOrgsFamaly()");
transaction.setOperation("famaly");
List<Org> result = new ArrayList<>();
result.add(build(4, 2));
result.add(build(2, 3));
transaction.finish();
return result;
}
private Org build(int childrens, int leafs){
ISpan span = Sentry.getSpan();
// span is always null
if(nonNull(span)){
ISpan innerSpan = span.startChild("famaly", "childes_"+childrens+"::leafs_"+leafs);
Org org = new Org(childrens, leafs);
innerSpan.finish();
return org;
}
return null;
}
Actual result:
- span is always null
Expected result:
- To have spans inside one transaction