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

disabled_url_patterns in embrace-config.json doesn't work unless and app_id and api_token are present #1219

Closed
joe-acosta-okcupid opened this issue Aug 8, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@joe-acosta-okcupid
Copy link

Describe the bug

disabled_url_patternsin embrace-config.json should disable any tracking of listed url patterns: https://embrace.io/docs/android/features/configuration-file/

But it doesn't seem to do anything unless app_id and api_token are also set. I.e. if I follow the example and do:

Example:
"disabled_url_patterns": [".*"], // Will disable network calls for all URLs

The network calls won't get disabled. But if I add in a fake app_id and api_token:

"app_id": "NNNNN",
"api_token": "0123456789abcdef0123456789abcdef",

It does start working. But if we're only using the SDK with an OTEL exporter, then we don't need an app_id or api_token according to the documentation and setting them causes some other issues.

Steps to reproduce

Set your embrace-config.json to contain:

{
    "sdk_config": {
        "networking": {
            "disabled_url_patterns": [".*"]
        }
    }
}

Run the app, and see that no urls are disabled

Environment

  • Android version: 14
  • Embrace SDK version: 6.9.1
  • Emulator or physical device: physical
@eliabsisay
Copy link
Contributor

@joe-acosta-okcupid - Thanks for submitting the issue. A team member will take a look and get back to you shortly.

@bidetofevil bidetofevil self-assigned this Aug 8, 2024
@bidetofevil
Copy link
Collaborator

Looks like an issue with how we are consolidating the various settings. Without an appId, we can't make a request to the Embrace server, so it feels like we should just fall back to the default. I'll take a look

@bidetofevil bidetofevil added the bug Something isn't working label Aug 8, 2024
@bidetofevil
Copy link
Collaborator

HI @joe-acosta-okcupid - this issue seems to be related to an inability to instantiate the configuration service, so SDK defaults are applied with out the settings in the config file taking affect. We will address this in our next release.

@joe-acosta-okcupid
Copy link
Author

Awesome, thank you!

@bidetofevil
Copy link
Collaborator

The fix will be in the next release. The issue turns out to be in our gradle plugin and the generation of local configuration the SDK consumes from embrace-config.json. The other properties in there should be properly populated even if app_id and api_token were not specified.

@bidetofevil
Copy link
Collaborator

FYI, this has been addressed in the 6.11.0 release.

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