Skip to content

Commit 388bb10

Browse files
tatiana-yangithub-actions[bot]
authored andcommitted
[tracer] Move MapboxTracing, TracingBackendType and Tracing to common and deprecate in gl-native and maps-android. Use common.MapboxTracing instead of maps.MapboxTracing
GitOrigin-RevId: a3839fb1b6bac9e645faaa4432e311e2f7c5b0c1
1 parent 25a07c7 commit 388bb10

File tree

4 files changed

+15
-68
lines changed

4 files changed

+15
-68
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Mapbox welcomes participation and contributions from everyone.
66
## Features ✨ and improvements 🏁
77
* Expose `LineLayer.lineCutoutOpacity` and `LineLayer.lineCutoutWidth` to make route lines visible through obstructing 3D buildings and other aboveground features.
88

9+
## Bug fixes 🐞
10+
* MapboxTracing was deprecated and moved to package com.mapbox.common.
11+
912
# 11.15.0-beta.2 August 15, 2025
1013
## Bug fixes 🐞
1114
* Fix tile border debug feature flickering on globe

maps-sdk/src/main/java/com/mapbox/maps/MapboxTracing.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ package com.mapbox.maps
33
/**
44
* Allows to control several levels of tracing that could be useful to understand the performance of Mapbox Maps.
55
* For more details about Android tracing refer to relevant section of DEVELOPING.md file.
6+
* API is deprecated, please use com.mapbox.common.MapboxTracing
67
*/
8+
@Deprecated(
9+
"Please use com.mapbox.common.MapboxTracing instead.",
10+
replaceWith = ReplaceWith("MapboxTracing", "com.mapbox.common.MapboxTracing")
11+
)
712
object MapboxTracing {
8-
9-
internal const val MAPBOX_TRACE_ID = "mbx"
10-
11-
internal var platformTracingEnabled = false
13+
private val impl = com.mapbox.common.MapboxTracing
1214

1315
/**
1416
* Enable all the traces: native rendering engine traces and Android Maps SDK traces.
@@ -17,8 +19,7 @@ object MapboxTracing {
1719
* This tracing is designed to be usable in release builds to enable local profiling.
1820
*/
1921
fun enableAll() {
20-
platformTracingEnabled = true
21-
Tracing.setTracingBackendType(TracingBackendType.PLATFORM)
22+
impl.enableAll()
2223
}
2324

2425
/**
@@ -27,7 +28,7 @@ object MapboxTracing {
2728
* @throws [RuntimeException] if build is not debuggable.
2829
*/
2930
fun enablePlatform() {
30-
platformTracingEnabled = true
31+
impl.enablePlatform()
3132
}
3233

3334
/**
@@ -36,7 +37,7 @@ object MapboxTracing {
3637
* @throws [RuntimeException] if build is not debuggable.
3738
*/
3839
fun enableCore() {
39-
Tracing.setTracingBackendType(TracingBackendType.PLATFORM)
40+
impl.enableCore()
4041
}
4142

4243
/**
@@ -45,7 +46,6 @@ object MapboxTracing {
4546
* @throws [RuntimeException] if build is not debuggable.
4647
*/
4748
fun disableAll() {
48-
platformTracingEnabled = false
49-
Tracing.setTracingBackendType(TracingBackendType.NOOP)
49+
impl.disableAll()
5050
}
5151
}

maps-sdk/src/main/java/com/mapbox/maps/renderer/MapboxRenderThread.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import androidx.annotation.AnyThread
1414
import androidx.annotation.RestrictTo
1515
import androidx.annotation.UiThread
1616
import androidx.annotation.VisibleForTesting
17+
import com.mapbox.common.MapboxTracing
18+
import com.mapbox.common.MapboxTracing.MAPBOX_TRACE_ID
1719
import com.mapbox.maps.ContextMode
1820
import com.mapbox.maps.MapboxExperimental
19-
import com.mapbox.maps.MapboxTracing
20-
import com.mapbox.maps.MapboxTracing.MAPBOX_TRACE_ID
2121
import com.mapbox.maps.logE
2222
import com.mapbox.maps.logI
2323
import com.mapbox.maps.logW

maps-sdk/src/test/java/com/mapbox/maps/MapboxTracingTest.kt

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)