Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
c4e5de4
fix: add support for newer gradle versions (#512)
kholood-ea Nov 6, 2024
8a80708
feat: attach w3c header (#481)
ahmedAlaaInstabug Nov 10, 2024
64d289b
Release: v14.0.0 (#532)
ahmedAlaaInstabug Nov 11, 2024
f3abd8f
chore: change release date (#535)
ahmedAlaaInstabug Nov 18, 2024
e59292a
Merge pull request #536 from Instabug/master
ahmedAlaaInstabug Nov 18, 2024
ff446b2
Release: 14.1.0 (#539)
ahmedAlaaInstabug Dec 22, 2024
d8861f3
Merge branch 'refs/heads/master' into release/v14.1.0
ahmedAlaaInstabug Jan 2, 2025
017c918
release: v14.1.0
ahmedAlaaInstabug Jan 2, 2025
f607727
release: v14.1.0
ahmedAlaaInstabug Jan 2, 2025
796de23
Merge pull request #541 from Instabug/release/v14.1.0
ahmedAlaaInstabug Jan 2, 2025
416c74b
fix: set ReproStepsConfig on android
ahmedAlaaInstabug Jan 7, 2025
9222bd8
release: v14.1.0
ahmedAlaaInstabug Jan 7, 2025
0d7d526
fix: set ReproStepsConfig
ahmedAlaaInstabug Jan 7, 2025
abec517
fix(android): report current view change
kholood-ea Feb 18, 2025
6b2df75
chore(android): update report current view test
kholood-ea Feb 18, 2025
09c1e9d
chore(android): add report current view to mocked class
kholood-ea Feb 18, 2025
6d56fc3
chore: Enhance inline code documentation
andrewdanieldev Feb 18, 2025
c34ed56
fix(android): fix test case
kholood-ea Feb 18, 2025
138466d
Merge pull request #551 from Instabug/chore/enhance-inline-code-doc
andrewdanieldev Feb 19, 2025
ea86da1
chore: Enhance inline code documentation
andrewdanieldev Feb 20, 2025
5cb061f
Merge pull request #553 from Instabug/chore/enhance-inline-code-doc
andrewdanieldev Feb 20, 2025
1af077a
chore: increase the test coverage of APM related classes.
andrewdanieldev Feb 23, 2025
699e85d
chore: apply dart format
andrewdanieldev Feb 24, 2025
14f24b6
chore: apply lint comments
andrewdanieldev Feb 24, 2025
01c9374
Merge pull request #554 from Instabug/chore/increase-apm-test-coverage
andrewdanieldev Feb 24, 2025
d1a7d10
chore: Integrate the absent APM APIs into the APM screen of the sampl…
andrewdanieldev Feb 26, 2025
e42afd9
chore: apply dart format
andrewdanieldev Feb 26, 2025
c195c68
fix: e2e test
ahmedAlaaInstabug Feb 27, 2025
19a600b
Merge pull request #556 from Instabug/refactor/apm-screen
andrewdanieldev Mar 2, 2025
5370de9
feat: support 3.29
ahmedAlaaInstabug Mar 12, 2025
764f6de
feat: enable/disable stop capturing network body
AyaMahmoud148 Mar 13, 2025
e048709
fix: add change log
AyaMahmoud148 Mar 13, 2025
e0e06d0
Update CHANGELOG.md
andrewdanieldev Mar 13, 2025
4c126e6
Merge branch 'refs/heads/dev' into feat/support-flt-3.29
ahmedAlaaInstabug Mar 13, 2025
38789b5
feat: support 3.29
ahmedAlaaInstabug Mar 13, 2025
73e8085
feat: support 3.29
ahmedAlaaInstabug Mar 13, 2025
89140e6
feat: support 3.29
ahmedAlaaInstabug Mar 13, 2025
0f44ee7
feat: support 3.29
ahmedAlaaInstabug Mar 13, 2025
c2a24cf
Merge pull request #543 from Instabug/fix/set-repro-steps-config
ahmedAlaaInstabug Mar 21, 2025
b879831
Merge pull request #550 from Instabug/fix/current-view-NA
ahmedAlaaInstabug Mar 21, 2025
c6e4d1b
ci: fix ci issue
ahmedAlaaInstabug Mar 23, 2025
18c58b1
chore: flutter sanity branch
AyaMahmoud148 Apr 10, 2025
2677803
fix: revert pod version
AyaMahmoud148 Apr 10, 2025
a6ac918
fix: revert pod version
AyaMahmoud148 Apr 10, 2025
94e0d39
fix: use released versions
AyaMahmoud148 Apr 10, 2025
8bcf107
fix: changelog
AyaMahmoud148 Apr 10, 2025
488ed24
fix: change log formate
AyaMahmoud148 Apr 10, 2025
15822d0
Merge pull request #562 from Instabug/feat/support-flt-3.29
ahmedAlaaInstabug Apr 10, 2025
c12cfb7
Merge branch 'refs/heads/dev' into flutter-sanity
ahmedAlaaInstabug Apr 14, 2025
d434c84
fix: native fatal crash
ahmedAlaaInstabug Apr 14, 2025
3da35c0
chore: bump android version to 14.3.0
AyaMahmoud148 Apr 14, 2025
1a2255f
Merge remote-tracking branch 'origin/flutter-sanity' into flutter-sanity
ahmedAlaaInstabug Apr 14, 2025
8695cab
Update CHANGELOG.md
AyaMahmoud148 Apr 21, 2025
91620c3
Merge pull request #569 from Instabug/flutter-sanity
AyaMahmoud148 Apr 21, 2025
3f6e07d
Rlease: 14.3.0
AyaMahmoud148 Apr 21, 2025
e8b313d
Merge pull request #571 from Instabug/Release/14.3.0
AyaMahmoud148 Apr 22, 2025
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ commands:
setup_flutter:
steps:
- flutter/install_sdk_and_pub:
version: 3.10.5
version: 3.24.0
- run:
name: Generate Pigeons
command: sh ./scripts/pigeon.sh
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Changelog

## [14.3.0](https://github.com/Instabug/Instabug-Flutter/compare/v14.1.0...14.3.0) (April 21, 2025)

### Added

- Add support enable/disable capturing network body. ([#561](https://github.com/Instabug/Instabug-Flutter/pull/561))

### Changed

- Bump Instabug iOS SDK to v14.3.0 ([#569](https://github.com/Instabug/Instabug-Flutter/pull/569)). [See release notes](https://github.com/Instabug/Instabug-iOS/releases/tag/14.3.0).

- Bump Instabug Android SDK to v14.3.0 ([#569](https://github.com/Instabug/Instabug-Flutter/pull/569)). [See release notes](https://github.com/Instabug/Instabug-Android/releases/tag/v14.3.0).


### Fixed

- Fixed an issue with `SetReproStepsConfig` on Android platform ([#543](https://github.com/Instabug/Instabug-Flutter/pull/543)).


## [14.1.0](https://github.com/Instabug/Instabug-Flutter/compare/v14.0.0...v14.1.0) (January 2, 2025)

### Changed

- Bump Instabug Android SDK to v14.1.0 ([#539](https://github.com/Instabug/Instabug-Flutter/pull/539)). [See release notes](https://github.com/Instabug/Instabug-Android/releases/tag/v14.1.0).
- Bump Instabug iOS SDK to v14.1.0 ([#539](https://github.com/Instabug/Instabug-Flutter/pull/539)). [See release notes](https://github.com/Instabug/Instabug-iOS/releases/tag/14.1.0),

## [14.1.0](https://github.com/Instabug/Instabug-Flutter/compare/v14.0.0...v14.1.0) (January 2, 2025)

### Changed
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'com.instabug.flutter'
version '14.1.0'
version '14.3.0'

buildscript {
repositories {
Expand Down Expand Up @@ -44,7 +44,7 @@ android {
}

dependencies {
api 'com.instabug.library:instabug:14.1.0'
api 'com.instabug.library:instabug:14.3.0'
testImplementation 'junit:junit:4.13.2'
testImplementation "org.mockito:mockito-inline:3.12.1"
testImplementation "io.mockk:mockk:1.13.13"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,13 @@
import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding;
import io.flutter.embedding.engine.renderer.FlutterRenderer;
import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.PluginRegistry.Registrar;

public class InstabugFlutterPlugin implements FlutterPlugin, ActivityAware {
private static final String TAG = InstabugFlutterPlugin.class.getName();

@SuppressLint("StaticFieldLeak")
private static Activity activity;

/**
* Embedding v1
*/
@SuppressWarnings("deprecation")
public static void registerWith(Registrar registrar) {
activity = registrar.activity();
register(registrar.context().getApplicationContext(), registrar.messenger(), (FlutterRenderer) registrar.textures());
}

@Override
public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) {
Expand Down
147 changes: 145 additions & 2 deletions android/src/main/java/com/instabug/flutter/modules/ApmApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ public static void init(BinaryMessenger messenger) {
ApmPigeon.ApmHostApi.setup(messenger, api);
}

/**
* The function sets the enabled status of APM.
*
* @param isEnabled The `setEnabled` method in the code snippet is used to enable or disable a
* feature, and it takes a `Boolean` parameter named `isEnabled`. When this method is called with
* `true`, it enables the feature, and when called with `false`, it disables the feature. The method
* internally calls
*/
@Override
public void setEnabled(@NonNull Boolean isEnabled) {
try {
Expand All @@ -42,6 +50,13 @@ public void setEnabled(@NonNull Boolean isEnabled) {
}
}

/**
* Sets the cold app launch enabled status using the APM library.
*
* @param isEnabled The `isEnabled` parameter is a Boolean value that indicates whether cold app launch
* is enabled or not. When `isEnabled` is set to `true`, cold app launch is enabled, and when it is set
* to `false`, cold app launch is disabled.
*/
@Override
public void setColdAppLaunchEnabled(@NonNull Boolean isEnabled) {
try {
Expand All @@ -51,6 +66,14 @@ public void setColdAppLaunchEnabled(@NonNull Boolean isEnabled) {
}
}

/**
* The function sets the auto UI trace enabled status in an APM system, handling any exceptions that
* may occur.
*
* @param isEnabled The `isEnabled` parameter is a Boolean value that indicates whether the Auto UI
* trace feature should be enabled or disabled. When `isEnabled` is set to `true`, the Auto UI trace
* feature is enabled, and when it is set to `false`, the feature is disabled.
*/
@Override
public void setAutoUITraceEnabled(@NonNull Boolean isEnabled) {
try {
Expand All @@ -60,6 +83,21 @@ public void setAutoUITraceEnabled(@NonNull Boolean isEnabled) {
}
}

/**
* Starts an execution trace and handles the result
* using callbacks.
*
* @param id The `id` parameter is a non-null String that represents the identifier of the execution
* trace.
* @param name The `name` parameter in the `startExecutionTrace` method represents the name of the
* execution trace that will be started. It is used as a reference to identify the trace during
* execution monitoring.
* @param result The `result` parameter in the `startExecutionTrace` method is an instance of
* `ApmPigeon.Result<String>`. This parameter is used to provide the result of the execution trace
* operation back to the caller. The `success` method of the `result` object is called with the
*
* @deprecated see {@link #startFlow}
*/
@Override
public void startExecutionTrace(@NonNull String id, @NonNull String name, ApmPigeon.Result<String> result) {
ThreadManager.runOnBackground(
Expand Down Expand Up @@ -100,6 +138,17 @@ public void run() {
);
}

/**
* Starts an AppFlow with the specified name.
* <br/>
* On starting two flows with the same name the older flow will end with force abandon end reason.
* AppFlow name cannot exceed 150 characters otherwise it's truncated,
* leading and trailing whitespaces are also ignored.
*
* @param name AppFlow name. It can not be empty string or null.
* Starts a new AppFlow, if APM is enabled, feature is enabled
* and Instabug SDK is initialized.
*/
@Override
public void startFlow(@NonNull String name) {
try {
Expand All @@ -109,6 +158,26 @@ public void startFlow(@NonNull String name) {
}
}

/**
* Sets custom attributes for AppFlow with a given name.
* <br/>
* Setting an attribute value to null will remove its corresponding key if it already exists.
* <br/>
* Attribute key name cannot exceed 30 characters.
* Leading and trailing whitespaces are also ignored.
* Does not accept empty strings or null.
* <br/>
* Attribute value name cannot exceed 60 characters,
* leading and trailing whitespaces are also ignored.
* Does not accept empty strings.
* <br/>
* If a trace is ended, attributes will not be added and existing ones will not be updated.
* <br/>
*
* @param name AppFlow name. It can not be empty string or null
* @param key AppFlow attribute key. It can not be empty string or null
* @param value AppFlow attribute value. It can not be empty string. Null to remove attribute
*/
@Override
public void setFlowAttribute(@NonNull String name, @NonNull String key, @Nullable String value) {
try {
Expand All @@ -118,6 +187,11 @@ public void setFlowAttribute(@NonNull String name, @NonNull String key, @Nullabl
}
}

/**
* Ends AppFlow with a given name.
*
* @param name AppFlow name to be ended. It can not be empty string or null
*/
@Override
public void endFlow(@NonNull String name) {
try {
Expand All @@ -127,6 +201,15 @@ public void endFlow(@NonNull String name) {
}
}

/**
* Adds a new attribute to trace
*
* @param id String id of the trace.
* @param key attribute key
* @param value attribute value. Null to remove attribute
*
* @deprecated see {@link #setFlowAttribute}
*/
@Override
public void setExecutionTraceAttribute(@NonNull String id, @NonNull String key, @NonNull String value) {
try {
Expand All @@ -136,6 +219,13 @@ public void setExecutionTraceAttribute(@NonNull String id, @NonNull String key,
}
}

/**
* Ends a trace
*
* @param id string id of the trace.
*
* @deprecated see {@link #endFlow}
*/
@Override
public void endExecutionTrace(@NonNull String id) {
try {
Expand All @@ -145,6 +235,11 @@ public void endExecutionTrace(@NonNull String id) {
}
}

/**
* Starts a UI trace.
*
* @param name string name of the UI trace.
*/
@Override
public void startUITrace(@NonNull String name) {
try {
Expand All @@ -154,6 +249,9 @@ public void startUITrace(@NonNull String name) {
}
}

/**
* This method is used to terminate the currently active UI trace.
*/
@Override
public void endUITrace() {
try {
Expand All @@ -163,6 +261,9 @@ public void endUITrace() {
}
}

/**
* This method is used to signal the end of the app launch process.
*/
@Override
public void endAppLaunch() {
try {
Expand All @@ -172,6 +273,12 @@ public void endAppLaunch() {
}
}


/**
* logs network-related information
*
* @param data Map of network data object.
*/
@Override
public void networkLogAndroid(@NonNull Map<String, Object> data) {
try {
Expand Down Expand Up @@ -265,8 +372,13 @@ public void networkLogAndroid(@NonNull Map<String, Object> data) {
}




/**
* This method is responsible for initiating a custom performance UI trace
* in the APM module. It takes three parameters:
* @param screenName: A string representing the name of the screen or UI element being traced.
* @param microTimeStamp: A number representing the timestamp in microseconds when the trace is started.
* @param traceId: A number representing the unique identifier for the trace.
*/
@Override
public void startCpUiTrace(@NonNull String screenName, @NonNull Long microTimeStamp, @NonNull Long traceId) {
try {
Expand All @@ -276,6 +388,17 @@ public void startCpUiTrace(@NonNull String screenName, @NonNull Long microTimeSt
}
}


/**
* This method is responsible for reporting the screen
* loading data from Dart side to Android side. It takes three parameters:
* @param startTimeStampMicro: A number representing the start timestamp in microseconds of the screen
* loading custom performance data.
* @param durationMicro: A number representing the duration in microseconds of the screen loading custom
* performance data.
* @param uiTraceId: A number representing the unique identifier for the UI trace associated with the
* screen loading.
*/
@Override
public void reportScreenLoadingCP(@NonNull Long startTimeStampMicro, @NonNull Long durationMicro, @NonNull Long uiTraceId) {
try {
Expand All @@ -285,6 +408,15 @@ public void reportScreenLoadingCP(@NonNull Long startTimeStampMicro, @NonNull Lo
}
}


/**
* This method is responsible for extend the end time if the screen loading custom
* trace. It takes two parameters:
* @param timeStampMicro: A number representing the timestamp in microseconds when the screen loading
* custom trace is ending.
* @param uiTraceId: A number representing the unique identifier for the UI trace associated with the
* screen loading.
*/
@Override
public void endScreenLoadingCP(@NonNull Long timeStampMicro, @NonNull Long uiTraceId) {
try {
Expand All @@ -294,11 +426,16 @@ public void endScreenLoadingCP(@NonNull Long timeStampMicro, @NonNull Long uiTra
}
}


/**
* This method is used to check whether the end screen loading feature is enabled or not.
*/
@Override
public void isEndScreenLoadingEnabled(@NonNull ApmPigeon.Result<Boolean> result) {
isScreenLoadingEnabled(result);
}


@Override
public void isEnabled(@NonNull ApmPigeon.Result<Boolean> result) {
try {
Expand All @@ -310,6 +447,9 @@ public void isEnabled(@NonNull ApmPigeon.Result<Boolean> result) {
}
}

/**
* checks whether the screen loading feature is enabled.
* */
@Override
public void isScreenLoadingEnabled(@NonNull ApmPigeon.Result<Boolean> result) {
try {
Expand All @@ -324,6 +464,9 @@ public void invoke(boolean isFeatureAvailable) {
}
}

/**
* This method is setting the enabled state of the screen loading feature.
*/
@Override
public void setScreenLoadingEnabled(@NonNull Boolean isEnabled) {
try {
Expand Down
Loading