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

Unable to log custom actions #1985

Closed
cmtanko opened this issue Apr 14, 2024 · 2 comments
Closed

Unable to log custom actions #1985

cmtanko opened this issue Apr 14, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@cmtanko
Copy link

cmtanko commented Apr 14, 2024

Describe the bug

    @Kroll.method
    public void startAction(String actionName, KrollDict actionAttributes) {
        // Convert KrollDict to HashMap
        HashMap<String, Object> attributes = (HashMap<String, Object>) actionAttributes;
    
        GlobalRumMonitor.get().addAction(RumActionType.TAP, actionName, attributes);
    }

So, I have this addAction to record tap event , but on using I am getting this error and my tap event is not logged. Any thoughts ?

[WARN] Datadog: [_dd.sdk_core.default]: RUM Action (TAP on ) was dropped, because another action is still active for the same view
[WARN] Datadog: [_dd.sdk_core.default]: RUM Action (TAP on myAction) was dropped, because another action is still active for the same view

Reproduction steps

    @Kroll.method
    public void startAction(String actionName, KrollDict actionAttributes) {
        // Convert KrollDict to HashMap
        HashMap<String, Object> attributes = (HashMap<String, Object>) actionAttributes;
    
        GlobalRumMonitor.get().addAction(RumActionType.TAP, actionName, attributes);
    }
	```
var actionType = 'TAP';
		var actionName = 'myAction';
		var actionAttributes = {
			attribute1: 'value1',
			attribute2: 'value2'
		};

		Datadog.startAction(actionName, actionAttributes);

### Logcat logs

[WARN]  Datadog: [_dd.sdk_core.default]: RUM Action (TAP on ) was dropped, because another action is still active for the same view
[WARN]  Datadog: [_dd.sdk_core.default]: RUM Action (TAP on myAction) was dropped, because another action is still active for the same view

### Expected behavior

Its expected to log MyAction action on the tap 

### Affected SDK versions

2.7.1

### Latest working SDK version

2.8.0

### Did you confirm if the latest SDK version fixes the bug?

Yes

### Kotlin / Java version

_No response_

### Gradle / AGP version

_No response_

### Other dependencies versions

_No response_

### Device Information

_No response_

### Other relevant information

_No response_
@cmtanko cmtanko added the bug Something isn't working label Apr 14, 2024
@xgouchet
Copy link
Collaborator

xgouchet commented Apr 15, 2024

Hi @cmtanko, thanks for opening this ticket.

This behaviour is working on purpose, any non custom action stays alive for a short while to be linked with the following errors or resources.

Sending a custom action can be done at any time, by using the type RumActionType.CUSTOM instead of RumActionType.TAP, e.g.:

GlobalRumMonitor.get().addAction(RumActionType.CUSTOM, actionName, attributes);

@0xnm
Copy link
Contributor

0xnm commented Sep 17, 2024

Hello @cmtanko! I hope that your question was answered and I'm closing this issue. Please feel free to re-open it if needed.

@0xnm 0xnm closed this as completed Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants