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

Release/v6.6.0 #2042

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
baadae6
feat(correlation): added the trace correlation property to the Event …
lemnik Apr 25, 2024
187e954
Merge pull request #2023 from bugsnag/PLAT-12049/correlation-event-model
lemnik Apr 29, 2024
b00e1b8
Merge pull request #2029 from bugsnag/master
lemnik May 16, 2024
084df8b
Add Android 14 tests
twometresteve May 15, 2024
950d5a2
Merge branch 'next' into tms/android-14
twometresteve May 18, 2024
c61bd2b
Merge pull request #2032 from bugsnag/tms/android-14
twometresteve May 21, 2024
df65b5f
refactor(ndk): added BSG_KSJSONCodec to the NDK plugin
lemnik May 1, 2024
6c59e8f
refactor(ndk): add simplified ISO 8601 time formatting to BSG_KSCrash…
lemnik May 2, 2024
7681abf
refactor(ndk): rewrote the event_writer.c to output JSON instead of a…
lemnik May 2, 2024
481b0de
refactor(ndk): removed old binary-dump event logic & added a new test…
lemnik May 9, 2024
6d74432
fix(ndk): fixed a bug where the breadcrumb metadata was double-nested
lemnik May 9, 2024
6f06a86
fix(ndk): moved the NDK JSON payloads back to their own directory so …
lemnik May 9, 2024
a1882f6
fix(ndk): BugsnagEventMapper now handles date formats in the "t{epoch…
lemnik May 13, 2024
dd2f56a
fix(ndk): added thread.type to ndk events, and removed invalid / paus…
lemnik May 13, 2024
09751aa
fix(ndk): fixed NDK thread writing behaviour
lemnik May 13, 2024
ece1825
fix(ndk): added the static usage metrics data to the native events
lemnik May 14, 2024
0abb887
test(ndk): added a basic ReportDiscardScanner test
lemnik May 15, 2024
6c17539
refactor(ndk event): replaced STRING_**_EMPTY macros with inline func…
lemnik May 21, 2024
74b6001
refactor(ndk event): copy the entire event_path instead of relying on…
lemnik May 21, 2024
3161e39
refactor(ndk event): NaN & Inf values are encoded to JSON as 'null'
lemnik May 22, 2024
308c95f
Merge pull request #2027 from bugsnag/PLAT-12009/json-event
lemnik May 22, 2024
6c29641
Update AGP and related versions for mazerunner (#2030)
YYChen01988 May 22, 2024
9f62d7a
fix(Session Tracker) fixed logic of discarding session (#2033)
YYChen01988 May 24, 2024
5bc8d99
fix(errorCallback) separating throw exception out (#2036)
YYChen01988 May 31, 2024
2201a50
refactor(ndk event): iterate directly over metadata elements in NDK i…
lemnik May 30, 2024
9a6104c
test(ndk): fixed event_serialization.json to align with the expected …
lemnik May 30, 2024
af3f5bc
test(ndk): manually cause a stack-overflow in CXXStackoverflowScenari…
lemnik May 30, 2024
2cce055
Merge pull request #2035 from bugsnag/PLAT-12075/ndk-metadata-iterator
lemnik Jun 4, 2024
d5ac07d
Reinstate instrumentation tests using MacOS test boxes as a platform …
Cawllec Jun 6, 2024
843bdb7
Merge branch 'next' into integration/error-correlation
lemnik Jun 12, 2024
5040101
feat(native): support kernels running with a 16kB page size
lemnik Jun 13, 2024
341930e
feat(event correlation): changed the casing of the `traceid`->`traceI…
lemnik Jun 13, 2024
e87cc38
Merge pull request #2040 from bugsnag/PLAT-12268/16kb-page-support
lemnik Jun 13, 2024
e7eaf36
Merge branch 'next' into integration/error-correlation
lemnik Jun 13, 2024
1f49c06
chore(changelog): fixed the CHANGELOG entry for PR#2040
lemnik Jun 13, 2024
02dfd6e
Merge pull request #2038 from bugsnag/integration/error-correlation
lemnik Jun 13, 2024
e8d6bdc
release/v6.6.0
YYChen01988 Jun 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor(ndk): removed old binary-dump event logic & added a new test…
… for the JSON serializer
  • Loading branch information
lemnik committed May 22, 2024
commit 481b0de272bd85015f912e36a61e8880caf7b587
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import java.util.concurrent.locks.Lock
import java.util.concurrent.locks.ReentrantLock

internal abstract class FileStore(
private val storageDir: File,
val storageDir: File,
private val maxStoreCount: Int,
private val comparator: Comparator<in File?>,
protected open val logger: Logger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,7 @@ public static String getContext() {
*/
@NonNull
public static File getNativeReportPath() {
return getNativeReportPath(getPersistenceDirectory());
}

private static @NonNull File getNativeReportPath(@NonNull File persistenceDirectory) {
return new File(persistenceDirectory, "bugsnag/native");
}

private static @NonNull File getPersistenceDirectory() {
return getClient().getConfig().getPersistenceDirectory().getValue();
return getClient().getEventStore().getStorageDir();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.bugsnag.android.internal.ImmutableConfig
import org.junit.Assert.assertArrayEquals
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertSame
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
Expand All @@ -21,7 +22,6 @@ import org.mockito.Mockito.times
import org.mockito.Mockito.verify
import org.mockito.Mockito.`when`
import org.mockito.junit.MockitoJUnitRunner
import java.io.File
import java.nio.file.Files

/**
Expand Down Expand Up @@ -87,10 +87,9 @@ internal class NativeInterfaceApiTest {
@Test
fun getNativeReportPathPersistenceDirectory() {
val customDir = Files.createTempDirectory("custom").toFile()
`when`(immutableConfig.persistenceDirectory).thenReturn(lazy { customDir })
`when`(eventStore.storageDir).thenReturn(customDir)
val observed = NativeInterface.getNativeReportPath()
val expected = File(customDir, "bugsnag/native")
assertEquals(expected, observed)
assertSame(customDir, observed)
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ public final class com/bugsnag/android/ndk/NativeBridge : com/bugsnag/android/in
public final fun clearFeatureFlag (Ljava/lang/String;)V
public final fun clearFeatureFlags ()V
public final fun clearMetadataTab (Ljava/lang/String;)V
public final fun deliverReportAtPath (Ljava/lang/String;)V
public final fun getCurrentCallbackSetCounts ()Ljava/util/Map;
public final fun getCurrentNativeApiCallUsage ()Ljava/util/Map;
public final fun getSignalUnwindStackFunction ()J
public final fun initCallbackCounts (Ljava/util/Map;)V
public final fun install (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZIZII)V
public final fun install (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZIZII)V
public final fun notifyAddCallback (Ljava/lang/String;)V
public final fun notifyRemoveCallback (Ljava/lang/String;)V
public fun onStateChange (Lcom/bugsnag/android/StateEvent;)V
Expand Down
2 changes: 1 addition & 1 deletion bugsnag-plugin-android-ndk/detekt-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<CurrentIssues>
<ID>CyclomaticComplexMethod:NativeBridge.kt$NativeBridge$override fun onStateChange(event: StateEvent)</ID>
<ID>LongMethod:EventOnDiskTests.kt$EventOnDiskTests$@Test fun testEvent()</ID>
<ID>LongParameterList:NativeBridge.kt$NativeBridge$( apiKey: String, reportingDirectory: String, lastRunInfoPath: String, consecutiveLaunchCrashes: Int, autoDetectNdkCrashes: Boolean, apiLevel: Int, is32bit: Boolean, threadSendPolicy: Int, maxBreadcrumbs: Int, )</ID>
<ID>LongParameterList:NativeBridge.kt$NativeBridge$( apiKey: String, reportingDirectory: String, lastRunInfoPath: String, eventUUID: String, consecutiveLaunchCrashes: Int, autoDetectNdkCrashes: Boolean, apiLevel: Int, is32bit: Boolean, threadSendPolicy: Int, maxBreadcrumbs: Int, )</ID>
<ID>NestedBlockDepth:NativeBridge.kt$NativeBridge$private fun deliverPendingReports()</ID>
<ID>TooManyFunctions:NativeBridge.kt$NativeBridge : StateObserver</ID>
<ID>UseCheckOrError:ResourceUtils.kt$throw IllegalStateException("Failed to read JSON from $resourceName")</ID>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package com.bugsnag.android.ndk

import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Test
import java.io.File

class NativeJsonSerializeTest {

Expand All @@ -11,10 +15,25 @@ class NativeJsonSerializeTest {
}
}

external fun run(): Int
private val path = File(System.getProperty("java.io.tmpdir"), this::class.simpleName!!)

@Before
fun setupTmpdir() {
path.mkdirs()
}

@After
fun deleteTmpdir() {
path.deleteRecursively()
}

external fun run(outputDir: String): Int

@Test
fun testPassesNativeSuite() {
verifyNativeRun(run())
verifyNativeRun(run(path.absolutePath))
val jsonFile = path.listFiles()!!.maxByOrNull { it.lastModified() }!!
val expected = loadJson("event_serialization.json")
assertEquals(expected, jsonFile.readText())
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading