if (FALSE) {
# Works with shiny.telemetry SQLite
issues <- bid_ingest_telemetry("telemetry.sqlite")
# Works with Shiny OpenTelemetry (1.12+)
issues <- bid_ingest_telemetry("otel_spans.json")
# Use sensitivity presets for easier configuration
strict_issues <- bid_ingest_telemetry(
"telemetry.sqlite",
thresholds = bid_telemetry_presets("strict")
)
# Analyze JSON log with custom thresholds
issues <- bid_ingest_telemetry(
"telemetry.log",
format = "json",
thresholds = list(
unused_input_threshold = 0.1,
delay_threshold_secs = 60
)
)
# Use a DBI connection object directly
con <- DBI::dbConnect(RSQLite::SQLite(), "telemetry.sqlite")
issues <- bid_ingest_telemetry(con)
# Connection remains open for further use
DBI::dbDisconnect(con)
# Specify custom table name
issues <- bid_ingest_telemetry(
"telemetry.sqlite",
table_name = "my_custom_events"
)
# Same analysis workflow for both shiny.telemetry and OTEL
if (length(issues) > 0) {
# Take first issue and continue with BID process
interpret_result <- bid_interpret(
previous_stage = issues[[1]],
central_question = "How can we improve user engagement?"
)
}
}
Run the code above in your browser using DataLab