Skip to content

Commit 714e294

Browse files
authored
Label all observers and reactives for otel (#92)
Fixes #91
1 parent 8c4b13a commit 714e294

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

pkg-r/R/querychat.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ querychat_server <- function(id, querychat_config) {
201201
greeting <- querychat_config[["greeting"]]
202202
client <- querychat_config[["client"]]
203203

204-
current_title <- shiny::reactiveVal(NULL)
205-
current_query <- shiny::reactiveVal("")
206-
filtered_df <- shiny::reactive({
204+
current_title <- shiny::reactiveVal(NULL, label = "current_title")
205+
current_query <- shiny::reactiveVal("", label = "current_query")
206+
filtered_df <- shiny::reactive(label = "filtered_df", {
207207
execute_query(data_source, query = DBI::SQL(current_query()))
208208
})
209209

@@ -257,11 +257,11 @@ querychat_server <- function(id, querychat_config) {
257257
}
258258
)
259259

260-
shiny::observeEvent(input$chat_user_input, {
260+
shiny::observeEvent(input$chat_user_input, label = "on_chat_user_input", {
261261
append_stream_task$invoke(chat, input$chat_user_input)
262262
})
263263

264-
shiny::observeEvent(input$chat_update, {
264+
shiny::observeEvent(input$chat_update, label = "on_chat_update", {
265265
current_query(input$chat_update$query)
266266
current_title(input$chat_update$title)
267267
})

pkg-r/R/querychat_app.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ querychat_app <- function(config, ..., bookmark_store = "url") {
102102
)
103103
})
104104

105-
shiny::observeEvent(input$reset_query, {
105+
shiny::observeEvent(input$reset_query, label = "on_reset_query", {
106106
qc$update_query("", NULL)
107107
})
108108

@@ -127,7 +127,7 @@ querychat_app <- function(config, ..., bookmark_store = "url") {
127127
)
128128
})
129129

130-
shiny::observeEvent(input$close_btn, {
130+
shiny::observeEvent(input$close_btn, label = "on_close_btn", {
131131
shiny::stopApp()
132132
})
133133
}

0 commit comments

Comments
 (0)