Skip to content

Commit

Permalink
Update embrace-config-schema (#4198)
Browse files Browse the repository at this point in the history
* Update embrace-config-schema

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update embrace-config.json

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
priettt and pre-commit-ci[bot] authored Nov 7, 2024
1 parent 9c188ae commit a716078
Show file tree
Hide file tree
Showing 2 changed files with 188 additions and 48 deletions.
209 changes: 172 additions & 37 deletions src/schemas/json/embrace-config-schema-1.0.0.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": true,
"description": "JSON Schema definition for the Embrace configuration file.",
"id": "https://json.schemastore.org/embrace-config-schema-1.0.0.json",
"properties": {
Expand All @@ -22,22 +21,65 @@
},
"sdk_config": {
"type": "object",
"additionalProperties": true,
"properties": {
"app": {
"automatic_data_capture": {
"type": "object",
"additionalProperties": true,
"properties": {
"report_disk_usage": {
"description": "The SDK collects the disk usage for the app. You can disable this if your app has a large number of local files to prevent excessive resource usage, especially on lower-end devices. Defaults to true.",
"memory_info": {
"description": "Enables memory warning capture. Defaults to true.",
"type": "boolean"
},
"power_save_mode_info": {
"description": "Enables power save mode capture. Defaults to true.",
"type": "boolean"
},
"network_connectivity_info": {
"description": "Enables network connectivity capture. Defaults to true.",
"type": "boolean"
},
"anr_info": {
"description": "Enables ANR capture. Defaults to true.",
"type": "boolean"
}
},
"minProperties": 1
},
"taps": {
"type": "object",
"properties": {
"capture_coordinates": {
"description": "Set to false to disable capturing tap coordinates. Defaults to true.",
"type": "boolean"
}
},
"minProperties": 1
},
"view_config": {
"type": "object",
"properties": {
"enable_automatic_activity_capture": {
"description": "Enables capturing activity lifecycle changes in breadcrumbs. Defaults to true.",
"type": "boolean"
}
},
"minProperties": 1
},
"webview": {
"type": "object",
"properties": {
"capture_query_params": {
"description": "Set to false to disable capturing of web view query parameters. Defaults to true. If webview:enable is set to false, this setting has no effect since all capture of web view information is disabled.",
"type": "boolean"
},
"enable": {
"description": "Set to false to disable capturing of web views. Defaults to true.",
"type": "boolean"
}
},
"minProperties": 1
},
"crash_handler": {
"type": "object",
"additionalProperties": true,
"properties": {
"enabled": {
"description": "Set to false to prevent the SDK from connecting to the uncaught exception handler. Defaults to true.",
Expand All @@ -46,10 +88,47 @@
},
"minProperties": 1
},
"compose": {
"type": "object",
"properties": {
"capture_compose_onclick": {
"description": "Enables capture of Jetpack Compose click events. Defaults to false.",
"type": "boolean"
}
},
"minProperties": 1
},
"capture_fcm_pii_data": {
"type": "boolean",
"description": "Enables PII data within FCM capture. Defaults to false."
},
"networking": {
"type": "object",
"additionalProperties": true,
"properties": {
"default_capture_limit": {
"description": "Default capture limit for specified domains. Defaults to 1000.",
"type": "integer"
},
"domains": {
"description": "List of domain names and their respective limits.",
"type": "array",
"items": {
"type": "object",
"properties": {
"domain_name": {
"description": "Domain URL.",
"type": "string"
},
"domain_limit": {
"description": "Limit for the number of requests to be tracked.",
"type": "integer"
}
},
"minProperties": 1
},
"minItems": 1,
"uniqueItems": true
},
"capture_request_content_length": {
"description": "Disable capture of network length which can interfere with certain streaming network requests. Defaults to true.",
"type": "boolean"
Expand All @@ -67,68 +146,124 @@
"description": "Enable capture of network requests made using the native Java network API. Defaults to true.",
"type": "boolean"
},
"trace_id_header": {
"description": "Set the name of the header used for the trace ID. Defaults to 'x-emb-trace-id'.",
"type": "string"
"enable_network_span_forwarding": {
"description": "Enables network span forwarding. Defaults to false.",
"type": "boolean"
}
},
"minProperties": 1
},
"session": {
"capture_public_key": {
"type": "string",
"description": "Declares the key that should be used to capture network request bodies, if any."
},
"sensitive_keys_denylist": {
"description": "List of sensitive keys whose values should be redacted on capture.",
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"uniqueItems": true
},
"anr": {
"type": "object",
"additionalProperties": true,
"properties": {
"async_end": {
"description": "Send the session end message asynchronously. Defaults to false.",
"capture_unity_thread": {
"description": "Enables Unity ANR capture. Defaults to false.",
"type": "boolean"
},
"max_session_seconds": {
"description": "Enable automatic ending of sessions every N seconds. This is only recommended for applications, such as kiosks, where the app is never expected to go to the background. This value must be 60 seconds or greater if set.",
"type": "integer"
}
},
"minProperties": 1
},
"startup_moment": {
"app": {
"type": "object",
"additionalProperties": true,
"properties": {
"automatically_end": {
"description": "Control whether the startup moment is automatically ended. Defaults to true.",
"type": "boolean"
},
"take_screenshot": {
"description": "Control whether screenshots are taken during the startup moment. Defaults to false.",
"report_disk_usage": {
"description": "The SDK collects the disk usage for the app. You can disable this if your app has a large number of local files to prevent excessive resource usage, especially on lower-end devices. Defaults to true.",
"type": "boolean"
}
},
"minProperties": 1
},
"taps": {
"background_activity": {
"type": "object",
"additionalProperties": true,
"properties": {
"capture_coordinates": {
"description": "Set to false to disable capturing tap coordinates. Defaults to true.",
"capture_enabled": {
"description": "Enables background activity capture. Defaults to false.",
"type": "boolean"
}
},
"minProperties": 1
},
"webview": {
"base_urls": {
"type": "object",
"additionalProperties": true,
"properties": {
"capture_query_params": {
"description": "Set to false to disable capturing of web view query parameters. Defaults to true. If webview:enable is set to false, this setting has no effect since all capture of web view information is disabled.",
"config": {
"description": "Base config URL for the SDK.",
"type": "string"
},
"data": {
"description": "Base data URL for the SDK.",
"type": "integer"
}
},
"minProperties": 1
},
"session": {
"type": "object",
"properties": {
"components": {
"description": "Allowlist of session components that should be included in the session payload. The presence of this property denotes that the gating feature is enabled.",
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"send_full_for": {
"description": "List of events allowed to send a full session payload if the gating feature is enabled.",
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"uniqueItems": true
}
},
"minProperties": 1
},
"sig_handler_detection": {
"type": "boolean",
"description": "Enables 3rd party signal handler detection. Defaults to true."
},
"app_exit_info": {
"type": "object",
"properties": {
"app_exit_info_traces_limit": {
"description": "Defines the max size of bytes to allow capturing AppExitInfo NDK/ANR traces.",
"type": "boolean"
},
"enable": {
"description": "Set to false to disable capturing of web views. Defaults to true.",
"aei_enabled": {
"description": "Enables Application Exit Info capture. Defaults to true.",
"type": "boolean"
}
},
"minProperties": 1
},
"app_framework": {
"type": "string",
"description": "Project's app framework, one of react_native, unity, flutter or native."
}
},
"minProperties": 1
},
"unity": {
"type": "object",
"properties": {
"symbols_archive_name": {
"description": "Custom file name for unity symbols",
"type": "string"
}
},
"minProperties": 1
Expand Down
27 changes: 16 additions & 11 deletions src/test/embrace-config-schema-1.0.0/embrace-config.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
{
"api_token": "12345678901234567890123456789012",
"app_id": "12345",
"ndk_enabled": true,
"sdk_config": {
"crash_handler": {
"enabled": false
"app": {
"report_disk_usage": true
},
"networking": {
"capture_request_content_length": false
"capture_fcm_pii_data": false,
"compose": {
"capture_compose_onclick": true
},
"session": {
"async_end": true,
"max_session_seconds": 60
"crash_handler": {
"enabled": true
},
"startup_moment": {
"automatically_end": false,
"take_screenshot": false
"networking": {
"capture_request_content_length": true,
"enable_native_monitoring": true
},
"taps": {
"capture_coordinates": false
"capture_coordinates": true
},
"webview": {
"capture_query_params": true,
"enable": true
}
}
}

0 comments on commit a716078

Please sign in to comment.