Skip to content

Allow configuring the SDK dynamically from dashboard #2987

@abhaysood

Description

@abhaysood

Description

Important

This feature will not be shown on the dashboard UI until all SDKs support the dynamic config.

Config

Config Description
max_events_in_batch Maximum number of events and spans in a batch
crash_timeline_duration The duration of session timeline collected with crashes
anr_timeline_duration The duration of session timeline collected with ANRs
bug_report_timeline_duration The duration of session timeline collected with bug reports
trace_sampling_rate Sampling rate for all traces
journey_sampling_rate Sampling rate sessions that should report journey events - lifecycle_activity, lifecycle_fragment, lifecycle_view_controller and screen_view
screenshot_mask_level Screenshot masking level. One of all_text_and_media, all_text, all_text_except_clickable and sensitive_fields_only
cpu_usage_interval CPU usage measurement interval
memory_usage_interval Memory usage measurement interval
crash_take_screenshot Whether to take screenshot on crash
crash_timeline_sampling_rate Sampling rate for crashes that contain session timelines
anr_take_screenshot Whether to take screenshot on ANR
anr_timeline_sampling_rate Sampling rate for ANRs that contain session timelines
launch_sampling_rate Sampling rate for launch events - cold_launch, warm_launch and hot_launch
gesture_click_take_snapshot Whether to take snapshot with gesture_click event
http_disable_event_for_urls URLs to disable HTTP event tracking
http_track_request_for_urls URLs to capture full HTTP request (body and headers)
http_track_response_for_urls URLs to capture full HTTP response (body and headers)
http_blocked_headers HTTP header names to never capture

Backend

  • Create a migration to create table sdk_config.
  • Implement a migration script to backfill default values for sdk_config for all existing apps.
  • Implement GET config Dashboard API
  • Implement GET config API for the SDK
  • Return a cache control header of 300s with response.
  • Return Etag as a FNV-1a hash of the config content in successful response.
  • Store the Etag and the config in redis on read.
  • Read If-None-Match and return 304 if the Etag matches.
  • Implement PATCH config Dashboard API
  • Invalidate redis when a PATCH request is successful.

Frontend

  • Modify Apps page to implement a new section: Data collection config
  • Allow modifying any public config from the above table
  • Show ANR section only for Android apps (also for apps that are not yet onboarded)
  • Show confirmation dialog for each section.
  • Add access control

Documentation

  • Update Dashboard API documentation
  • Update SDK API documentation

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions