Skip to content

Instantly share code, notes, and snippets.

@cartermp
Created December 3, 2023 22:00
Show Gist options
  • Save cartermp/b46c92b4fc81df045a773d7bb4ded33b to your computer and use it in GitHub Desktop.
Save cartermp/b46c92b4fc81df045a773d7bb4ded33b to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,error.type,error.msg,sqs.error,error.cause_chain,email,target,code.lineno,latency,id,name,http.url,transaction.id,code.namespace,type,duration_ms,provider,account.id,service.name,http.method,operation,busy_ns,idle_ns,status_code,library.name,http.host,classification,invitation_id,thread.id,thread.name,library.version,code.filepath,customer.payment.outbound.missing_in_internal,level,parent_name,adapter.payment.missing_in_internal,net.host.port,service.version,span.kind,organisation.id,http.scheme,sqs.outcome,internal_account.id,organisation_id,http.path,http.user_agent,http.status_code,trace.parent_id,span.num_events,sns.topic,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,error.message,error.type,error.msg,error.cause_chain,email,target,code.lineno,latency,id,name,http.url,transaction.id,client_reference,code.namespace,type,duration_ms,provider,account.id,internal.payment.missing_in_adapter,service.name,http.method,operation,busy_ns,idle_ns,status_code,library.name,http.host,classification,invitation_id,thread.id,entity_type,thread.name,library.version,code.filepath,customer.payment.outbound.missing_in_internal,level,claim_id,parent_name,adapter.payment.missing_in_internal,net.host.port,service.version,span.kind,organisation.id,http.scheme,sqs.outcome,internal_account.id,organisation_id,http.path,http.user_agent,trace.parent_id,http.status_code,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:trace.trace_id,trace.parent_id,trace.span_id,log.stacktrace,log.state.TraceIdentifier,parent_name,exception.stacktrace,workflow.id,event.action.details,event.details.code_id,dispatcher.requestsByReporter 1,process.pid,process.runtime.name,db.name,log.state.UseCaseName,dispatcher.reporterUserDepartment 1,dispatcher.matchedReporter 1,dispatcher.reporters 1,event.id,event.action,realm.id,workflow.mainAggregateId,log.state.1_property,messaging.masstransit.message_id,messaging.masstransit.correlation_id,aggregate.id,correlation_id,event.details.token_id,spot.id,attachment:id.aggregate,http.long_running,event.details.identity_provider_identity,event.details.remember_me,exception.data.helplink.evtsrc,service.instance.id,process.runtime.description,referenceType:id.aggregate,ds.safir.status.SAFIRPROD,requestId,event.details.email,messaging.masstransit.saga_id,reference:id.aggregate,event.category,log.state.CorrelationId,request.id.lookup,messaging.conversation_id,messaging.masstransit.request_id,log.state.database,event.details.scope,log.state.2_entityType,service.name,http.status_code,exception.message,error,duration_ms,http.route,db.statement,name,event.details.redirect_uri\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: Overall activity for all web traffic\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}],\"time_range\":7200}\n\nNLQ: Overall activity by web endpoint\nEXISTING QUERY:\n{\"breakdowns\":[\"event.details.redirect_uri\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":10,\"time_range\":7200}\n\n\nNLQ:all traces names CreateActivity where trace.parent_id is either d6ce473242432233 or 1cf15a7b4bb730c4\nEXISTING QUERY:{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"=\",\"value\":\"virtual.waiting.api\",\"join_column\":\"\"},{\"column\":\"http.status_code\",\"op\":\"=\",\"value\":409,\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":1209600,\"granularity\":0}", "completion": "{\"breakdowns\":[\"name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"in\",\"value\":[\"d6ce473242432233\",\"1cf15a7b4bb730c4\"],\"join_column\":\"\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:sli_route_latency_1500,duration_ms,queueSize,sli_route_latency,cachesize,requestID,discount,dropped,http.url,http.method,net.transport,error,orderid,http.target,rpc.method,http.route,http.request_content_length,ip,service.version,rpc.service,active_threads,success,currency,Context Keys,pending_pool,pool,name,message.type,area,http.host,host.name,thread.id,grpc.kind,service.name,runtime.jvm.memory.pool,host.arch,rpc.user_agent,rpc.system,runtime.jvm.gc.time,method,http.scheme,type,http.flavor,span.kind,itemCount,db.name,context_keys,thread.name,library.version,gc,db.statement,parent_name,trace.parent_id,http.status_code,service_name,exception.message\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:host,port,error,gcp_token_scope,name,graphql.request.query,group.id,resource_id,resource_ids,span.kind,type,net.transport,duration_ms,phoenix.plug,rpc.service,phoenix.action,user_id,gcp_token_provider,rpc.system,event_id,http.target,http.route,gcp_token_type,parent_name,gs.object.bucket,rpc.method,service.name,gcp_token_sub,session_id,request_id,http.url,graphql.response.errors,gs.object.url,http.flavor,graphql.request.operation,ios_bundle_id,status_message,error_reason,http.method,http.scheme,messaging.system,status_code,http.host,rpc.grpc.message,url_prefix,net.host.ip,dynamic_link_route,trace.parent_id,net.peer.port,net.peer.name,exception.message,http.status_code\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"graphql.request.query\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"graphql.request.query\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"graphql.request.query\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"graphql.request.query\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:grants\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"rpc.method\",\"op\":\"=\",\"value\":\"GRANT\",\"join_column\":\"\"}],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,http.response_content_length_uncompressed,http.url,http.method,net.transport,http.request_content_length_uncompressed,http.target,db.operation,tls.protocol,name,http.host,service.name,db.system,db.user,tls.authorized,http.scheme,type,http.flavor,span.kind,db.name,library.version,db.statement,status_code,net.host.port,process.command,net.host.ip,peer.ipv4,library.name,net.peer.port,http.status_code,db.sql.table,process.owner,http.user_agent,net.host.name,process.pid,tls.alpnProtocol,span.num_links,net.peer.name,trace.trace_id,db.connection_string,tls.cipher.version,http.status_text,trace.span_id,process.runtime.version,net.peer.ip,meta.signal_type,tls.cipher.name,span.num_events,process.runtime.description,process.command_args,service_name,trace.parent_id,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:job.runner_name,job.runner_group_name,job.run_url,job.matrix-name,job.runner_id,run.id,sli.workflow.master_release_duration,job.status,job.name,run.name,run.release,sli.workflow.master_path_to_production,run.conclusion,run.run_number,job.labels,sli.job.has_reran,matrix.jest.count,run.url,workflow.name,sli_master_path_to_production,pr.jira-ticket,workflow.run_id,job.html_url,sli.run.has_reran,job.conclusion,run.head_branch,pr.labels.cypress-dashboard,workflow.run_number,job.run_attempt,run.head_commit,run.workflow_id,run.head_sha,run.run_attempt,name,service.name,pr.title,run.html_url,workflow.run_html_url,step.name,pr.labels.tribe,pr.id,pr.labels.squad,matrix.cypress.groups.updated-specs.count,change-impact.pages.list,wait.for,matrix.cypress.count,pr.labels,change-impact.pages.count,step.status,trace.parent_id,duration_ms,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:find me where run.name is master-release, and within master-release job.name=run-jest-tests-jest-done finished after job.name=build.app\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"P90\"}],\"filters\":[{\"column\":\"job.matrix-name\",\"op\":\"=\",\"value\":\"run-jest-tests-jest-run\",\"join_column\":\"\"},{\"column\":\"workflow.name\",\"op\":\"=\",\"value\":\"master_release.yml\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"limit\":100,\"time_range\":7200,\"granularity\":3600}", "completion": "{\"breakdowns\":[\"run.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"P90\"}],\"filters\":[{\"column\":\"job.matrix-name\",\"op\":\"=\",\"value\":\"run-jest-tests-jest-run\",\"join_column\":\"\"},{\"column\":\"job.name\",\"op\":\"=\",\"value\":\"build.app\",\"join_column\":\"\"},{\"column\":\"job.status\",\"op\":\"=\",\"value\":\"finished\",\"join_column\":\"\"},{\"column\":\"workflow.name\",\"op\":\"=\",\"value\":\"master_release.yml\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"limit\":100,\"time_range\":7200,\"granularity\":3600}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:name,status_code,http.route,service.name,parent_name,exception.message,trace.parent_id,error,duration_ms\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:cluster_name = plan-sok-sato-project\nEXISTING QUERY:", "completion": "{\"filters\":[{\"column\":\"cluster_name\",\"op\":\"=\",\"value\":\"plan-sok-sato-project\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:ach.pw.query_time.end,ach.pw.query_time.start,duration_ms,ach.pw.completed,ach.pw.records.count,http.route,ach.pw.started,aws.queue.url,exception.stacktrace,http.response_content_length,rpc.method,http.request_content_length,http.method,service.namespace,trace.trace_id,ach.payment.entry_status,http.url,rpc.service,eventCount,trace.span_id,status_code,rpc.system,net.transport,span.num_events,ach.pw.processing_id,loopCount,process.command_line,host.arch,telemetry.instrumentation_library,event,count,code.namespace,service.name,http.status_code,error,host.type,status,db.operation,span.kind,cloud.availability_zone,ach.payment.source,exception.type,db.system,ach.payment.amount,telemetry.sdk.language,ach.payment.direction,net.sock.host.port,span.num_links,net.host.name,exception.message,parent_name,trace.parent_id,name,db.statement\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:show all requests with route /v1/internal/ach/entries and latency more than 60 seconds\nEXISTING QUERY:{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"contains\",\"value\":\"/v1/internal/ach/entries\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":600,\"granularity\":0}", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"=\",\"value\":\"/v1/internal/ach/entries\",\"join_column\":\"\"},{\"column\":\"duration_ms\",\"op\":\">\",\"value\":600,\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\",\"order\":\"descending\"}],\"time_range\":600}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:requestID,http.method,http.url,rpc.method,http.route,message.type,http.status_code,orderid,process.command,rpc.service,http.request_content_length,success,status_code,service.version,status_message,http.host,rpc.system,rpc.user_agent,ip,net.transport,method,http.target,error,discount,name,http.user_agent,queueSize,host.name,service.name,productid,area,duration_ms,itemCount,process.command_line,currency,message.id,http.flavor,context_keys,type,http.scheme,os.type,Context Keys,process.pid,chargeTotal,parent_name,host.arch,thread.id,trace.trace_id,userid,http.server_name,trace.parent_id,db.statement,service_name,exception.message\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:request response\nEXISTING QUERY:{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"start_time\":1700782278,\"end_time\":1700811078,\"granularity\":0}", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"start_time\":1700782278,\"end_time\":1700811078,\"granularity\":0}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:response-errors,error,error_message,error-message,error_developer_message,error_code,error_body,exception.message,reasons,send_single_message_error,versions,exception.type,thread_dump,play_integrity_error_code,Successful requests,email,methods,job,prefixes,sender,rules,alias,num-pending-requests,success,existing_nodes,xrates:missed_by_provider,cause,fee_rejected,known-conflicting-txs,exception.stacktrace,tx,known-conflicting-txids,processor,user,session,funder:num-utxos-failed-to-be-leased,result,config_updated,matches_rules,execution_unit,currencies,variant,num-active-connections,num-requests,name,http.url,current_state,first_integrity_report,receiver,inactive_nodes,parent_name,db.statement,service.name,duration_ms,trace.parent_id,http.status_code\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.url\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.url\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.url\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.url\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.url\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:request,resp_stale,url,req_restarts,vary,req_header_size,request_accept_encoding,request_has_range,resp_size,host,request_accept_content,request_accept_language,time_elapsed,req_digest,resp_header_size,resp_response,req_body_size,stale_exists,backend,resp_stale_is_error,resp_stale_is_revalidating,status,content_encoding,request_referer,protocol,request_accept_charset,log_resp_body_size,Path Group,server_datacenter,resp_body_size,cache_status,service_id,request_user_agent,geo_city,log_time_elapsed,content_type,User Agent without invocation hash,url_has_query_string,ruby_minor_version,is_tls,user_agent_name,vcl_version,client_ip_hash,bundler_minor_version,downloaded_gem_minor_version,rubygems_minor_version,is_ipv6,geo_country_code,downloaded_gem_name,downloaded_gem_version,$query,name,trace.parent_id,service_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"url\"],\"calculations\":[{\"column\":\"time_elapsed\",\"op\":\"HEATMAP\"},{\"column\":\"time_elapsed\",\"op\":\"MAX\"}],\"orders\":[{\"column\":\"time_elapsed\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"status\"],\"calculations\":[{\"column\":\"time_elapsed\",\"op\":\"HEATMAP\"},{\"column\":\"time_elapsed\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"status\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"$query\"],\"calculations\":[{\"column\":\"time_elapsed\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"$query\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"time_elapsed\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"$query\"],\"calculations\":[{\"column\":\"time_elapsed\",\"op\":\"HEATMAP\"},{\"column\":\"time_elapsed\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"$query\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"time_elapsed\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"time_elapsed\",\"op\":\"HEATMAP\"},{\"column\":\"time_elapsed\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"time_elapsed\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"url\",\"name\"],\"calculations\":[{\"column\":\"time_elapsed\",\"op\":\"HEATMAP\"},{\"column\":\"time_elapsed\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"time_elapsed\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"time_elapsed\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"time_elapsed\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"time_elapsed\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"time_elapsed\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"time_elapsed\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"url\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"time_elapsed\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"url\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"time_elapsed\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"time_elapsed\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"url\"],\"calculations\":[{\"column\":\"time_elapsed\",\"op\":\"HEATMAP\"}]}\n\nNLQ: Distribution of response times broken down by cache status\nEXISTING QUERY:\n{\"breakdowns\":[\"cache_status\"],\"calculations\":[{\"op\":\"COUNT\"},{\"column\":\"time_elapsed\",\"op\":\"HEATMAP\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":1800}\n\nNLQ: Gems with the highest number of distinct versions downloaded\nEXISTING QUERY:\n{\"breakdowns\":[\"downloaded_gem_name\"],\"calculations\":[{\"column\":\"downloaded_gem_version\",\"op\":\"COUNT_DISTINCT\"},{\"op\":\"COUNT\"}],\"orders\":[{\"column\":\"downloaded_gem_version\",\"op\":\"COUNT_DISTINCT\",\"order\":\"descending\"}],\"time_range\":1800}\n\nNLQ: Common API v1 URLs and latencies\nEXISTING QUERY:\n{\"breakdowns\":[\"url\"],\"calculations\":[{\"op\":\"COUNT\"},{\"column\":\"time_elapsed\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"url\",\"op\":\"starts-with\",\"value\":\"/api/v1/\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":1800}\n\nNLQ: Distribution of response sizes across unique content_types\nEXISTING QUERY:\n{\"breakdowns\":[\"content_type\"],\"calculations\":[{\"op\":\"COUNT\"},{\"column\":\"resp_body_size\",\"op\":\"HEATMAP\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Distinct versions of various user_agents\nEXISTING QUERY:\n{\"breakdowns\":[\"user_agent_name\"],\"calculations\":[{\"column\":\"request_user_agent\",\"op\":\"COUNT_DISTINCT\"}],\"orders\":[{\"column\":\"request_user_agent\",\"op\":\"COUNT_DISTINCT\",\"order\":\"descending\"}],\"time_range\":1800}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"url\"],\"calculations\":[{\"column\":\"time_elapsed\",\"op\":\"HEATMAP\"},{\"column\":\"time_elapsed\",\"op\":\"MAX\"}],\"orders\":[{\"column\":\"time_elapsed\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:span.num_events,event_timestamp,error,duration_ms,derived.duration_ms_log,http.target,trace.trace_id,telemetry.instrumentation_library,http.response_length \ud83d\udc1d,http.url,derived.year_month_day,status_code,span.num_links,name,trace.span_id,host.environment \ud83d\udc1d,telemetry.sdk.language,host.process_id \ud83d\udc1d,type,meta.signal_type,sli.success,telemetry.sdk.version,http.content_length \ud83d\udc1d,telemetry.sdk.name,service.instance.id,service.name,http.route,http.host,host.machine_name \ud83d\udc1d,derived.cox.endpoint,http.method,http.request.action,span.kind,http.status_code,http.referer_uri \ud83d\udc1d,app.version \ud83d\udc1d,http.request.controller,library.version,http.request.moduleType,http.scheme,http.client_ip \ud83d\udc1d,http.flavor,http.request.companyId,library.name,http.response_type \ud83d\udc1d,http.user_agent,http.request.locationId,sli.latency.GetLocationConfiguration,http.request.providerId,trace.parent_id,parent_name,exception.message\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:total error events\nEXISTING QUERY:", "completion": "{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,graphql.validation.error,exception.message,try,attempts,exception.type,caller,message,filepath,filenames,run_validations,identifier,username,gte_5000ms,keys,msg,referrer,options,gte_1000ms,exception.stacktrace,host,topic,gte_500ms,user,violated_directive,raw_report,path,name,cause_message,db.user,object_tokens,tokens,key,case_tokens,severity,template,line_number,filename,event_tokens,type,duration_ms,db.name,event_name,remote,object_name,count,cpu_architecture,service.name,http.method,task.id,parent_name,trace.parent_id,http.status_code,db.statement,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:cluster_name,cluster,scenario_id,batch_run_action_parameter.only_clustered_tables,optimization_name,workspace_report_name,job_id,region,service.namespace,hostname,start_path,batch_run_name,panel_name,service.name,deployed,path,workflow_action_parameter.create_for_clusters,action_name,optimization_id,workspace_request_id,name,span.kind,workspace_report_id,pool_size,full_name,library.name,tracer.hostname,view_name,controller,in_scenario,column_dimension,column_offset,url,column_limit,action,service,search_start_date,batch_run_action_parameter.forecast,parent_name,service.version,Interesting phase,user_id,source,workspace_request_status,service.instance.id,revision,roles,env,action_id,configVersion,error,duration_ms,Duration (min),trace.trace_id,exception.message,version,CPU time sum from CPU time >= 1000,trace.parent_id,response.status_code,http.route,CPU time sum from CPU time > 100,javaVersion,workflow_action_parameter.target_column_query_definitions_json_visibility,Action category,cpuTimeFromThreadPool,cell_update_row_dimension,CPU time sum from CPU time < 100,cell_update_paths,instance,Duration (s),affected_tables,trace_name_id,cell_update_column_dimension,UTC date,Workflow span or Workspace action\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"response.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"response.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"workflow_action_parameter.target_column_query_definitions_json_visibility\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"workflow_action_parameter.target_column_query_definitions_json_visibility\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"workflow_action_parameter.target_column_query_definitions_json_visibility\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"workflow_action_parameter.target_column_query_definitions_json_visibility\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: RELEX Plan: Nightly run duration\nEXISTING QUERY:\n{\"breakdowns\":[\"instance\",\"batch_run_name\",\"UTC date\"],\"calculations\":[{\"column\":\"Duration (min)\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"batch_run_name\",\"op\":\"contains\",\"value\":\"Nightly run\",\"join_column\":\"\"},{\"column\":\"cluster\",\"op\":\"contains\",\"value\":\"plan-sampo-static\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"UTC date\"}],\"limit\":1000,\"time_range\":604800}\n\nNLQ: RELEX Plan: Nightly run slowest phases\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"instance\"],\"calculations\":[{\"column\":\"Duration (min)\",\"op\":\"AVG\"}],\"filters\":[{\"column\":\"cluster_name\",\"op\":\"=\",\"value\":\"plan-apollo\",\"join_column\":\"\"},{\"column\":\"batch_run_name\",\"op\":\"contains\",\"value\":\"Nightly run\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"contains\",\"value\":\"Running triggers for\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"!=\",\"value\":\"Running triggers for After nightly run\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"Duration (min)\",\"op\":\"AVG\",\"order\":\"descending\"}],\"limit\":50,\"time_range\":604800}\n\n\nNLQ:cluster_name = plan-sok-sato-project\nEXISTING QUERY:", "completion": "{\"filters\":[{\"column\":\"cluster_name\",\"op\":\"=\",\"value\":\"plan-sok-sato-project\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:service.name,host.name,ip,name,rpc.service,net.transport,host.arch,type,rpc.system,db.name,span.kind,message.type,library.name,rpc.method,library.version,thread.name,container.id,message.id,net.peer.port,process.pid,os.description,os.type,thread.id,process.command_line,net.peer.ip,status_code,db.statement,parent_name,duration_ms,process.runtime.name,process.runtime.version,k8s.node.name,process.runtime.description,req_flow.checkout,telemetry.sdk.language,telemetry.instrumentation_library,telemetry.sdk.name,rpc.grpc.status_code,k8s.namespace.name,span.num_links,process.executable.path,k8s.pod.ip,telemetry.sdk.version,trace.parent_id,trace.span_id,k8s.deployment.name,span.num_events,trace.trace_id,meta.annotation_type,telemetry.auto.version,http.route,error\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:server\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"host.name\"],\"calculations\":[{\"op\":\"COUNT\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:cluster_name,cluster,scenario_id,batch_run_action_parameter.only_clustered_tables,optimization_name,workspace_report_name,job_id,region,service.namespace,hostname,start_path,batch_run_name,panel_name,service.name,deployed,path,workflow_action_parameter.create_for_clusters,action_name,optimization_id,workspace_request_id,name,span.kind,workspace_report_id,pool_size,full_name,library.name,controller,in_scenario,column_dimension,column_offset,url,column_limit,action,service,search_start_date,batch_run_action_parameter.forecast,parent_name,service.version,Interesting phase,user_id,source,workspace_request_status,service.instance.id,revision,roles,env,action_id,configVersion,Action category,dashboard_request_id,trace.parent_id,CPU time sum from CPU time < 100,error,duration_ms,instance,cell_update_paths,Workflow span or Workspace action,affected_tables,http.route,Duration (min),trace_name_id,CPU time sum from CPU time > 100,cell_update_column_dimension,response.status_code,trace.trace_id,exception.message,cell_update_row_dimension,workflow_action_parameter.target_column_query_definitions_json_visibility,UTC date,version,Duration (s),CPU time sum from CPU time >= 1000,cpuTimeFromThreadPool\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"response.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"response.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"workflow_action_parameter.target_column_query_definitions_json_visibility\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"workflow_action_parameter.target_column_query_definitions_json_visibility\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"workflow_action_parameter.target_column_query_definitions_json_visibility\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"workflow_action_parameter.target_column_query_definitions_json_visibility\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: RELEX Plan: Nightly run duration\nEXISTING QUERY:\n{\"breakdowns\":[\"instance\",\"hostname\",\"batch_run_name\",\"UTC date\"],\"calculations\":[{\"column\":\"Duration (min)\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"cluster_name\",\"op\":\"=\",\"value\":\"plan-apollo\",\"join_column\":\"\"},{\"column\":\"batch_run_name\",\"op\":\"contains\",\"value\":\"Nightly run\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"UTC date\"},{\"column\":\"hostname\"}],\"limit\":1000,\"time_range\":604800}\n\nNLQ: RELEX Plan: Nightly run slowest phases\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"instance\"],\"calculations\":[{\"column\":\"Duration (min)\",\"op\":\"AVG\"}],\"filters\":[{\"column\":\"cluster_name\",\"op\":\"=\",\"value\":\"plan-apollo\",\"join_column\":\"\"},{\"column\":\"batch_run_name\",\"op\":\"contains\",\"value\":\"Nightly run\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"contains\",\"value\":\"Running triggers for\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"!=\",\"value\":\"Running triggers for After nightly run\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"Duration (min)\",\"op\":\"AVG\",\"order\":\"descending\"}],\"limit\":50,\"time_range\":604800}\n\n\nNLQ:cluster_name = plan-sok-sato-project\nEXISTING QUERY:", "completion": "{\"filters\":[{\"column\":\"cluster_name\",\"op\":\"=\",\"value\":\"plan-sok-sato-project\",\"join_column\":\"\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:articleunpublished.data.id,name,service.name,telemetry.sdk.name,app.newDBTweet.UserScreenName,host.name,app.dbTweet.Tweet.PublishedAt,library.name,feedItemID,app.dbTweet.Tweet.UserScreenName,articleenriched.data.id,app.dbTweet.Tweet.ExternalID,app.buildMeta.Title,net.host.name,error,app.dbTweet.Tweet.ID,app.user.Name,service.version,app.user.Username,app.newDBTweet.UserName,newsItemID,event.data.id,app.buildMeta.PublishTime,was_tagged,app.dbTweet.Tweet.Text,span.kind,tweet_id,app.dbTweet.Tweet.UserName,app.user.Verified,app.newDBTweet.ExternalID,event.metadata.event_id,app.user.Protected,feedItem.ID,app.dbTweet.Tweet.UserImage,app.newDBTweet.PublishedAt,feedItem.ItemID,app.apiTweet.User.ScreenName,app.dbTweet.Tweet.UserURL,trace.trace_id,app.buildMeta.Teaser,http.flavor,app.apiTweet.User.Name,app.loadTweet.tweet,parent_name,notification.FeedItemStream.Id,app.newDBTweet.ID,honeycomb.distro.runtime_version,app.v2Tweet.Data.Id,app.dbTweet.Tweet.UserVerified,app.buildMeta.Media.Images,http.route,trace.parent_id,duration_ms,http.status_code,exception.message\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:name contains funtikpub-processTask-30874598\nEXISTING QUERY:{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"name\",\"op\":\"=\",\"value\":\"funtikclient.UpsertPost\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"limit\":100,\"time_range\":600,\"granularity\":0}", "completion": "{\"breakdowns\":[\"name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"name\",\"op\":\"contains\",\"value\":\"funtikpub-processTask-30874598\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,span.num_events,express.type,trace.trace_id,http.response_content_length_uncompressed,trace.span_id,http.status_text,status_code,http.status_code,http.route,process.pid,meta.signal_type,net.transport,span.kind,http.host,trace.parent_id,express.name,net.host.ip,net.host.port,http.target,telemetry.sdk.language,net.host.name,process.runtime.description,name,http.url,process.runtime.version,process.runtime.name,process.command,telemetry.sdk.name,http.flavor,process.command_line,span.num_links,type,telemetry.sdk.version,http.method,service.name,http.user_agent,net.peer.name,telemetry.instrumentation_library,net.peer.port,net.peer.ip,process.executable.name,http.scheme,library.version,library.name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:show respond time heatmap\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":604800,\"granularity\":0}", "completion": "{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:event.provider,message,query_time_microseconds,db.statement,liveview.event,exception.message,db.url,meta.annotation_type,db.name,span.num_events,http.method,parent_name,db.instance,meta.signal_type,db.type,log.level,trace.span_id,span.kind,telemetry.sdk.language,exception.stacktrace,http.target,source,phoenix.plug,trace.parent_id,name,net.transport,trace.trace_id,error,phoenix.action,http.scheme,process.runtime.name,service.namespace,service.instance.id,process.runtime.description,http.user_agent,service.name,queue_time_microseconds,liveview.uri,status_code,process.executable.name,http.route,exception.type,telemetry.sdk.name,host,http.status_code,library.name,type,liveview.callback,http.flavor,fly.region,duration_ms\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:this query, but only where the field \"message\" contains \"subscribed to topic `org_key_events:1`\"\nEXISTING QUERY:{\"breakdowns\":[\"log.level\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"log.level\",\"op\":\"exists\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":7200,\"granularity\":0}", "completion": "{\"breakdowns\":[\"log.level\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"log.level\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"message\",\"op\":\"contains\",\"value\":\"subscribed to topic `org_key_events:1`\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":7200,\"granularity\":0}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,exception.message,http.error_message,sha_mismatch,http.error_name,existing_bytes,url,exception.type,message,exception.stacktrace,inventory,name,http.url,incoming_bytes,existing_ttl,existing_length,existing_document,namespace,type,duration_ms,existing_sha,service.name,http.method,result_length,prisma.args,status_code,incoming_sha,library.name,process.pid,net.transport,http.host,process.command_args,is_document,http.target,process.owner,library.version,status_message,length_difference,net.host.ip,net.host.name,parent_name,net.host.port,process.command,seo_cache_updated,span.kind,incoming_length,http.flavor,prisma.action,net.peer.name,store_id,http.route,http.status_code,trace.parent_id,db.statement\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:status_code,duration_ms,tls.protocol,net.transport,process.pid,telemetry.sdk.language,meta.signal_type,peer.ipv4,library.version,tls.authorized,net.peer.port,tls.alpnProtocol,trace.trace_id,span.kind,net.host.port,trace.span_id,process.runtime.description,telemetry.instrumentation_library,tls.cipher.version,net.peer.ip,net.host.ip,process.runtime.version,service.name,honeycomb.distro.runtime_version,telemetry.sdk.version,net.peer.name,span.num_events,honeycomb.distro.version,process.command,type,tls.certificate.validTo,library.name,span.num_links,process.executable.path,trace.parent_id,telemetry.sdk.name,tls.certificate.serialNumber,name,process.executable.name,tls.certificate.validFrom,tls.certificate.fingerprint,process.owner,tls.cipher.name,process.runtime.name,process.command_args,http.route,service_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:latency distribution by status code\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:sli_route_latency_1500,duration_ms,queueSize,sli_route_latency,cachesize,requestID,discount,dropped,http.url,http.method,net.transport,error,orderid,http.target,rpc.method,http.route,http.request_content_length,ip,service.version,rpc.service,active_threads,success,currency,Context Keys,pending_pool,pool,name,message.type,area,http.host,host.name,thread.id,grpc.kind,service.name,runtime.jvm.memory.pool,host.arch,rpc.user_agent,rpc.system,runtime.jvm.gc.time,method,http.scheme,type,http.flavor,span.kind,itemCount,db.name,context_keys,thread.name,library.version,gc,exception.message,parent_name,http.status_code,db.statement,service_name,trace.parent_id\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,slo-scenario,ts_ms,http.url,http.method,net.transport,thread,query.handler,error,http.target,sli_p9999,peer.service,http.route,db.thread,http.response_content_length,ip,lead_dur_ms,client.name,lead_time_ms,exception,root-start,db.operation,sli_p99,db.row,sli_p90,db.instance,db.table,query.name,name,uri,http.uri,status,host.name,thread.id,db.type,service.name,cluster,db.snapshot,host.arch,db.system,db.user,component.name,method,http.scheme,db.file,type,release,SearchValue,span.kind,command.handler,db.statement,service_name,trace.parent_id,http.status_code\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"exception\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"exception\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,http.response_content_length_uncompressed,name,net.transport,db.system,status_code,http.url,http.host,http.status_code,db.user,http.method,http.target,service.name,db.operation,db.name,net.host.name,span.num_events,type,http.user_agent,trace.trace_id,net.host.port,http.request_content_length_uncompressed,net.host.ip,process.pid,peer.ipv4,db.statement,net.peer.name,http.status_text,http.flavor,telemetry.sdk.language,trace.span_id,span.num_links,tls.protocol,process.command,net.peer.port,span.kind,process.owner,meta.signal_type,telemetry.instrumentation_library,library.name,process.runtime.version,process.runtime.description,library.version,db.connection_string,db.sql.table,telemetry.sdk.version,process.runtime.name,telemetry.sdk.name,http.scheme,net.peer.ip,trace.parent_id,http.route,service_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:show me average response time \nEXISTING QUERY:", "completion": "{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"AVG\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,exception.message,exception.type,message.type,os.type,exception.stacktrace,host.name,name,http.url,db.user,host.arch,gropyus.realm,message.id,code.namespace,gropyus.maintained-by,type,duration_ms,db.name,http.route,service.name,http.method,os.description,db.system,status_code,db.operation,library.name,gropyus.application,service.namespace,process.pid,gropyus.stage,rpc.system,az.namespace,process.command_args,thread.id,http.target,thread.name,db.statement,library.version,net.host.name,container.id,parent_name,code.function,net.host.port,service.version,rpc.method,db.connection_string,span.kind,gropyus.service,az.client_request_id,net.peer.name,trace.parent_id,http.status_code\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:sp.feature_flags.GOV_CIS_LOG_SLOW_QUERY_MILLIS,duration_ms,ears-latency-fast,sp.notification.medium,sp.feature_flags.ARSENAL_SPLIT_WPS_DELAYED_REQUESTS,http.response_content_length_uncompressed,sre.refinery.late,http.url,http.method,net.transport,user-agent,error,http.target,aer.sli.stg.fastauditevents,request_id,peer.service,rpc.method,http.route,sp.feature_flags.GOV_IDNARSENAL_17425_TRAMS_RETRY_LOAD_CACHE,http.response_content_length,http.request_content_length,ip,region,ears-latency-prod,extension,service.version,sre.scrum,rpc.service,consumer,host.ip,sp.conn.timeout_ms,sp.conn.invoke_timeout_ms,sp.conn.results,remote.host,upgrade,sre.test.httplen,service.namespace,aer.sli.prod.fastauditevents,db.operation,sp.messaging.priority,sp.org,host.id,sp.feature_flags.PLTIN_CACHE_CLIENT_PER_REQUEST,sp.feature_flags.GOV_FINISH_REFRESH_NO_LOCK,host.type,sp.conn.max_results,meta.stressed,sp.feature_flags.GOV_ACCOUNT_AGGREGATION_WAIT_HOURS,sp.request_id,tls.protocol,trace.parent_id,http.status_code,name,exception.message,parent_name,db.statement,service_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,http.response_content_length_uncompressed,http.url,http.method,net.transport,express.type,http.target,http.route,name,express.name,http.host,service.name,http.scheme,type,http.flavor,span.kind,library.version,status_code,net.host.port,process.command,net.host.ip,library.name,net.peer.port,http.status_code,http.user_agent,net.host.name,process.command_line,process.pid,span.num_links,net.peer.name,trace.trace_id,http.status_text,trace.span_id,process.runtime.version,net.peer.ip,meta.signal_type,span.num_events,process.runtime.description,telemetry.instrumentation_library,telemetry.sdk.language,process.runtime.name,trace.parent_id,process.executable.name,telemetry.sdk.version,telemetry.sdk.name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,events,name,exists,click.partner,shop_id,command.data.partner,start-click-fetcher,command.click.partner,command.data.provider,command.id,click.provider,task_metadata.Family,command_type,service_name,invoiceEvents,click.type,task_metadata.TaskARN,filter.click.partner,raw_message,command.data.productId,cmd_json,reject_reason,command.click.productId,command.data.dateTime,filter.click.provider,retryCount,command.data.priceMill,sqs_queue,filter.click.productId,error_msg,click.priceMill,command.data.shopId,task_metadata.KnownStatus,command.click.provider,click.productId,category_branches_fallback_day,command.click.shopId,task_metadata.Cluster,applicable_fees,filter.click.shopId,task_metadata.Containers,base_event.partition,task_metadata.AvailabilityZone,container_metadata.LogDriver,click.dateTime,task_metadata.Revision,container_metadata.Image,event_metadata.event_type,best_matching_fee.Applies,trace.parent_id,http.route,duration_ms\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:anything with herdsman\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"name\",\"op\":\"contains\",\"value\":\"herdsman\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:exception.stacktrace,duration_ms,trace.trace_id,name,bifrost.client.request.size_bytes,library.name,meta.stressed,auditlogwriter.app,trace.span_id,error,container.name,hudl.bifrost.slow_response,message.type,rpc.system,cloud.zone,library.version,message.id,automation.perf_marker,hudl.is_hotchocolate,net.peer.name,trace.parent_id,service.name,http.host,graphql.http.request.query.hash,controller.name,span.num_events,hudl_hotchocolate_rate,cloud.account.id,cloud.provider,parent_name,graphql.errors.count,http.user_agent,hudl.request.id,auth_user,auditlogwriter.op,rpc.method,service.version,container.id,service.namespace,backdoor_user,exception.message,graphql.http.request.query.id,cloud.region,container.image.name,SubscriptionConnectionId,request.host,telemetry.instrumentation_library,status_message,span.kind,rpc.service,hudl.is_error,http.status_code,http.route,db.statement\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"hudl.is_error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"hudl.is_error\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"hudl.is_error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"hudl.is_error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:show me memory use\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"container.name\"],\"calculations\":[{\"op\":\"SUM\",\"column\":\"bifrost.client.request.size_bytes\"}],\"orders\":[{\"op\":\"SUM\",\"column\":\"bifrost.client.request.size_bytes\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:app.order.created_ms,app.customer_id,app.order.canceled_ms,service_name,customer_id,service.name,app.request_id,app.egocheck.session_id,service.instance.id,Customer not approved,duration_ms,app.report_consumer.diff,app.report_consumer.check_trades_recorded,app.report_consumer.order_total_size_traded,app.response,app.report_consumer.order_status,app.report_consumer.report_cumulative_quantity,app.event,app.order.id,app.exception_stacktrace,app.order_id,app.report_consumer.report_order_status,app.function_version,meta.cold_start,app.report_consumer.report_last_quantity,custom_id,order_id,trace.trace_id,app.groups,app.order.market_code,telemetry.sdk.language,session_id,telemetry.sdk.version,status_code,telemetry.sdk.name,Finished requests. Total events processed,request.user_agent,request.method,celery.queue,app.function_name,request.path,request.query,request.url,response.status_code,webhook response,execution_report,price,celery.task_id,app.exception_type,app.exception_string,error,trace.parent_id,name,request.route,db.query,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"request.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"response.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"response.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.query\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.query\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.query\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.query\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:p99 of app.creation_ms of requests that start in service named taxi-driver-public-customer\nEXISTING QUERY:{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"=\",\"value\":\"taxi-driver-public-customer\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":7200,\"granularity\":0}", "completion": "{\"breakdowns\":[\"app.order.created_ms\"],\"calculations\":[{\"column\":\"app.order.created_ms\",\"op\":\"P99\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"=\",\"value\":\"taxi-driver-public-customer\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:sli_route_latency_1500,duration_ms,queueSize,sli_route_latency,cachesize,requestID,discount,dropped,http.url,http.method,net.transport,error,orderid,http.target,rpc.method,http.route,http.request_content_length,ip,service.version,rpc.service,active_threads,success,currency,Context Keys,pending_pool,pool,name,message.type,area,http.host,host.name,thread.id,grpc.kind,service.name,runtime.jvm.memory.pool,host.arch,rpc.user_agent,rpc.system,runtime.jvm.gc.time,method,http.scheme,type,http.flavor,span.kind,itemCount,db.name,context_keys,thread.name,library.version,gc,http.status_code,db.statement,trace.parent_id,service_name,exception.message,parent_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,sli_route_latency_1500,requestID,sli_route_latency,runtime.jvm.gc.time,Context Keys,http.url,queueSize,Context Keys length,http.status_code,net.transport,http.request_content_length,http.host,http.route,http.method,rpc.user_agent,ip,http.user_agent,status_code,area,rpc.method,http.target,trace.trace_id,message.type,status_message,runtime.jvm.memory.pool,http.flavor,context_keys,orderid,process.pid,trace.span_id,chargeTotal,itemCount,service.version,rpc.service,span.num_events,host.name,active_threads,cachesize,net.host.ip,pool,thread.id,service.name,os.type,cart_total,method,process.runtime.description,thread.name,telemetry.sdk.name,runtime.jvm.memory.area,error,exception.message,parent_name,trace.parent_id,name,db.statement,service_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:Request response time heatmap\nEXISTING QUERY:{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"start_time\":1700782278,\"end_time\":1700811078,\"granularity\":0}", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filter_combination\":\"AND\",\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,error_messages,error_categories,failure_operation,uri,host.environment \u2728,is_success,name,http.url,host.machine_name \u2728,reference_id,type,duration_ms,transaction_id,service.name,peer.service,http.method,table_notes,status_code,customer_identifier,request_body,library.name,http.host,host.process_id \u2728,app.version \u2728,user_count,employee_id,library.version,status_message,company_id,client_user_id,activity_id,span.kind,eti_transaction_id,derived.year_month_day,event_timestamp,cache_hit,service.instance.id,vendor_sku,http.status_code,telemetry.sdk.language,trace.parent_id,span.num_events,location_entity_id,trace.trace_id,transaction_date_time,telemetry.instrumentation_library,catalog_item_count,derived.duration_ms_log,trace.span_id,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,resolutions,http.url,http.method,error,request_type,http.target,at,calling,request_id,rpc.method,response_code,params,queue_name,rpc.service,http.server_error,controller,resource,path,action,attempt_count,http_method,active_people,name,http.status_success,status,subscriptions_cancelled,http.host,remote_id,messages_sent,service.name,rpc.system,http.scheme,type,monthly_calls_deflected,cancelled_customer,release,span.kind,app_stage,worker_args,active_teammates,transaction_type,params.command,exception.stacktrace,failure_code,library.version,already_frozen,status_code,country,prices_count,trace.parent_id,exception.message,is_root,exception.type,parent_name,controller_action,http.status_code\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"controller_action\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"controller_action\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"controller_action\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"controller_action\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"controller_action\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: Release versions vs exceptions\nEXISTING QUERY:\n{\"breakdowns\":[\"release\",\"exception.type\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"is_root\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":1800}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"controller_action\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:url,query_name,userId,name,request.xhr,request.query,key,meta.type,duration_ms,request.method,request.secure,request.fresh,service_name,meta.instrumentations,request.original_url,request.host,response.status_code,request.path,request.param.id,request.scheme,request.route,response.content_length,request.base_url,trace.parent_id,meta.local_hostname,request.header.user_agent,request.header.content_type,trace.trace_id_source,request.http_version,trace.trace_id,request.header.accept,response.content_type,trace.span_id,response.http_version,meta.beeline_version,request.header.x_forwarded_for,request.header.x_forwarded_port,meta.package_version,request.param.contactId,meta.node_version,meta.instrumentation_count,request.param.ownerId,request.param.worksheetId,request.header.x_forwarded_proto,request.param.buildingId,request.param.flipperId,request.param.propertyManagerId,request.remote_addr,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"request.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"response.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"response.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"request.query\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"request.query\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"request.query\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"request.query\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,dc.log10_duration_ms,Duration MS groupable,app.braintree.response.transaction.statusHistory.0.timestamp,app.braintree.response.transaction.statusHistory.2.timestamp,exception.stacktrace,dc.testct,dc.sli_place_order_latencyerrors,app.braintree.response.transaction.statusHistory.1.timestamp,dc.success_rate_no_errors,span.num_events,name,span.kind,app.braintree.response.transaction.authorizationExpiresAt,app.request.deviceData,http.target,http.url,app.response.data.cart.lineItems.0.variant.images.2.dimensions.h,app.response.data.cart.lineItems.0.variant.images.3.dimensions.h,http.flavor,app.response.data.cart.lineItems.0.variant.images.0.dimensions.h,app.response.data.cart.lineItems.0.variant.images.1.dimensions.h,app.response.data.cart.lineItems.0.variant.images.6.dimensions.h,app.braintree.response.transaction.statusHistory.0.amount,app.braintree.response.transaction.updatedAt,faas.id,app.braintree.response.transaction.statusHistory.2.amount,error,trace.span_id,app.braintree.request.deviceData,dc.is_homepage,dc.braintree_fast_and_successful,app.braintree.response.transaction.statusHistory.0.transactionSource,app.response.data.cart.lineItems.0.variant.images.7.dimensions.h,dc.success_rate_third_party_calls,net.transport,app.braintree.response.transaction.statusHistory.1.amount,dc.success_rate_status_code,app.braintree.response.transaction.statusHistory.2.transactionSource,app.braintree.response.transaction.paypal.imageUrl,app.response.data.cart.key,app.request.billingAddress.custom.fields.latestArrivalOn,type,app.response.data.cart.lastModifiedAt,trace.trace_id,app.braintree.response.params.transaction.lineItems.0.totalAmount,dc.check_trace_parent,app.braintree.request.lineItems.0.totalAmount,app.braintree.response.transaction.statusHistory.1.transactionSource,app.braintree.response.params.transaction.lineItems.2.totalAmount,trace.parent_id,service.name,exception.message,parent_name,http.status_code,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:show me a HEATMAP of duration in seconds\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.url\",\"op\":\"starts-with\",\"value\":\"https://api.braintreegateway.com/merchants\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"limit\":100,\"time_range\":14400,\"granularity\":60}", "completion": "{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.url\",\"op\":\"starts-with\",\"value\":\"https://api.braintreegateway.com/merchants\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"time_range\":14400}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,exception.message,exception.type,url.query,client.port,name,server.address,client.address,type,duration_ms,http.route,server.port,service.worker_pool.tasks.failed,service.name,status_code,library.name,system.memory.usage_mb,url.path,service.worker_pool.tasks.completed,url.scheme,http.response.status_code,status_message,http.response.body,parent_name,span.kind,enduser.user.email,service.worker_pool.tasks.waiting,http.request.body.size,enduser.project.name,http.response.body.size,http.request.body,enduser.user.id,http.request.headers,service.worker_pool.tasks.successful,service.worker_pool.tasks.submitted,user_agent.original,http.response.headers,telemetry.sdk.language,trace.parent_id,enduser.project.id,http.request.method,span.num_events,service.worker_pool.workers.running,service.worker_pool.workers.idle,trace.trace_id,trace.span_id,enduser.organization.name,span.num_links,http.forwarded_to,meta.signal_type,service_name,db.statement\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.response.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.response.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,os.name,os.type,name,http.url,os.version,type,duration_ms,service.name,peer.service,http.method,os.description,status_code,library.name,http.target,net.host.name,honeycomb.distro.language,service.version,span.kind,http.flavor,net.peer.name,http.scheme,process.runtime.name,service.instance.id,http.user_agent,net.peer.port,process.runtime.version,http.status_code,telemetry.sdk.language,trace.parent_id,span.num_events,trace.trace_id,dashboard_query_option,organizationId,trace.span_id,span.num_links,meta.signal_type,telemetry.sdk.name,telemetry.sdk.version,honeycomb.distro.runtime_version,honeycomb.distro.version,http.route,exception.message,parent_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"dashboard_query_option\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"dashboard_query_option\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"dashboard_query_option\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"dashboard_query_option\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:client.port,duration_ms,client.address,enduser.project.name,enduser.project.id,enduser.user.id,server.port,enduser.user.email,server.address,span.kind,enduser.organization.id,enduser.organization.name,http.route,url.query,service.worker_pool.tasks.waiting,service.name,meta.signal_type,trace.span_id,url.path,service.worker_pool.workers.idle,trace.trace_id,worker_pool.tasks.waiting,http.response.body,error,queue.invocations.hung,http.response.body.size,span.num_events,queue.schedules.workable,worker_pool.workers.idle,queue.schedules.hung,worker_pool.tasks.completed,service.worker_pool.tasks.completed,exception.type,telemetry.sdk.language,service.worker_pool.tasks.submitted,name,queue.tasks.hung,system.memory.usage_mb,user_agent.original,queue.tasks.workable,url.scheme,span.num_links,service.worker_pool.workers.running,worker_pool.tasks.submitted,status_code,type,worker_pool.workers.running,service.worker_pool.tasks.successful,http.request.body.size,exception.message,parent_name,trace.parent_id,http.response.status_code,db.statement\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.response.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.response.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:latency distribution by endpoint\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:status_code,http.response.status_code,status_message,duration_ms,service.worker_pool.tasks.waiting,client.port,http.response.body.size,service.worker_pool.workers.idle,service.worker_pool.tasks.submitted,service.worker_pool.tasks.completed,telemetry.sdk.language,meta.signal_type,client.address,http.response.body,service.worker_pool.tasks.successful,server.address,error,server.port,http.response.headers,service.worker_pool.workers.running,system.memory.usage_mb,trace.trace_id,span.kind,enduser.user.id,service.worker_pool.tasks.failed,enduser.project.id,trace.span_id,http.route,http.request.method,url.query,url.scheme,http.request.body.size,exception.type,enduser.project.name,service.name,telemetry.sdk.version,enduser.user.email,span.num_events,user_agent.original,enduser.organization.id,http.forwarded_to,exception.message,type,url.path,library.name,span.num_links,trace.parent_id,http.request.headers,telemetry.sdk.name,enduser.organization.name,parent_name,name,db.statement,service_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.response.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.response.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:latency distribution by status code\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.response.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.response.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:code.lineno,name,code.namespace,type,duration_ms,service.name,busy_ns,idle_ns,status_code,library.name,outcome,thread.id,thread.name,library.version,code.filepath,span.kind,trace.parent_id,span.num_events,trace.trace_id,trace.span_id,span.num_links,meta.signal_type,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,error.type,error.msg,sqs.error,error.cause_chain,email,target,code.lineno,latency,id,name,http.url,transaction.id,code.namespace,type,duration_ms,provider,account.id,service.name,http.method,operation,busy_ns,idle_ns,status_code,library.name,http.host,classification,invitation_id,thread.id,thread.name,library.version,code.filepath,customer.payment.outbound.missing_in_internal,level,parent_name,adapter.payment.missing_in_internal,net.host.port,service.version,span.kind,organisation.id,http.scheme,sqs.outcome,internal_account.id,organisation_id,http.path,http.user_agent,http.status_code,trace.parent_id,span.num_events,sns.topic,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,error.type,error.msg,sqs.error,error.cause_chain,email,target,code.lineno,http.url,latency,name,type,http.method,duration_ms,id,transaction.id,provider,code.namespace,account.id,idle_ns,busy_ns,service.name,operation,status_code,http.host,library.name,classification,library.version,thread.id,code.filepath,service.version,customer.payment.outbound.missing_in_internal,thread.name,net.host.port,adapter.payment.missing_in_internal,level,invitation_id,http.scheme,organisation.id,parent_name,internal_account.id,span.kind,http.user_agent,sqs.outcome,http.path,http.status_code,trace.parent_id,trace.trace_id,span.num_events,organisation_id,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors\nEXISTING QUERY:{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":7200,\"granularity\":0}", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:service.namespace,service_name,service.name,app.optimization_job.id,app.optimization_job.executor.default,app.optimization_job.executor.requested,service.version,app.optimization_job.executor.used,serviceRequestId,app.optimization.ltp.logging_identifier,app.optimization.idp.logging_identifier,app.optimization.idp.request_id,app.optimization_job.planning_unit_id,app.optimization_data.employee_count,process.runtime.name,old_format_wfo_12018,exception.stacktrace,name,query_time_microseconds,tls.alpnProtocol,app.optimization.ltp.request_id,endpoint,telemetry.instrumentation_library,telemetry.sdk.name,queue_time_microseconds,db.instance,process.executable.name,app.optimization_data.fixed_shift_count,deployment.environment,telemetry.sdk.language,app.customer,OS,db.operation,span.num_events,process.runtime.description,az.service_request_id,requestId,net.host.name,net.transport,messaging.source.name,db.system,subcategory,tls.cipher.name,span.kind,Is Public API Route?,messaging.operation,library.name,source,az.client_request_id,az.namespace,duration_ms,parent_name,trace.parent_id,planning_unit,category,app.version,exception.message,initial_access_timestamp,locale,count,index,length,http.status_code,http.route,db.statement,page_name,value,counter,error\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: Total Planner UI events\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"=\",\"value\":\"planner-ui\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"!=\",\"value\":\"api_stat\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: Events by customer\nEXISTING QUERY:\n{\"breakdowns\":[\"app.customer\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"=\",\"value\":\"planner-ui\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"!=\",\"value\":\"api_stat\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":100,\"time_range\":7200}\n\n\nNLQ:I want to see events where service name is workload-optimization-algorithm\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"name\",\"op\":\"=\",\"value\":\"calculate_output\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":600,\"granularity\":0}", "completion": "{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"=\",\"value\":\"workload-optimization-algorithm\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:status_code,sli.automations_processing_latency,status_message,sli.postgres_query_latency,sli.sidekiq_latency,/api/v3/person/searchResults/1888eec0fefd4f4baf064fb191c0920b StatusCode,/api/v3/person/searchResults/bad68cdddaf04efa9377196d0b3b509c StatusCode,/api/v3/person/searchResults/cc2fbe1170494b768833b6b92b3603f1 StatusCode,/api/v3/person/searchResults/6d35ab5485c44d51b4d42d839336e87e StatusCode,/api/v3/person/searchResults/d8dc6c8eb2404c0491f42cfd50fafe4e StatusCode,/api/v3/person/searchResults/408235be2c2a43418a5f096293c197e4 StatusCode,/api/v3/person/searchResults/c99bbdac21af4c6991f848f2fb1bfd44 StatusCode,/api/v3/person/searchResults/901796f94b5544e6a3d418eea0dbb14f StatusCode,/api/v3/person/searchResults/94ddef4ac85b4e699cf182760c71a26e StatusCode,/api/v3/person/searchResults/254af07c059b4b299d3cbd7d27c36df8 StatusCode,http.status_code,/api/v3/person/searchResults/1b0ca2e804a2465f8750a7069c28c532 StatusCode,sli.elasticsearch_search_latency,/api/v3/person/searchResults/aa65b4fa900d472ca11a0d82119567e5 StatusCode,/api/v3/person/searchResults/5965f41e3944422ca902899c27b68d1a StatusCode,/api/v3/person/searchResults/44db9cd325eb43bd87afca7009425f4d StatusCode,/api/v3/person/searchResults/8b558e6c68ef4191b9d548d6198238da StatusCode,/api/v3/person/searchResults/c37bd21a1ca74ffa88eed953ec23f2c2 StatusCode,/api/v3/person/searchResults/6043528c27724c62a9a1d4ce0bc8f82f StatusCode,/api/v2/personReport/reportResults StatusCode,/api/v3/person/searchResults/bf5037eff8704be7853c2a57194f3fa0 StatusCode,/api/v3/person/searchResults/3e287fdc4c714b0498e418b9a700cfc6 StatusCode,/api/v3/person/searchResults/931eb225a1374ff2a79f5e76ddb79fd1 StatusCode,/api/v3/person/searchResults/8b6c5c722602405a85b860f281d48481 StatusCode,/api/v3/person/searchResults/8424638077f34c84bb4e34c29c224a81 StatusCode,/api/v3/person/searchResults/8d94deba2191445989e8c33f5e3c90b3 StatusCode,/api/v3/person/searchResults/7009d70936d04f9383067467ef44d1e7 StatusCode,/api/v3/person/searchResults/58b9f35f0e2f455190b4352b04a8e1bc StatusCode,/api/v3/person/searchResults/08602d1f1f69415783be622e2718d37a StatusCode,/api/v3/person/searchResults/4c269acb173f4f43a84b4d5ccedd73f8 StatusCode,/api/v3/person/searchResults/a81a2949268c48d097a33dd2ce08c707 StatusCode,/api/v3/person/searchResults/a3a84e74a84347a089cfd5ff08ae0622 StatusCode,/api/v3/person/searchResults/57f807666f5b429b9b98531c46385e8e StatusCode,/api/v3/person/searchResults/5d0a5940f75946ed83576e13e8079416 StatusCode,/api/v3/person/searchResults/a3763b3ffd214a159608031ca286f0f0 StatusCode,/api/v3/person/searchResults/41583370459c4d328e4d14ec7c071cb3 StatusCode,/api/v3/person/searchResults/cb75fae3d7be4d6c8febafd73a0d921f StatusCode,/api/v3/person/searchResults/be029d3ef4a14f3b953af7bfeef1790b StatusCode,/api/v3/person/searchResults/4cfe9bddbe404588854d89205dd5294a StatusCode,/api/v3/person/searchResults/9a9be8a3283e450ca780a4f3a232c415 StatusCode,/api/v3/person/searchResults/15679de7c63345fa8f1ea3c8e39195bc StatusCode,/api/v3/person/searchResults/ef952d55633d4035865dfaf12c27e6ab StatusCode,/api/v3/person/searchResults/f559ed86949e4506a7ffae06d45db340 StatusCode,duration_ms,/api/v3/person/searchResults/f5a719f5519e46c9a73dd346962f72b8 StatusCode,name,trace.parent_id,http.route,parent_name,db.statement,service.name,exception.message,error\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:latency distribution by status code\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:service.instance.id,name,fgp.identityapi.fetch_identity_duration,trace.span_id,library.name,fgp.identityapi.create_identity_duration,trace.parent_id,trace.trace_id,service.version,service.name,library.version,context.portal_site_id,telemetry.sdk.name,context.short_code,meta.refinery.reason,http.target,status_code,type,http.url,telemetry.sdk.language,net.host.name,span.kind,http.flavor,fgp.identityapi.create_cust_profile_duration,meta.refinery.sample_key,telemetry.instrumentation_library,http.route,fgp.identityapi.fetch_cust_profile_duration,fgp.identityapi.verify_email_duration,telemetry.sdk.version,fgp.cache.key,meta.signal_type,context.machine_name,fgp.identityapi.reset_password_duration,http.user_agent,http.method,http.scheme,context.branch_code,duration_ms,context.machine_env,fgp.cache.miss,meta.refinery.original_sample_rate,http.status_code,span.num_links,span.num_events,fgp.cache.fetch_duration\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:Identity API\nEXISTING QUERY:{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"context.machine_name\",\"op\":\"starts-with\",\"value\":\"VMCSMOBIPREM\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"limit\":100,\"time_range\":7200,\"granularity\":0}", "completion": "{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"=\",\"value\":\"Identity API\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,http.request_content_length_uncompressed,http.method,http.response_content_length_uncompressed,http.url,net.transport,http.target,db.operation,http.host,db.system,db.user,name,db.name,tls.protocol,service.name,tls.authorized,http.user_agent,http.flavor,db.statement,process.command,net.host.ip,peer.ipv4,net.host.name,http.scheme,process.owner,span.kind,db.sql.table,tls.alpnProtocol,http.status_code,process.pid,type,net.host.port,library.name,library.version,status_code,net.peer.name,net.peer.port,db.connection_string,trace.trace_id,http.status_text,span.num_events,tls.cipher.name,tls.cipher.version,trace.span_id,span.num_links,telemetry.instrumentation_library,process.command_args,http.client_ip,net.peer.ip,meta.signal_type,http.route,service_name,trace.parent_id\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slowest requests\nEXISTING QUERY:{\"breakdowns\":[\"http.url\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"AVG\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"AVG\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":3600,\"granularity\":0}", "completion": "{\"breakdowns\":[\"http.url\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,sli_cart_checkout_errors,message.type,ip,os.type,success,area,requestID,orderid,Context Keys,host.name,name,http.url,currency,dropped,host.arch,message.id,userid,type,duration_ms,db.name,http.route,otlp.exporter.exported,service.name,context_keys,http.method,os.description,gc,status_code,pool,library.name,process.pid,active_threads,queueSize,net.transport,http.host,itemCount,rpc.system,method,thread.id,process.command_line,http.target,thread.name,db.statement,num_products,library.version,cachesize,status_message,net.host.ip,net.host.name,http.status_code,service_name,parent_name,trace.parent_id,exception.message\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:log.level,message,error,host,type,name,source,net.transport,span.kind,library.version,db.type,http.route,library.name,db.name,phoenix.plug,http.method,exception.type,service.name,service.version,exception.message,liveview.event,event.provider,service.namespace,exception.stacktrace,fly.region,http.target,db.instance,db.url,net.host.port,phoenix.action,fly.app.instance,net.host.name,fly.app.name,db.statement,status_code,telemetry.sdk.language,liveview.callback,duration_ms,http.flavor,process.runtime.version,http.scheme,net.peer.port,parent_name,span.num_events,liveview.module,meta.signal_type,span.num_links,http.user_agent,liveview.uri,trace.trace_id,http.status_code,trace.parent_id\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:log\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"log.level\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"log.level\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:success,sli.risk_assessment.success,sli.risk.risk.endpoint_success_rate,sli.endpoints.risk.success,test.checkout.success,sli.fraud_review.success,hit,sli.threeds.success,status,test.threeds.success,test.checkout_success,error,status_code,status_message,sli.http.request.success,sli.payments.capture.success,test.authorize.success,cache_ratio,wchen.test.dataset.endpoint.success,request.attempts,error_code,session,slo.login.success.acceptable,sli.http.request.devtools.production.success,service,http.status,sli.preauth_review.success,test.authorize_endpoints.success,sli.api.merchant.track_shipment.success,sli.http.request.payments.success,sql.rows_affected,data_race_count,duration_ms,release_date,sli.api.easypost.create_tracker.success,sha,end_time,version,sli.api.aftership.create_tracker.success,test.authorize_merchant.success,job.name,bolt.job.result,start_time,test_flags,command,http.errors,sli.payments.refund.success,bolt.marking_transaction_as_failed.success,group.tasks,slo.shipping_and_tax.latency.acceptable,name,bolt.merchant.name,parent_name,exception.message,trace.parent_id,http.status_code,http.route,service_name,db.statement,bolt.request_path\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: Overall activity for all web traffic\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}],\"time_range\":7200}\n\nNLQ: Web traffic overview\nEXISTING QUERY:\n{\"breakdowns\":[\"bolt.request_path\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":10,\"time_range\":7200}\n\n\nNLQ:success rate\nEXISTING QUERY:{\"breakdowns\":[\"name\",\"bolt.merchant.name\"],\"calculations\":[{\"op\":\"COUNT\"},{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"name\",\"op\":\"=\",\"value\":\"create_order\",\"join_column\":\"\"},{\"column\":\"duration_ms\",\"op\":\"\\u003e\",\"value\":20000,\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":86400,\"granularity\":0}", "completion": "{\"breakdowns\":[\"name\"],\"calculations\":[{\"op\":\"RATE_AVG\"}],\"filters\":[{\"column\":\"success\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,http.url,http.method,error,cost,duration_min,snapshot_time,http.request_content_length,service.version,evergreen.version.requester,pit_retries,host.id,host.type,name,host.name,service.name,evergreen.github.cached,type,http.flavor,span.kind,exception.stacktrace,evergreen.github.retries,library.version,status_code,container.name,exception.type,process.command,container.id,library.name,evergreen.github.repo,log10_duration_ms,cloud.provider,http.status_code,status_message,process.owner,evergreen.command.git_get_project.clone_retries,container.runtime,http.user_agent,cloud.platform,exception.message,aws_api_err,process.command_line,exception.escaped,process.pid,evergreen.task.execution,check_root,task_flaky_pct,evergreen.github.endpoint,meta.route_taken,span.num_links,http.route,trace.parent_id,parent_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:process.pid,ip,thread.name,thread.id,host.name,host.arch,dc.error_percent,dc.success_percent,rpc.system,duration_ms,os.type,db.name,process.command_line,net.transport,service.name,name,library.name,process.runtime.version,container.id,process.runtime.name,dc.pct_error,message.type,rpc.service,process.runtime.description,library.version,type,trace.trace_id,process.executable.path,net.peer.port,status_code,rpc.method,db.statement,net.peer.ip,os.description,req_flow.checkout,span.kind,parent_name,message.id,telemetry.sdk.language,trace.parent_id,trace.span_id,dc.k8s_deployment_metrics,k8s.pod.uid,span.num_events,telemetry.instrumentation_library,k8s.node.name,honeycomb.distro.runtime_version,app.context_keys_length,telemetry.auto.version,span.num_links,error,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:cpu usage\nEXISTING QUERY:{\"breakdowns\":[\"host.name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":7200,\"granularity\":0}", "completion": "{\"breakdowns\":[\"host.name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"cpu.usage\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,http.method,http.route,http.url,http.response_content_length_uncompressed,express.type,http.target,net.transport,status_code,express.name,http.flavor,http.host,http.status_code,library.version,service.name,name,http.scheme,span.kind,process.command,type,http.user_agent,library.name,net.host.ip,http.status_text,process.pid,process.command_line,telemetry.sdk.language,process.runtime.version,net.host.port,span.num_links,meta.signal_type,span.num_events,trace.span_id,net.peer.port,telemetry.instrumentation_library,net.host.name,trace.trace_id,process.runtime.description,net.peer.name,process.runtime.name,net.peer.ip,telemetry.sdk.version,telemetry.sdk.name,trace.parent_id,process.executable.name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slow api request\nEXISTING QUERY:{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":7200,\"granularity\":0}", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"http.method\",\"op\":\"=\",\"value\":\"GET\"}],\"filter_combination\":\"AND\",\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:Request length,duration_seconds,order_processed_under_3_minutes_sli,graphql_query,inventory_processed_under_1_minute,status_error,topic,job-name,cheapest_performance_sli,rate.old_quote_differs,public_api_latency_sli,external_service.status_code_should_abort_cheapest,producer,is_timeout,day,Job Name,rate.quote.differs,missing_spans,netlinks_bypass_rate,servicename,IsRateLimitError,root_operation,quote_cheapest_than_printed,raw_cost_equal,rate.cheapest.nominal_cost_difference,rate.cheapest.is_ups_mail_innovations_zero_printed_cost,fedex.severity,operationName,error_code,op_name,request_body_account,external_service.status_code.ok_error_throttling,shopify_api,derivedDims,total_packages,external_service.status_code.ok,status_code.derived,graphql_mutation,request_body_task_type,shipping_api_proxy_rate,fedex.recipient,external_service.is_critical_carrier,EventTimestamp,external_service.duration_seconds,external_service.shop_domain,walmart_api_version,has_exceptions,posthero.tracking.fetcher.client.received_labels.success_rate,returnLabel,print_label_sli,request.route,pool.read.alchemy.pool_in_use.after,parent_name,app.error.message,duration_ms,app.error.unexpected,is_quote,app.carrier_selected,s3.image_path,shipping.query,response.status_code,concurrency.process_id,pool.read.pool_available.after,pool.read.alchemy.pool_in_overflow.after,app.error.exception,is_legacy_carrier,concurrency.traced_from_unsync,exception.message,db.statement,service.name,app.user.account_id,trace.parent_id,status_code,name,trace.trace_id,is_shipping_api,app.operation,elb,elb_status_code,shipping.carrier,is_print_label,app.carrier,external_service.url\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"app.error.message\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"app.error.message\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"app.error.message\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"request.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"request.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"request.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"request.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"app.error.message\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"request.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: Shipping Quotes per carrier\nEXISTING QUERY:\n{\"breakdowns\":[\"shipping.carrier\"],\"calculations\":[{\"column\":\"trace.trace_id\",\"op\":\"COUNT_DISTINCT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"=\",\"value\":\"shipping-api\",\"join_column\":\"\"},{\"column\":\"op_name\",\"op\":\"contains\",\"value\":\"quote\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"trace.trace_id\",\"op\":\"COUNT_DISTINCT\",\"order\":\"descending\"}],\"limit\":100,\"time_range\":86400}\n\nNLQ: Shipping Labels per Carrier\nEXISTING QUERY:\n{\"breakdowns\":[\"shipping.carrier\"],\"calculations\":[{\"column\":\"trace.trace_id\",\"op\":\"COUNT_DISTINCT\"}],\"filters\":[{\"column\":\"is_shipping_api\",\"op\":\"=\",\"value\":\"true\",\"join_column\":\"\"},{\"column\":\"shipping.query\",\"op\":\"contains\",\"value\":\"GetLabel\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"trace.trace_id\",\"op\":\"COUNT_DISTINCT\",\"order\":\"descending\"}],\"limit\":100,\"time_range\":86400}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"request.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,express.type,type,name,http.response_content_length_uncompressed,http.target,span.kind,net.transport,http.url,express.name,http.route,http.method,service.name,status_code,library.version,library.name,http.flavor,process.command,http.scheme,http.status_text,http.status_code,http.host,process.runtime.description,net.host.port,net.host.ip,process.command_line,net.host.name,span.num_events,meta.signal_type,process.runtime.version,trace.trace_id,process.pid,span.num_links,net.peer.port,trace.span_id,process.runtime.name,telemetry.sdk.language,http.user_agent,net.peer.name,trace.parent_id,telemetry.instrumentation_library,net.peer.ip,process.executable.name,telemetry.sdk.version,telemetry.sdk.name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slow response\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\">\",\"value\":200}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:instance_id,instance.id,batch.instance_id,metal.instance_id,trace.span_id,service_ref_id,trace.parent_id,interconnection_id,service_id,user.id,billing_event_id,event.id,license_activation_id,fabric_service_token_id,invoice_id,trace.trace_id,project_id,instance.os_version.id,instance.last_event,payment_method_id,billing_state_id,user.originating_idp,fabric_token_id,trace.link.trace_id,job.id,organization.id,metal.project_id,instance.image_url,batch.project_id,fabric_connection_id,ip_reservation_id,job.failed_instances_count,instance.state,virtual_circuit_id,project.id,interconnection_port_id,trace.link.span_id,hardware_reservation_id,project_ids,batch.facility_ids,job.successful_instances_count,identifier,instance.provisioner,bandwidth_service_id,root_organization_id,server.id,instance.plan,process.pid,batch.organization_id,instance.provisioned_plan,http.is_browser,name,db.statement,service.name,duration_ms,http.route,http.status_code,exception.message,parent_name,error\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:extract instance_id\nEXISTING QUERY:{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.is_browser\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"InstanceBatchController#create\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"ascending\"}],\"limit\":1000,\"time_range\":1209600,\"granularity\":5}", "completion": "{\"breakdowns\":[\"instance_id\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.is_browser\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"InstanceBatchController#create\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"ascending\"}],\"limit\":1000,\"time_range\":1209600,\"granularity\":5}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:kaia.tunnel.gateway,flagshipper.run_loop.messages_purged,workflow.replaying,paging.stats.processed,async.redelivered,monotonic_counter.apollo_router_timeout,logger.name,retries,experiment_config.llm_config.top_p,network.destination.port,flagshipper.run_loop.messages_tagged,net.peer.port,paging.stats.skipped,startTimes,litmus_process_extension_events_fflag,kaia.replication.source,flagshipper.prior_tag_op_at,trackingVersion,tripwire.threshold,sync.allow_duplicate_prospects,process.pid,net.transport,slo.flagship_request_ok,exception.stacktrace,sync.record_mapping.sync.outbound_timestamp,polaroid.s3.outfile,queue.partitions.history,flagshipper.run_loop.messages_published,governance_bypass_reason,histogram.apollo_router_processing_time,paging.delta,Traceparent,pass,firework_fflag,traceparent,dwf10663,net.peer.ip,error.cause.cause.cause.cause.cause.cause.cause.throttling.retry.attempts,sync.debug_enabled,flagship.cache_count.sql,monotonic_counter.apollo_router_http_requests_total,db.backtrace,error.cause.cause.outreach.s2s,force_trace,validation_job.flagship_table,error.cause.cause.cause.traceparent,reconnectable_error,slo.flagship_5s_req,mail.mode,llm_engine.top_p,service.name,parent_name,http.url,name,db.statement,kind,reason,error.kind,duration_ms,message,http.status_code,smartstore.search_path,namespace,exception.message,trace.parent_id\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error.kind\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error.kind\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error.kind\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.url\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.url\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.url\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.url\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error.kind\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.url\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: Overall activity for all web traffic\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}],\"time_range\":7200}\n\nNLQ: Web traffic overview\nEXISTING QUERY:\n{\"breakdowns\":[\"smartstore.search_path\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":10,\"time_range\":7200}\n\n\nNLQ:duplicated ppsgateway logs\nEXISTING QUERY:{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"=\",\"value\":\"ppsgateway\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"limit\":100,\"time_range\":600,\"granularity\":0}", "completion": "{\"breakdowns\":[\"logger.name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"logger.name\",\"op\":\"=\",\"value\":\"ppsgateway\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"time_range\":600}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,deprecatedSource,error,severity,flags,rpc.method,deprecatedCount,ip,rpc.service,interface,metadata,container.cpu.time,deprecatedLastTimestamp,name,regarding,namespace,message.type,watch-type,severity_text,apiVersion,kind,service.name,rpc.system,container.uptime,type,uid,span.kind,db.name,note,body,resourceVersion,library.version,db.statement,status_code,event.domain,managedFields,deprecatedFirstTimestamp,container.memory.page_faults,event.name,container.memory.available,k8s.container.cpu_request,container.id,library.name,container.memory.rss,message.uncompressed_size,rpc.grpc.status_code,net.peer.port,k8s.container.memory_request,container.memory.working_set,status_message,trace.parent_id,service_name,http.route,\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: Recent deployment events\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"namespace\",\"\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"kind\",\"op\":\"=\",\"value\":\"Deployment\",\"join_column\":\"\"}],\"time_range\":7200}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,http.response_content_length_uncompressed,http.url,http.method,net.transport,express.type,http.target,http.route,name,express.name,http.host,service.name,http.scheme,type,http.flavor,span.kind,library.version,status_code,net.host.port,process.command,net.host.ip,library.name,net.peer.port,http.status_code,http.user_agent,net.host.name,process.command_line,process.pid,span.num_links,net.peer.name,trace.trace_id,http.status_text,trace.span_id,process.runtime.version,net.peer.ip,meta.signal_type,span.num_events,process.runtime.description,telemetry.instrumentation_library,telemetry.sdk.language,process.runtime.name,trace.parent_id,process.executable.name,telemetry.sdk.version,telemetry.sdk.name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,process.pid,http.url,process.command,process.runtime.description,process.runtime.version,http.status_code,http.method,http.response_content_length_uncompressed,http.host,status_code,net.transport,process.runtime.name,db.operation,service.name,net.host.port,process.executable.path,process.owner,http.request_content_length_uncompressed,trace.trace_id,http.status_text,process.command_args,db.system,http.target,tls.protocol,db.connection_string,http.scheme,process.executable.name,tls.authorized,db.name,trace.span_id,net.peer.port,net.host.name,tls.alpnProtocol,http.user_agent,http.client_ip,telemetry.instrumentation_library,net.host.ip,db.user,db.statement,trace.parent_id,peer.ipv4,tls.certificate.validTo,telemetry.sdk.version,telemetry.sdk.language,name,tls.certificate.serialNumber,library.version,db.sql.table,span.num_events,http.route,service_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:show me average response time for url = http://localhost:3183/api/v1/transactions/process\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"AVG\"}],\"filters\":[{\"column\":\"http.url\",\"op\":\"=\",\"value\":\"http://localhost:3183/api/v1/transactions/process\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":7200,\"granularity\":0}", "completion": "{\"breakdowns\":[\"http.url\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"AVG\"}],\"filters\":[{\"column\":\"http.url\",\"op\":\"=\",\"value\":\"http://localhost:3183/api/v1/transactions/process\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:container.image.name,container.image.tag,k8s.container.restarts,k8s.container.name,container.id,otelcol_otelsvc_k8s_pod_deleted,k8s.job.successful_pods,k8s.container.ready,k8s.job.active_pods,k8s.job.failed_pods,k8s.statefulset.updated_pods,k8s.statefulset.current_pods,k8s.job.desired_successful_pods,otelcol_otelsvc_k8s_pod_updated,otelcol_otelsvc_k8s_pod_added,k8s.container.memory_request,k8s.container.memory_limit,k8s.statefulset.ready_pods,k8s.cronjob.active_jobs,k8s.pod.phase,k8s.container.cpu_limit,k8s.container.cpu_request,k8s.deployment.desired,k8s.statefulset.desired_pods,scrape_samples_scraped,k8s.daemonset.misscheduled_nodes,otelcol_otelsvc_k8s_namespace_updated,k8s.job.name,k8s.replication_controller.desired,k8s.replicaset.desired,otelcol_otelsvc_k8s_namespace_added,k8s.pod.name,k8s.deployment.available,k8s.namespace.name,k8s.namespace.phase,k8s.job.uid,k8s.pod.uid,k8s.statefulset.uid,k8s.statefulset.name,k8s.node.name,k8s.daemonset.name,k8s.daemonset.current_scheduled_nodes,transport,k8s.cronjob.name,k8s.namespace.uid,k8s.node.condition_ready,k8s.replicationcontroller.uid,k8s.replicationcontroller.name,k8s.daemonset.uid,otelcol_otelsvc_k8s_pod_table_size,trace.parent_id,service_name,duration_ms,http.route,name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ: Show me Container Images that were terminated\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"container.image.name\"],\"filters\":[{\"column\":\"k8s.container.restarts\",\"op\":\">\",\"value\":0}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,sli_cart_checkout_errors,message.type,ip,os.type,success,area,requestID,orderid,Context Keys,host.name,name,http.url,currency,dropped,host.arch,message.id,userid,type,duration_ms,db.name,http.route,otlp.exporter.exported,service.name,context_keys,http.method,os.description,gc,status_code,pool,library.name,process.pid,active_threads,queueSize,net.transport,http.host,itemCount,rpc.system,method,thread.id,process.command_line,http.target,thread.name,db.statement,num_products,library.version,cachesize,status_message,net.host.ip,net.host.name,service_name,parent_name,http.status_code,exception.message,trace.parent_id\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,name,message,version,state,error,system,hostname,message.size,context,message.type,user.id,message.channel,user.username,exception.stacktrace,http.route,trace.trace_id,exception.message,trace.span_id,user.identifier,service.name,entity.prefab,trace.parent_id,position.z,position.y,http.status_code,http.status_description,position.x,meta.annotation_type\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:how long does the average raid last?\nEXISTING QUERY:{\"breakdowns\":[\"user.username\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":5184000,\"granularity\":0}", "completion": "{\"breakdowns\":[\"duration_ms\"],\"calculations\":[{\"op\":\"AVG\"}],\"filters\":[{\"column\":\"name\",\"op\":\"=\",\"value\":\"raid\"}],\"time_range\":5184000}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:request.ot-tracer-traceid,trace.trace_id,http.query_string.mqj_cbfegc,trace_id,request.x-b3-traceid,response.ot-tracer-traceid,request.X-Trace-Id,request.jaeger-debug-id,request.sentry-trace,response.x-b3-traceid,request.cf-request-id,http.query_string.af_fpwtbhi,db.query,request.meth-trace,request.ot-tracer-spanid,request.bc-bj-dws248,query-name,request.x-datadog-trace-id,http.query_string.dfj_azhyfzn,trace.span_id,request.ot-tracer-sampled,request.bc-bj-dws87,http.query_string.rql_cbnacfw,response.ot-tracer-spanid,http.query_string.ltl_daexbyjg,request-id,http.query_string.abg_aewjengq,request.x-fastab-4,guid:x-request-id,request.olah69t81k36siexpkdknvi0hgruiect,request.x-myqee-system-debug,request.fastly-debug,http.query_string.ek_dbtibgc,http.query_string.yxs_ceqtdqng,request.request-method-trace,http.request.header.x-b3-traceid,http.query_string.xnx_yfbz,sql.query,transaction_id:,request.x-b3-spanid,stacktrace,response.ot-tracer-sampled,request_id,http.query_string.cfa_owfkff,requestId,request.acunetix-aspect-queries,db.sql.args.4,http.query_string.jil_wfblxh,http.request.header.traceparent,response.x-b3-spanid,duration_ms,error,http.route,http.path,exception.message,trace.parent_id,http.status_code,db.statement,redirect_path,parent_name,name,service.name,country\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: POST /change\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"=\",\"value\":\"payments-verification-service\",\"join_column\":\"\"},{\"column\":\"country\",\"op\":\"=\",\"value\":\"US\",\"join_column\":\"\"},{\"column\":\"http.path\",\"op\":\"=\",\"value\":\"/change\",\"join_column\":\"\"}],\"limit\":100,\"time_range\":7200,\"granularity\":5}\n\nNLQ: Overall activity for all web traffic\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}],\"time_range\":7200}\n\n\nNLQ:show me queries with trace id in cf4af9d74b0b28230cf18203868b2a91, f3f846ec60be9d9cb3126cdb458ad67b\nEXISTING QUERY:{\"calculations\":[{\"op\":\"COUNT\"},{\"column\":\"duration_ms\",\"op\":\"P99\"}],\"filters\":[{\"column\":\"trace_id\",\"op\":\"in\",\"value\":[\"\\\"cf4af9d74b0b28230cf18203868b2a91\\\"\"],\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":1000,\"start_time\":1700727420,\"end_time\":1700728500,\"granularity\":15}", "completion": "{\"calculations\":[{\"op\":\"COUNT\"},{\"column\":\"duration_ms\",\"op\":\"P99\"}],\"filters\":[{\"column\":\"trace_id\",\"op\":\"in\",\"value\":[\"cf4af9d74b0b28230cf18203868b2a91\",\"f3f846ec60be9d9cb3126cdb458ad67f\"],\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":1000,\"start_time\":1700727420,\"end_time\":1700728500,\"granularity\":15}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:request.secure,duration_ms,request.xhr,db.query,http.url,http.method,error,db.duration,db.error,retry_attempts,rpc.method,request.method,start_timestamp,request.content_length,service.version,rpc.service,db.operation,error_detail,name,namespace,status,service.name,request.error_detail,rpc.system,request.user,db.system,request.scheme,type,span.kind,request.path,request.host,exception.stacktrace,response.status_code,db.total_duration,library.version,end_timestamp,status_code,date,exception.type,aws.request_id,request.route,library.name,span_type,video_region,video_status,module,http.status_code,db.rows_affected,request.accept_language,status_message,parent_name,trace.parent_id,http.route,service_name,exception.message\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"request.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"response.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"response.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.operation\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.operation\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.operation\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.operation\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:err,uname,url,userId,error,name,event,keys,message,msg,target,Loki_Experience_sli_healthy,keys found,expr,tick,user,state_transitions,end,start,results,component,event-cost-usd,dedup,keys requested,keys missing,bytes,series,directory,Grafana_Experience_sli_healthy,time,transaction,requested keys,frames,block.id,net.host.name,orgId,Loki_Errors%2C_Good_vs._Bad_sli_healthy,meta.stressed,http.local,sumup.org.squad,block.maxt,error.object,service.name,http.conn.idletime,org_id,trace.origin,dashboard_uid,http.send.error,meta.refinery.reason,latency,sumup.apigateway.endpoint.route,http.status_code,duration_ms,parent_name,trace.parent_id,query.request,kind,reason,exception.message,http.route,namespace\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"sumup.apigateway.endpoint.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"query.request\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"query.request\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"query.request\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"query.request\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: Recent deployment events\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"namespace\",\"message\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"kind\",\"op\":\"=\",\"value\":\"Deployment\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: All pod events\nEXISTING QUERY:\n{\"breakdowns\":[\"reason\",\"name\",\"namespace\",\"message\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"kind\",\"op\":\"=\",\"value\":\"Deployment\",\"join_column\":\"\"}],\"time_range\":7200}\n\n\nNLQ:f8ebf0427b14e99baa8004ec6f46e05e\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"f8ebf0427b14e99baa8004ec6f46e05e\"],\"calculations\":[{\"op\":\"COUNT\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:etag,page,scope-key,api-key,via,name,lf,url,size,conversation-query,number of sentences,location,pragma,input-message,span.kind,vector,error,id,vary,date,library.name,blurb,candidates-with-scores,dev-key,dot_talk_code,content,model,threshold,server,method,result,uri,category,status,trace.span_id,connection,referrer-policy,x-cache,extra-parameters,text-to-convert,type,__uri,conversation-id,expires,ngrok-trace-id,resolved url,gc-all,set-cookie,trace.trace_id,accept-ranges,trace.parent_id,http.status_code,query,http.route,service.name,duration_ms\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"query\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"query\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"query\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"query\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:Can you show me markers?\nEXISTING QUERY:{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"name\",\"op\":\"=\",\"value\":\"engine-start\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":7200,\"granularity\":0}", "completion": "{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"name\",\"op\":\"=\",\"value\":\"marker\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":7200,\"granularity\":0}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:timestamp,now,timer,sli.journeyx_lag_600s,delivery_imminent,busy_ns,event,messaging.message_timestamp,queued_at,updated_at,update,event_log,bucket_time,sent,delay,event_data,created_at,events,changes,sli.playerd_lag_600s,duration_ms,state,canceled,id,subscription_event,tz,remaining,flags,code,user_state,topic,servers,members,attempt,delivery_at,name,current_offset,target,frequency_capped,notification_id,increment,url,count,facet,Nth Request,timer_id,notification_object,enqueued_at,request,database.name,http.route,trace.parent_id,http.method,service.name,http.status_code_family,sidekiq.worker,exception.message,parent_name,http.status_code,error,db.statement,sidekiq.queue\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: Request concurrency\nEXISTING QUERY:\n{\"breakdowns\":[\"http.method\",\"http.route\",\"service.name\"],\"calculations\":[{\"op\":\"CONCURRENCY\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"CONCURRENCY\",\"order\":\"descending\"}],\"limit\":10,\"time_range\":28800}\n\nNLQ: Top 10 HTTP endpoints by total time\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\",\"http.method\",\"service.name\"],\"calculations\":[{\"op\":\"COUNT\"},{\"column\":\"duration_ms\",\"op\":\"P50\"},{\"column\":\"duration_ms\",\"op\":\"P90\"},{\"column\":\"duration_ms\",\"op\":\"P99\"},{\"column\":\"duration_ms\",\"op\":\"P999\"},{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"limit\":10,\"time_range\":7200}\n\n\nNLQ:show me time period for 11/23/2023 5am pst to 11/23/2023 6am pst \nEXISTING QUERY:{\"calculations\":[{\"op\":\"COUNT\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"start_time\":1642818000,\"end_time\":1642821600,\"granularity\":0}", "completion": "{\"start_time\": 1642818000, \"end_time\": 1642821600}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:trace.trace_id,exception.stacktrace,flags.collect-full-trace,options.traceback,trace.parent_id,trace.span_id,path,http.url,options.fixup,exception.escaped,http.route,flags.api-allow-forwarding-to-coreweave-us,flags.can-use-replicate-debug-header,http.host,flags.show-training-metrics-chart,flags.strict_data_uri_validation,flags.rewrite-prediction-requests-for-hot-swappable-versions,flags.show-interactive-llama-blog-post,http.target,flags.record-instance-state,flags.api-allow-forwarding-to-us-east4,flags.strict_type_validation,flags.hotswap-disable-logs,db.name,flags.api-allow-forwarding-to-us-central1,flags.enforce-free-usage-time-limit,flags.new_output_url_rewriter,error,flags.record-token-counts-for-prediction-usage-events,parent_name,flags.use-default-scaling-config,db.user,name,library.name,flags.api-allow-forwarding-to-aws-us-east-1,flags.allow-indirect-model-access,http.scheme,command.name,http.flavor,db.system,model.name,flags.run_counts,flags.prefer-lga1-for-latency-sensitive-deployments,flags.use-metronome-alerts,command.module,options.verbosity,flags.use-new-director,http.method,flags.api-allow-forwarding-to-asia-southeast4,flags.show-grouped-invoice,http.status_code,service.version,db.statement,exception.message,service.name,LOG10(duration_ms),span.kind,duration_ms,sli.request_success,status_message,error.routine_error\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: Success/failure latency overview\nEXISTING QUERY:\n{\"breakdowns\":[\"sli.request_success\",\"service.version\"],\"calculations\":[{\"column\":\"LOG10(duration_ms)\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"sli.request_success\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":86400}\n\nNLQ: Top 10 SLI failure sources\nEXISTING QUERY:\n{\"breakdowns\":[\"http.host\",\"http.method\",\"http.route\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.host\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"sli.request_success\",\"op\":\"=\",\"value\":false,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":10,\"time_range\":86400}\n\n\nNLQ:traces for `/`\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"trace.trace_id\"],\"filters\":[{\"column\":\"http.route\",\"op\":\"=\",\"value\":\"/\",\"join_column\":\"\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:oso_cloud.tenant_id,tenant_pub_id,oso_cloud.tenant_name,oso_cloud.is_production_tenant,Production customer write lag <5s,Prod customer API read latency <30ms,read_traffic_latency,token_pub_id,Prod customer API read latency <30ms_copy,replica_lag_send_time,trace.span_id,app.consistency.offset_lag,duration_ms,hashed_token,LOG10(app.feature.replica_lag_ms),app.replica_fairing.liftoff.final_offset_lag,duration,app.feature.replica_lag_ms,environment_pub_id,bucket,trace.trace_id,timeout,app.feature.replica_lag_environment_id,app.hostId,thread.id,Kafka Degraded,request_id,db.duration_ms_per_fact,db.pool_idle_conns,resource_id,token_cache.cache_hit,minute,app.replica_fairing.catchup.offset_lag,app.taskId,replica_fairing::liftoff::total_offset_lag,idle_ns,metadata_json,hour,http.duration_ms,n_facts_2,provider,actor_id,target,slow_onmi,app.replica_fairing.catchup.attempt,LOG10(duration_ms),id,trace.parent_id,desired_offset,messaging.kafka.client_id,http.path,http.status_code,name,db.statement,service.name,is_err,slo_category\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"is_err\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"is_err\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"is_err\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.path\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.path\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.path\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.path\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"is_err\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.path\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: Customers with Failing SLO\nEXISTING QUERY:\n{\"breakdowns\":[\"oso_cloud.tenant_id\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"P90\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"slo_category\",\"op\":\"=\",\"value\":\"read\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P90\",\"order\":\"descending\"}],\"havings\":[{\"column\":\"duration_ms\",\"calculate_op\":\"P90\",\"op\":\"\\u003e\",\"value\":50},{\"calculate_op\":\"COUNT\",\"op\":\"\\u003e\",\"value\":1000}],\"time_range\":604800}\n\n\nNLQ:latency distribution by tenant_id t_5wrHLlFtgseqe1ZChVzBsP\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"oso_cloud.tenant_id\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"oso_cloud.tenant_id\",\"op\":\"=\",\"value\":\"t_5wrHLlFtgseqe1ZChVzBsP\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:status_code,status_message,http.status_code,duration_ms,http.status_text,express.type,http.response_content_length_uncompressed,rpc.method,tls.protocol,net.transport,process.pid,rpc.service,rpc.system,telemetry.sdk.language,meta.signal_type,peer.ipv4,exception.stacktrace,peer[6].ipv4,peer[5].ipv4,error,peer[4].ipv4,peer[3].ipv4,library.version,peer[7].ipv4,tls.authorized,http.request_content_length_uncompressed,net.peer.port,http.method,tls.alpnProtocol,peer[2].ipv4,peer[1].ipv4,trace.trace_id,http.scheme,db.system,span.kind,net.host.port,express.name,trace.span_id,http.route,process.runtime.description,telemetry.instrumentation_library,db.postgresql.idle.timeout.millis,tls.cipher.version,net.peer.ip,user.role,db.statement,http.flavor,http.url,exception.type,net.host.ip,name,trace.parent_id,service_name,exception.message,parent_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:latency distribution by status code\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,error.message,name,http.url,type,duration_ms,http.route,service.name,peer.service,http.method,status_code,library.name,http.host,ls.gql.query,http.target,library.version,status_message,service.version,span.kind,ls.client-key,ls.gql.operation,service.instance.id,ls.install-key,http.user_agent,http.status_code,trace.parent_id,span.num_events,trace.trace_id,telemetry.instrumentation_library,meta.refinery.dynsampler_key,trace.span_id,span.num_links,ls.gql.response.License,config_api_availability_sli,ls.gql.response.InstallKey,meta.signal_type,meta.refinery.original_sample_rate,ls.gql.response.Client_Id,ls.GetM2MToken.request.clientId,ls.GetM2MToken.request.Auth0Audience,ls.gql.response.SiteId,ls.gql.response.DisplayName,ls.GetM2MToken.request.Auth0Endpoint\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"ls.gql.query\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"ls.gql.query\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"ls.gql.query\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"ls.gql.query\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:state,duration_ms,position.z,position.x,entity.prefab,position.y,message.type,message.size,message,user.identifier,version,trace.parent_id,error,name,system,user.id,trace.trace_id,user.username,context,exception.stacktrace,trace.span_id,message.channel,hostname,service.name,exception.message,http.status_code,http.route,meta.annotation_type,http.status_description\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:p99 duration of state = CalibrateHeightSceneState\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"state\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"P99\"}],\"filters\":[{\"column\":\"state\",\"op\":\"=\",\"value\":\"CalibrateHeightSceneState\",\"join_column\":\"\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,http.response_content_length_uncompressed,http.url,http.method,net.transport,express.type,http.target,http.route,name,express.name,http.host,service.name,http.scheme,type,http.flavor,span.kind,library.version,status_code,net.host.port,process.command,net.host.ip,library.name,net.peer.port,http.status_code,http.user_agent,net.host.name,process.command_line,process.pid,span.num_links,net.peer.name,trace.trace_id,http.status_text,trace.span_id,process.runtime.version,net.peer.ip,meta.signal_type,span.num_events,process.runtime.description,telemetry.instrumentation_library,telemetry.sdk.language,process.runtime.name,trace.parent_id,process.executable.name,telemetry.sdk.version,telemetry.sdk.name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"duration_ms\",\"op\":\">\",\"value\":1000}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:app.event_name,app.event_id,name,span.num_events,db.name,db.system,process.runtime.name,exception.stacktrace,app.collection,job.enqueued_at,app.subscriber_name,library.name,db.statement,error,telemetry.sdk.name,service.name,job.created_at,exception.type,exception.message,parent_name,http.target,process.runtime.description,http.host,span.kind,net.peer.name,app.queued_times,messaging.system,http.route,duration_ms,job.latency_ms,messaging.destination,telemetry.sdk.language,trace.trace_id,messaging.operation,deployment.environment,service.version,trace.link.trace_id,type,status_message,process.pid,trace.span_id,meta.refinery.reason,process.runtime.version,messaging.protocol,telemetry.instrumentation_library,log10_duration_ms,process.command,trace.parent_id,library.version,http.method,http.status_code\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:show events with name Event dropped\nEXISTING QUERY:{\"breakdowns\":[\"app.event_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"app.event_name\",\"op\":\"=\",\"value\":\"Event drop\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":7200,\"granularity\":0}", "completion": "{\"breakdowns\":[\"app.event_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"app.event_name\",\"op\":\"=\",\"value\":\"Event dropped\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:processor,k8s.container.cpu_request,otelcol_process_cpu_seconds,k8s.container.cpu_limit,net.host.name,k8s.node.name,k8s.node.uid,up,net.host.port,otelcol_processor_batch_batch_send_size.avg,otelcol_process_memory_rss,otelcol_processor_batch_batch_send_size.p50,service.name,receiver,k8s.node.condition_ready,otelcol_processor_batch_batch_send_size.p001,scraper,otelcol_processor_batch_batch_send_size.count,otelcol_processor_batch_batch_send_size.p90,otelcol_processor_batch_batch_send_size.p05,otelcol_process_runtime_total_sys_memory_bytes,otelcol_process_uptime,otelcol_processor_batch_batch_send_size.min,otelcol_process_runtime_total_alloc_bytes,container.id,otelcol_processor_batch_batch_send_size.p95,k8s.cronjob.name,otelcol_processor_batch_batch_send_size.p01,otelcol_processor_batch_batch_send_size.p25,otelcol_processor_batch_batch_send_size.p10,otelcol_processor_batch_batch_send_size.sum,k8s.cronjob.active_jobs,otelcol_processor_batch_batch_send_size.p999,k8s.cronjob.uid,k8s.daemonset.current_scheduled_nodes,otelcol_process_runtime_heap_alloc_bytes,otelcol_processor_batch_batch_send_size.p75,container.image.name,otelcol_processor_batch_batch_send_size.p99,otelcol_processor_batch_batch_send_size.max,exporter,service.instance.id,k8s.container.name,k8s.container.memory_request,k8s.daemonset.ready_nodes,service_name,k8s.container.memory_limit,otelcol_processor_batch_timeout_trigger_send,otelcol_processor_refused_metric_points,k8s.container.ready,http.route,name,trace.parent_id,duration_ms\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:cpu my node\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"k8s.node.name\"],\"calculations\":[{\"column\":\"k8s.container.cpu_request\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"k8s.node.name\"],\"calculations\":[{\"column\":\"k8s.container.cpu_request\",\"op\":\"HEATMAP\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,process.runtime.name,process.runtime.version,db.system,span.num_events,name,db.name,span.kind,honeycomb.distro.runtime_version,service.instance.id,telemetry.sdk.version,telemetry.sdk.name,telemetry.instrumentation_library,telemetry.sdk.language,service.version,trace.link.trace_id,peer.service,service.name,trace.trace_id,trace.span_id,error,os.version,net.peer.name,honeycomb.distro.version,honeycomb.distro.language,os.name,library.version,http.method,status_message,os.description,trace.parent_id,db.statement_type,span.num_links,trace.link.span_id,http.url,status_code,library.name,os.type,meta.signal_type,type,http.status_code,meta.annotation_type,parent_name,http.scheme,http.flavor,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:show me the average execution time of ProcessMatchmakingQueueJob\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"AVG\"}],\"filters\":[{\"column\":\"name\",\"op\":\"=\",\"value\":\"ProcessMatchmakingQueueJob\",\"join_column\":\"\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:k8s.job.active_pods,k8s.statefulset.ready_pods,k8s.statefulset.current_pods,k8s.statefulset.updated_pods,k8s.pod.phase,k8s.job.failed_pods,k8s.job.successful_pods,k8s.statefulset.desired_pods,k8s.job.desired_successful_pods,k8s.pod.name,otelcol_otelsvc_k8s_pod_added,k8s.container.ready,k8s.container.restarts,otelcol_otelsvc_k8s_pod_deleted,k8s.pod.uid,otelcol_otelsvc_k8s_pod_updated,k8s.deployment.desired,k8s.container.name,k8s.node.condition_ready,k8s.job.max_parallel_pods,k8s.deployment.available,k8s.replicaset.desired,k8s.replication_controller.desired,k8s.replicaset.available,k8s.namespace.phase,k8s.cronjob.active_jobs,k8s.daemonset.misscheduled_nodes,container.id,k8s.job.name,k8s.namespace.name,otelcol_otelsvc_k8s_pod_table_size,up,k8s.replication_controller.available,k8s.daemonset.current_scheduled_nodes,k8s.node.name,k8s.daemonset.desired_scheduled_nodes,k8s.daemonset.ready_nodes,otelcol_otelsvc_k8s_namespace_added,service.name,scrape_series_added,k8s.replicationcontroller.name,k8s.hpa.current_replicas,k8s.daemonset.name,k8s.statefulset.name,k8s.cronjob.name,k8s.replicaset.name,k8s.deployment.name,container.image.name,scrape_samples_scraped,net.host.port,trace.parent_id,service_name,duration_ms,http.route,name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:\u201cShow me the pods that have a reason of Started\u201d\nEXISTING QUERY:{\"breakdowns\":[\"k8s.node.name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"k8s.namespace.phase\",\"op\":\"=\",\"value\":\"ControlPlane\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":7200,\"granularity\":0}", "completion": "{\"breakdowns\":[\"k8s.pod.name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"k8s.pod.phase\",\"op\":\"=\",\"value\":\"Started\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":7200,\"granularity\":0}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:transaction_success_000194,transaction_success_000160,transaction_success_000190,db.system,error,messaging.system,db.user,db.name,name,exception.stacktrace,thread.id,app.client,honeycomb.distro.variant,app.subclient,thread.name,net.transport,service.name,telemetry.instrumentation_library,db.sql.table,db.cassandra.coordinator.dc,code.function,net.protocol.name,library.version,db.statement,transaction_error,type,host.arch,net.protocol.version,telemetry.auto.version,process.pid,db.connection_string,status_code,code.namespace,library.name,db.operation,app.prefetch.features.unmarshall.ms.max,process.runtime.version,honeycomb.distro.runtime_version,app.processor,host.name,app.request.uid,exception.type,net.peer.name,trace.trace_id,process.runtime.description,user_agent.original,app.prefetch.features.unmarshall.ms.total,os.description,net.host.name,db.cassandra.coordinator.id,service_name,duration_ms,parent_name,trace.parent_id,http.route,http.status_code,exception.message\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:d4072b5adfcbb075cb742fa896e011b6\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"trace.trace_id\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"trace.trace_id\",\"op\":\"=\",\"value\":\"d4072b5adfcbb075cb742fa896e011b6\",\"join_column\":\"\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,express.type,name,net.transport,type,http.response_content_length_uncompressed,http.url,http.target,http.route,express.name,service.name,span.kind,http.method,status_code,http.host,net.host.name,net.host.port,http.flavor,net.host.ip,library.version,process.command,library.name,http.status_code,process.command_line,http.status_text,http.scheme,span.num_events,process.runtime.version,net.peer.port,process.runtime.description,trace.trace_id,process.pid,span.num_links,net.peer.name,process.runtime.name,trace.span_id,meta.signal_type,http.user_agent,telemetry.sdk.language,trace.parent_id,net.peer.ip,telemetry.instrumentation_library,telemetry.sdk.version,process.executable.name,telemetry.sdk.name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slow respond time\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":7200,\"granularity\":0}", "completion": "{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:search.query,customer.email,db.user,name,query.expand,db.name,parent_name,request.body,host.name,customer.location,firebase.email,http.url,query.limit,firebase.uid,thread.name,Query Length,net.transport,guest.id,search.query.limit,request.body.referrerReferralCode,net.peer.name,http.method,user_agent.original,library.name,customer.analytics_id,search.total_hits,service.name,customer.advocate_referral_code,latitude,message,trace.link.trace_id,http.route,search.country_code,process.runtime.name,search.query.sort_by,start_time,cart.start_new_cart,customer.external_id,longitude,trace.trace_id,customer.address_external_id,rpc.method,search.found_shifts,host.arch,http.target,response.body,error,trace.parent_id,search.page_number,event,duration_ms,http.status_code,exception.message,db.statement\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:requests where the user first name is \"nhi\" and last name is \"tran\"\nEXISTING QUERY:{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":1800,\"granularity\":0}", "completion": "{\"breakdowns\":[\"user.first_name\",\"user.last_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"user.first_name\",\"op\":\"=\",\"value\":\"nhi\"},{\"column\":\"user.last_name\",\"op\":\"=\",\"value\":\"tran\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":1800}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:state,duration_ms,name,trace.span_id,user.id,exception.stacktrace,trace.trace_id,user.identifier,message,message.type,message.size,context,trace.parent_id,user.username,error,system,position.x,version,hostname,position.y,service.name,entity.prefab,message.channel,position.z,exception.message,http.status_description,meta.annotation_type,http.status_code,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:show me the average duration of distinct \"state\" values\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"state\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"AVG\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,exception.message,exception.type,exception.stacktrace,name,http.url,gropyus.realm,gropyus.maintained-by,type,duration_ms,service.name,http.method,status_code,library.name,gropyus.application,service.namespace,process.pid,gropyus.stage,net.transport,http.host,process.command_args,http.target,process.owner,library.version,status_message,net.host.ip,net.host.name,parent_name,net.host.port,service.version,process.command,next.bubble,span.kind,gropyus.service,http.flavor,net.peer.name,next.route,http.scheme,process.runtime.name,deployment.environment,http.user_agent,net.peer.port,process.runtime.version,http.status_code,telemetry.sdk.language,trace.parent_id,process.runtime.description,process.executable.name,span.num_events,process.executable.path,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"next.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:processor,k8s.deployment.desired,k8s.replication_controller.desired,k8s.replicaset.desired,k8s.replicationcontroller.name,service.name,k8s.container.name,k8s.namespace.phase,up,k8s.namespace.name,k8s.container.ready,service_name,k8s.node.name,container.id,k8s.pod.phase,k8s.replicaset.name,k8s.deployment.available,k8s.hpa.name,transport,net.host.name,receiver,k8s.statefulset.name,otelcol_otelsvc_k8s_pod_added,service_version,k8s.hpa.current_replicas,k8s.node.condition_ready,k8s.deployment.name,k8s.replication_controller.available,k8s.hpa.desired_replicas,k8s.replicaset.available,service.instance.id,k8s.statefulset.ready_pods,otelcol_otelsvc_k8s_pod_deleted,container.image.name,net.host.port,k8s.statefulset.current_pods,k8s.job.name,k8s.replicationcontroller.uid,k8s.job.active_pods,k8s.container.cpu_request,k8s.pod.name,k8s.hpa.max_replicas,k8s.hpa.min_replicas,k8s.statefulset.desired_pods,k8s.daemonset.ready_nodes,container.image.tag,otelcol_otelsvc_k8s_namespace_added,k8s.container.cpu_limit,k8s.daemonset.name,k8s.hpa.uid,trace.parent_id,duration_ms,http.route,name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:show me the control plane\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"k8s.namespace.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"k8s.namespace.phase\",\"op\":\"=\",\"value\":\"ControlPlane\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:connection_string,sql,database,rpc,remote_db,column_names,columns,username,schema,sheetid,source,exec.sqlite_strings_read,enable_sql,params,thread.name,service.name,x,error,thread.id,err,code,examples,db_allocs,candidates_len,errored,http.scheme,table_id,escaped,name,stats,span.kind,agg,target,span.num_links,exec.sqlite_statements,e,sheet_id,code.namespace,idl,insert,id,http.target,exec.plain_tuples_read,table,trace_id,code.lineno,http.host,bid,trace.link.trace_id,ir,duration_ms,http.route,trace.parent_id,http.status_code,query\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"query\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"query\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"query\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"query\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:connection strings\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"connection_string\"],\"calculations\":[{\"op\":\"COUNT\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:response.x-envoy-upstream-service-time,pps_http_lte_200ms,request.large-allocation,pps_http_not_5xx,request.rs-feature-poe-ab-test-1,request.bc-bj-dws248,request.olah69t81k36siexpkdknvi0hgruiect,referral_service_api_response_more_400,request.bc-bj-dws87,patched.deliveryTime,request.bc-bj-sws40,request.x-datadog-sampling-priority,Freebie.EVS.undeliverable,duration_ms,request.fastly-eevee,response.x-idempotent-retryable,http_5xx,Freebie.EVS.timeout,response.x-b3-sampled,request.fastly-abtest1,request.midas-71-85,request.x-minetilbud-cache,request.fastly-abtest6,meets-tokenization-requirements,request.priority,response.ot-tracer-sampled,request.fastly-abtest3,service.version,agent.carrier,FailFast,request.fastly-abtest2,vvs_validate_200_latency,request.x-fastab-4,response.x-b3-spanid,request.ali-hng,request.ot-tracer-sampled,request.client-expectation-failed,original.deliveryTime,request.range-not-satisfiable,successful_responses_sli,request.x-jphone-msname,request.x-snwl-timer,request.fastly-europe,request.x-litmus-second,db.sql.args.15,allocation_id,customer-id,request.fastly-restarts,service.name,request.client-request-too-large,name,db.statement,country,exception.message,trace.parent_id,parent_name,http.route,http.path,error,http.status_code,redirect_path\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: POST /change\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"=\",\"value\":\"payments-verification-service\",\"join_column\":\"\"},{\"column\":\"country\",\"op\":\"=\",\"value\":\"US\",\"join_column\":\"\"},{\"column\":\"http.path\",\"op\":\"=\",\"value\":\"/change\",\"join_column\":\"\"}],\"limit\":100,\"time_range\":7200,\"granularity\":5}\n\nNLQ: Overall activity for all web traffic\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}],\"time_range\":7200}\n\n\nNLQ:name contains Sent.hellofresh.service.customer.reward_wallet.allocation.v1beta2.AllocationService.AllocateBenefits and P95 is greater than 300 ms\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"name\",\"op\":\"contains\",\"value\":\"Sent.hellofresh.service.customer.reward_wallet.allocation.v1beta2.AllocationService.AllocateBenefits\",\"join_column\":\"\"},{\"column\":\"duration_ms\",\"op\":\">\",\"value\":300,\"join_column\":\"\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:http.target,email,http.method,http.url,http.host,span.kind,http.route,trace.span_id,http.scheme,field,name,span.num_links,display_name,component,message,authenticated_at,parent_name,error,net.host.port,api_revision,api_version,data,meta.annotation_type,status_message,service.name,id,http.server_name,customer_id,meta.signal_type,http.user_agent,allowed_scopes,telemetry.sdk.language,exception.stacktrace,request_id,user_type,http.flavor,auth_status,status_code,http.status_code,query_op,trace.parent_id,library.name,type,telemetry.instrumentation_library,csvtype,report_id,exception.message,span.num_events,telemetry.sdk.name,trace.trace_id,duration_ms,db.statement\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:All spans where the http.method is PUT or POST, the http.target contains sites, and display the email field alongside\nEXISTING QUERY:{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"email\",\"op\":\"exists\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":10000,\"time_range\":2419200,\"granularity\":10}", "completion": "{\"breakdowns\":[\"http.method\",\"http.target\",\"email\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.method\",\"op\":\"in\",\"value\":[\"PUT\",\"POST\"],\"join_column\":\"\"},{\"column\":\"http.target\",\"op\":\"contains\",\"value\":\"sites\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":2419200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,span.num_events,express.type,trace.trace_id,http.response_content_length_uncompressed,trace.span_id,http.status_text,status_code,http.status_code,http.route,process.pid,meta.signal_type,net.transport,span.kind,http.host,trace.parent_id,express.name,net.host.ip,net.host.port,http.target,telemetry.sdk.language,net.host.name,process.runtime.description,name,http.url,process.runtime.version,process.runtime.name,process.command,telemetry.sdk.name,http.flavor,process.command_line,span.num_links,type,telemetry.sdk.version,http.method,service.name,http.user_agent,net.peer.name,telemetry.instrumentation_library,net.peer.port,net.peer.ip,process.executable.name,http.scheme,library.version,library.name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:show respond time heatmap\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200,\"granularity\":0}", "completion": "{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:sli_route_latency_1500,duration_ms,queueSize,sli_route_latency,cachesize,requestID,discount,dropped,http.url,http.method,net.transport,error,orderid,http.target,rpc.method,http.route,http.request_content_length,ip,service.version,rpc.service,active_threads,success,currency,Context Keys,pending_pool,pool,name,message.type,area,http.host,host.name,thread.id,grpc.kind,service.name,runtime.jvm.memory.pool,host.arch,rpc.user_agent,rpc.system,runtime.jvm.gc.time,method,http.scheme,type,http.flavor,span.kind,itemCount,db.name,context_keys,thread.name,library.version,gc,exception.message,service_name,parent_name,trace.parent_id,http.status_code,db.statement\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,error.message,error.type,error.msg,error.cause_chain,email,target,code.lineno,latency,id,name,http.url,transaction.id,client_reference,code.namespace,type,duration_ms,provider,account.id,internal.payment.missing_in_adapter,service.name,http.method,operation,busy_ns,idle_ns,status_code,library.name,http.host,classification,invitation_id,thread.id,entity_type,thread.name,library.version,code.filepath,customer.payment.outbound.missing_in_internal,level,claim_id,parent_name,net.host.port,service.version,span.kind,organisation.id,http.scheme,sqs.outcome,internal_account.id,organisation_id,http.path,http.user_agent,http.status_code,http.route,trace.parent_id\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:container.image.name,container.image.tag,k8s.container.restarts,k8s.container.name,otelcol_otelsvc_k8s_pod_deleted,k8s.statefulset.updated_pods,otelcol_otelsvc_k8s_pod_updated,k8s.job.active_pods,k8s.job.successful_pods,container.id,k8s.container.ready,k8s.statefulset.current_pods,k8s.job.failed_pods,k8s.daemonset.misscheduled_nodes,otelcol_otelsvc_k8s_namespace_updated,otelcol_otelsvc_k8s_pod_added,k8s.cronjob.active_jobs,k8s.job.desired_successful_pods,k8s.container.memory_limit,k8s.daemonset.current_scheduled_nodes,scrape_samples_scraped,k8s.container.memory_request,k8s.statefulset.ready_pods,k8s.pod.phase,k8s.cronjob.name,k8s.deployment.desired,k8s.job.name,k8s.container.cpu_limit,otelcol_otelsvc_k8s_namespace_added,k8s.statefulset.desired_pods,k8s.replication_controller.desired,k8s.namespace.name,k8s.container.cpu_request,k8s.pod.name,k8s.deployment.available,k8s.daemonset.name,scrape_series_added,k8s.replicaset.desired,k8s.pod.uid,k8s.job.uid,k8s.namespace.phase,k8s.statefulset.name,k8s.daemonset.desired_scheduled_nodes,k8s.node.name,k8s.statefulset.uid,k8s.deployment.name,otelcol_exporter_sent_log_records,k8s.cronjob.uid,k8s.daemonset.uid,k8s.replicationcontroller.name,name,trace.parent_id,duration_ms,http.route,service_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ: Show me Container Images that were terminated with last date\nEXISTING QUERY:{\"breakdowns\":[\"container.image.name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"k8s.container.restarts\",\"op\":\"\\u003e\",\"value\":0,\"join_column\":\"\"},{\"column\":\"otelcol_otelsvc_k8s_pod_deleted\",\"op\":\"exists\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":7200,\"granularity\":0}", "completion": "{\"breakdowns\":[\"container.image.name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"k8s.container.restarts\",\"op\":\">\",\"value\":0,\"join_column\":\"\"},{\"column\":\"otelcol_otelsvc_k8s_pod_deleted\",\"op\":\"exists\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:k8s.container.cpu_request,k8s.container.cpu_limit,otelcol_process_cpu_seconds,processor,otelcol_processor_batch_batch_send_size.avg,otelcol_process_runtime_total_alloc_bytes,k8s.node.name,container.image.name,otelcol_process_memory_rss,container.id,k8s.node.uid,container.image.tag,otelcol_processor_batch_batch_send_size.count,otelcol_process_uptime,otelcol_process_runtime_total_sys_memory_bytes,k8s.daemonset.current_scheduled_nodes,net.host.name,otelcol_processor_batch_batch_send_size.p50,k8s.node.condition_ready,k8s.daemonset.ready_nodes,otelcol_process_runtime_heap_alloc_bytes,k8s.daemonset.misscheduled_nodes,otelcol_processor_batch_batch_send_size.p05,otelcol_processor_batch_batch_send_size.p001,k8s.container.ready,otelcol_processor_batch_batch_send_size.sum,k8s.container.memory_request,k8s.container.name,k8s.daemonset.desired_scheduled_nodes,net.host.port,k8s.container.memory_limit,otelcol_processor_batch_batch_send_size.min,k8s.hpa.current_replicas,otelcol_processor_batch_batch_send_size.p90,k8s.cronjob.active_jobs,service.name,otelcol_processor_dropped_metric_points,otelcol_processor_refused_metric_points,otelcol_processor_batch_batch_send_size.p75,otelcol_processor_batch_batch_send_size.p95,otelcol_processor_batch_batch_send_size.p99,otelcol_processor_batch_batch_send_size.p01,k8s.pod.phase,otelcol_processor_batch_batch_send_size.p25,up,k8s.container.restarts,k8s.job.active_pods,k8s.cronjob.name,otelcol_exporter_queue_capacity,otelcol_processor_accepted_metric_points,name,trace.parent_id,duration_ms,http.route,service_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:Container CPU Usage by Node (%)\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"k8s.node.name\"],\"calculations\":[{\"column\":\"k8s.container.cpu_request\",\"op\":\"SUM\"},{\"column\":\"k8s.container.cpu_limit\",\"op\":\"SUM\"},{\"column\":\"otelcol_process_cpu_seconds\",\"op\":\"SUM\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:sli.latency,app.user_id,ip,apdex,net.transport,error,http.user_agent,rpc.system,library.name,dc.platform-time,name,dc.error,dc.success_percent,span.kind,library.version,http.flavor,type,message.type,num_products,net.host.ip,parent_name,revenue_at_risk,duration_ms,sli_product,net.host.name,dc.error_percent,rpc.service,status_message,message.id,app.cart_total,service.name,status_code,http.target,http.host,net.peer.ip,net.host.port,http.route,span.num_links,net.peer.port,rpc.method,telemetry.instrumentation_library,ingest_timestamp,log10_duration_ms,product_availability,req_flow.checkout,dc.pct_error,k8s.pod.uid,trace.span_id,dc.k8s_deployment_metrics,trace.parent_id,http.status_code\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:users with the highest latnecy\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"app.user_id\"],\"calculations\":[{\"column\":\"latency\",\"op\":\"MAX\"}],\"orders\":[{\"column\":\"latency\",\"op\":\"MAX\",\"order\":\"descending\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:FastEnough,parent_name,error,http.route,duration_ms,http.status_code,name,db.statement,exception.message,trace.parent_id,service.name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:k8s.replicaset.desired,k8s.replication_controller.desired,k8s.namespace.phase,k8s.hpa.current_replicas,k8s.daemonset.ready_nodes,k8s.deployment.desired,k8s.pod.phase,k8s.job.active_pods,k8s.replicationcontroller.name,k8s.deployment.available,k8s.daemonset.current_scheduled_nodes,k8s.hpa.desired_replicas,k8s.daemonset.desired_scheduled_nodes,k8s.hpa.max_replicas,k8s.hpa.min_replicas,k8s.replication_controller.available,k8s.replicaset.available,k8s.statefulset.current_pods,k8s.hpa.name,otelcol_otelsvc_k8s_pod_added,processor,k8s.cronjob.active_jobs,k8s.replicaset.name,k8s.daemonset.misscheduled_nodes,k8s.namespace.name,k8s.job.max_parallel_pods,k8s.replicationcontroller.uid,k8s.node.name,k8s.statefulset.ready_pods,otelcol_otelsvc_k8s_pod_deleted,k8s.statefulset.desired_pods,k8s.cronjob.name,container.id,otelcol_otelsvc_k8s_pod_updated,otelcol_otelsvc_k8s_pod_table_size,k8s.daemonset.name,k8s.container.name,k8s.hpa.uid,k8s.job.name,k8s.statefulset.updated_pods,container.image.name,net.host.port,otelcol_otelsvc_k8s_namespace_added,k8s.deployment.name,service.name,otelcol_otelsvc_k8s_namespace_updated,k8s.replicaset.uid,net.host.name,k8s.container.cpu_limit,k8s.node.uid,duration_ms,http.route,name,trace.parent_id,service_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what's my controlplanes of cluster\nEXISTING QUERY:{\"breakdowns\":[\"k8s.pod.phase\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":7200,\"granularity\":0}", "completion": "{\"breakdowns\":[\"k8s.node.name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"k8s.namespace.phase\",\"op\":\"=\",\"value\":\"ControlPlane\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,sli_cart_checkout_errors,message.type,ip,os.type,success,area,requestID,orderid,Context Keys,host.name,name,http.url,currency,dropped,host.arch,message.id,userid,type,duration_ms,db.name,http.route,otlp.exporter.exported,service.name,context_keys,http.method,os.description,gc,status_code,pool,library.name,process.pid,active_threads,queueSize,net.transport,http.host,itemCount,rpc.system,method,thread.id,process.command_line,http.target,thread.name,db.statement,num_products,library.version,cachesize,status_message,net.host.ip,net.host.name,trace.parent_id,service_name,exception.message,parent_name,http.status_code\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:db.operation,db.name,db.user,name,error,duration_ms,process.pid,http.target,db.system,process.command_line,db.sql.table,db.statement,code.namespace,thread.name,span.num_events,host.name,thread.id,type,exception.stacktrace,parent_name,host.arch,http.route,trace.span_id,http.url,span.kind,code.function,http.method,db.connection_string,messaging.system,status_code,service.name,library.name,trace.trace_id,messaging.kafka.destination.partition,process.executable.path,process.runtime.name,os.type,process.runtime.version,net.transport,net.host.port,trace.parent_id,span.num_links,user_agent.original,honeycomb.distro.variant,library.version,http.scheme,messaging.kafka.client_id,messaging.kafka.message.offset,exception.type,os.description,http.status_code,exception.message\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:/$batch\nEXISTING QUERY:{\"calculations\":[{\"op\":\"COUNT\"}],\"limit\":100,\"time_range\":600,\"granularity\":0}", "completion": "{\"breakdowns\":[\"http.method\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"=\",\"value\":\"/$batch\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":600}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:service.name,serviceName,response.serviceName,app_name,derived.response.redirects_to_quotes_leasing,sli.website_enquiries_should_be_successful,sli.inverted.website_enquiries_should_be_successful,job.leads_service.integration,meta.local_hostname,derived.service.tribe,job.leads_service.integration_name,meta.heroku_app,library.name,os.description,app.brand_slug,name,job.source,derived.request.referrer.research_site,job.brand_slug,job.id,email.origin,sli.live_code_should_be_high_quality,request.host,app.model_slug,meta.thread_name,derived.client_to_heroku_ms,app.invalid_csrf,email.to,sli.deals_service_search_deals_should_be_fast,app.enquiry.offer_id,job.leads_service.status,call.sid,app.call.sid,email.sender_domain,sli.inverted.live_code_should_be_high_quality,sli.deals_service_requests_should_be_successful,process.name,derived.request.host.subdomain.english,derived.response.x_served_by.location,sli.inverted.iterable_request_should_be_successful\t,app.sql.query_name,request.header.x_forwarded_server,derived.string_query.make_slug,sli.deals_service_successful_requests_should_be_fast,app.error,response.header.location,telemetry.sdk.name,sli.consumer_tribe.live_code_should_avoid_bad_patterns,app.offers_count,job.feed_name,request.query_string,request.header.fastly_client_ip,country,app.error.message,app.error.class,derived.response.server_error,app.controller_action,trace.parent_id,response.status,derived.request.origin,request.queue_duration_ms,derived.dyno_and_app,error.class,event.size_bytes,job.status,event.topic,type,derived.request.queue_duration_ms_log10,job.class,duration_ms,derived.duration_ms_log10,event.name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"derived.response.server_error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"derived.response.server_error\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"derived.response.server_error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"app.controller_action\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"response.status\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"response.status\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"request.query_string\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"request.query_string\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"request.query_string\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"request.query_string\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"app.controller_action\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"serviceName\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"app.controller_action\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"app.controller_action\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"serviceName\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"serviceName\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"derived.response.server_error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"app.controller_action\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: user facing errors\nEXISTING QUERY:\n{\"breakdowns\":[\"country\",\"serviceName\",\"response.status\",\"app.controller_action\",\"app.error.class\",\"app.error.message\"],\"calculations\":[{\"op\":\"COUNT\"},{\"column\":\"request.header.fastly_client_ip\",\"op\":\"COUNT_DISTINCT\"}],\"filters\":[{\"column\":\"type\",\"op\":\"=\",\"value\":\"http_server\",\"join_column\":\"\"},{\"column\":\"derived.request.origin\",\"op\":\"=\",\"value\":\"user\",\"join_column\":\"\"},{\"column\":\"response.status\",\"op\":\"not-in\",\"value\":[200,201,202,204,301,302,303,304,401,404,422],\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200,\"granularity\":60}\n\nNLQ: top requested apps by origin\nEXISTING QUERY:\n{\"breakdowns\":[\"country\",\"serviceName\",\"derived.request.origin\"],\"calculations\":[{\"op\":\"COUNT\"},{\"column\":\"duration_ms\",\"op\":\"P99\"},{\"column\":\"request.queue_duration_ms\",\"op\":\"P99\"}],\"filters\":[{\"column\":\"type\",\"op\":\"=\",\"value\":\"http_server\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":20,\"time_range\":7200,\"granularity\":60}\n\nNLQ: slow user facing apps\nEXISTING QUERY:\n{\"breakdowns\":[\"country\",\"serviceName\"],\"calculations\":[{\"op\":\"COUNT\"},{\"column\":\"duration_ms\",\"op\":\"P99\"},{\"column\":\"request.queue_duration_ms\",\"op\":\"P99\"}],\"filters\":[{\"column\":\"type\",\"op\":\"=\",\"value\":\"http_server\",\"join_column\":\"\"},{\"column\":\"derived.request.origin\",\"op\":\"=\",\"value\":\"user\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P99\",\"order\":\"descending\"},{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":20,\"time_range\":7200,\"granularity\":60}\n\n\nNLQ:serviceName = quotes_site\nEXISTING QUERY:", "completion": "{\"filters\":[{\"column\":\"serviceName\",\"op\":\"=\",\"value\":\"quotes_site\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,exception.message,exception.type,message.type,os.type,exception.stacktrace,host.name,name,http.url,db.user,host.arch,gropyus.realm,message.id,code.namespace,gropyus.maintained-by,type,duration_ms,db.name,http.route,service.name,http.method,os.description,db.system,status_code,db.operation,library.name,gropyus.application,service.namespace,process.pid,gropyus.stage,rpc.system,az.namespace,process.command_args,thread.id,http.target,thread.name,db.statement,library.version,net.host.name,container.id,parent_name,code.function,net.host.port,service.version,rpc.method,db.connection_string,span.kind,gropyus.service,az.client_request_id,net.peer.name,http.status_code,trace.parent_id\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:k8s.container.memory_request,k8s.container.memory_limit,k8s.pod.name,k8s.pod.uid,k8s.statefulset.current_pods,k8s.statefulset.updated_pods,k8s.job.active_pods,otelcol_process_runtime_total_sys_memory_bytes,k8s.pod.phase,otelcol_process_runtime_total_alloc_bytes,otelcol_process_memory_rss,otelcol_otelsvc_k8s_pod_table_size,k8s.statefulset.ready_pods,up,otelcol_process_runtime_heap_alloc_bytes,k8s.statefulset.desired_pods,k8s.container.cpu_request,k8s.job.successful_pods,processor,k8s.job.max_parallel_pods,container.id,otelcol_otelsvc_k8s_pod_updated,k8s.container.cpu_limit,k8s.job.desired_successful_pods,otelcol_otelsvc_k8s_pod_added,otelcol_otelsvc_k8s_pod_deleted,net.host.port,k8s.job.failed_pods,k8s.node.uid,net.host.name,k8s.statefulset.uid,k8s.container.name,k8s.cronjob.active_jobs,k8s.namespace.uid,k8s.job.uid,container.image.name,otelcol_processor_batch_batch_send_size.p001,k8s.node.name,k8s.hpa.current_replicas,k8s.replicationcontroller.uid,k8s.daemonset.uid,k8s.namespace.name,k8s.hpa.uid,k8s.deployment.desired,otelcol_processor_batch_batch_send_size.avg,k8s.cronjob.uid,otelcol_processor_batch_batch_send_size.p05,k8s.container.restarts,k8s.container.ready,k8s.replication_controller.desired,duration_ms,http.route,name,trace.parent_id,service_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:My Pod Memory Usage\nEXISTING QUERY:{\"breakdowns\":[\"k8s.node.name\"],\"calculations\":[{\"column\":\"k8s.container.memory_limit\",\"op\":\"SUM\"},{\"column\":\"k8s.container.memory_request\",\"op\":\"SUM\"},{\"column\":\"otelcol_process_memory_rss\",\"op\":\"SUM\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":7200,\"granularity\":0}", "completion": "{\"breakdowns\":[\"k8s.pod.name\"],\"calculations\":[{\"column\":\"k8s.container.memory_limit\",\"op\":\"SUM\"},{\"column\":\"k8s.container.memory_request\",\"op\":\"SUM\"},{\"column\":\"otelcol_process_memory_rss\",\"op\":\"SUM\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":7200,\"granularity\":0}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,sli_route_latency_1500,requestID,sli_route_latency,runtime.jvm.gc.time,Context Keys,http.url,queueSize,Context Keys length,http.status_code,net.transport,http.request_content_length,http.host,http.route,http.method,rpc.user_agent,ip,http.user_agent,status_code,area,rpc.method,http.target,trace.trace_id,message.type,status_message,runtime.jvm.memory.pool,http.flavor,context_keys,orderid,process.pid,trace.span_id,chargeTotal,itemCount,service.version,rpc.service,span.num_events,host.name,active_threads,cachesize,net.host.ip,pool,thread.id,service.name,os.type,cart_total,method,process.runtime.description,thread.name,telemetry.sdk.name,runtime.jvm.memory.area,db.statement,service_name,error,parent_name,trace.parent_id,name,exception.message\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:Request response time heatmap\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.method\",\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.method\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:span.num_events,topic,os.type,span.kind,type,meta.signal_type,name,eaist.count,eaist.entity,eaist.isList,eaist.dto,honeycomb.distro.language,service.name,service.instance.id,parent_name,trace.parent_id,app.manual-span.message,duration_ms,eaist.is_list,service.version,meta.annotation_type,telemetry.sdk.language,os.version,trace.trace_id,os.name,status_code,trace.span_id,library.name,dtoTypesToUpdate,process.runtime.name,os.description,telemetry.sdk.name,process.runtime.version,telemetry.sdk.version,honeycomb.distro.version,span.num_links,honeycomb.distro.runtime_version,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:filter by certain event\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"span.num_events\",\"op\":\"\\u003e\",\"value\":0,\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":60,\"granularity\":1}", "completion": "{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"span.num_events\",\"op\":\">\",\"value\":0,\"join_column\":\"\"},{\"column\":\"event\",\"op\":\"=\",\"value\":\"slow_request\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":60,\"granularity\":1}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:api-key,date,scope-key,page,etag,x-powered-by,dev-key,ngrok-trace-id,last-modified,via,x-srv-trace,duration_ms,x-ratelimit-reset,x-ratelimit-remaining,conversation-query,trace.trace_id,id,x-cache,url,span.kind,number of sentences,lf,x-amz-cf-id,conversation-query-id,input-message,trace.span_id,x-srv-span,expires,pragma,text-to-convert,x-ratelimit-limit,status_message,x-amz-cf-pop,accept-ranges,candidates-with-scores,span.num_events,extra-parameters,name,status,nth-sentence-modified,vary,resolved url,location,error,server,blurb,cache-control,service.name,dot_talk_code,uri,http.status_code,query,http.route,trace.parent_id\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"query\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"query\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"query\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"query\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:Can you show me engine-start markers for the last 24 hours?\nEXISTING QUERY:{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"name\",\"op\":\"=\",\"value\":\"marker\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":28800,\"granularity\":0}", "completion": "{\"breakdowns\":[\"name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"name\",\"op\":\"=\",\"value\":\"engine-start\",\"join_column\":\"\"}],\"time_range\":86400}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:http.url,http.method,duration_ms,http.host,http.route,span.num_events,http.response_content_length_uncompressed,http.request_content_length_uncompressed,http.status_code,express.type,aws.request.id,exception.stacktrace,net.transport,user.id,rpc.method,peer[7].ipv4,db.user,http.user_agent,span.num_links,trace.trace_id,status_code,user.role,db.name,http.scheme,http.target,db.system,trace.span_id,process.pid,http.status_text,express.name,net.host.ip,http.flavor,name,net.host.port,service.name,trace.parent_id,rpc.service,status_message,http.client_ip,peer.ipv4,db.statement,native.app.version,peer[3].ipv4,parent_name,peer[2].ipv4,peer[1].ipv4,peer[5].ipv4,rpc.system,net.host.name,span.kind,service_name,exception.message,error\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:Show me number of requests grouped by http.url in the last 7 days.\nEXISTING QUERY:{\"breakdowns\":[\"http.url\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":604800,\"granularity\":0}", "completion": "{\"breakdowns\":[\"http.url\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":604800}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,exception.message,exception.type,message.type,os.type,exception.stacktrace,host.name,name,http.url,db.user,host.arch,gropyus.realm,message.id,code.namespace,gropyus.maintained-by,type,duration_ms,db.name,http.route,service.name,http.method,os.description,db.system,status_code,db.operation,library.name,gropyus.application,service.namespace,process.pid,gropyus.stage,rpc.system,az.namespace,process.command_args,thread.id,http.target,thread.name,db.statement,library.version,net.host.name,container.id,parent_name,code.function,net.host.port,service.version,rpc.method,db.connection_string,span.kind,gropyus.service,az.client_request_id,net.peer.name,trace.parent_id,http.status_code\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:topic,span.num_events,name,library.name,eaist.count,eaist.entity,os.type,service.name,type,span.kind,os.name,honeycomb.distro.language,eaist.dto,parent_name,duration_ms,app.manual-span.message,eaist.isList,os.description,service.instance.id,os.version,service.version,trace.trace_id,trace.parent_id,telemetry.sdk.language,trace.span_id,eaist.is_list,process.runtime.name,meta.annotation_type,meta.signal_type,span.num_links,telemetry.sdk.name,dtoTypesToUpdate,status_code,process.runtime.version,telemetry.sdk.version,honeycomb.distro.version,honeycomb.distro.runtime_version,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:search for events\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"span.num_events\",\"op\":\"\\u003e\",\"value\":0,\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":60,\"granularity\":1}", "completion": "{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"span.num_events\",\"op\":\">\",\"value\":0,\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"limit\":1000,\"time_range\":60,\"granularity\":1}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:service_version,k8s.replicaset.desired,processor,k8s.pod.phase,net.host.port,up,k8s.namespace.phase,k8s.replicaset.available,container.id,k8s.replicaset.name,k8s.deployment.desired,service.name,container.image.tag,k8s.deployment.available,net.host.name,receiver,k8s.replicaset.uid,scraper,service.instance.id,k8s.replication_controller.desired,otelcol_otelsvc_k8s_pod_added,service_instance_id,container.image.name,otelcol_otelsvc_k8s_pod_updated,k8s.namespace.name,k8s.hpa.max_replicas,k8s.node.name,k8s.statefulset.name,otelcol_processor_batch_batch_send_size.avg,k8s.statefulset.uid,k8s.hpa.current_replicas,otelcol_processor_batch_batch_send_size.min,k8s.hpa.desired_replicas,otelcol_otelsvc_k8s_pod_table_size,otelcol_processor_batch_batch_send_size.count,k8s.replicationcontroller.name,k8s.statefulset.current_pods,otelcol_otelsvc_k8s_pod_deleted,otelcol_otelsvc_k8s_namespace_updated,k8s.replication_controller.available,k8s.statefulset.desired_pods,otelcol_processor_batch_batch_send_size.p001,otelcol_processor_batch_batch_send_size.p90,k8s.statefulset.ready_pods,exporter,service_name,k8s.job.max_parallel_pods,otelcol_otelsvc_k8s_namespace_added,k8s.deployment.name,k8s.replicationcontroller.uid,k8s.pod.name,trace.parent_id,duration_ms,http.route,name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:cluster version\nEXISTING QUERY:{\"breakdowns\":[\"k8s.pod.name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"otelcol_otelsvc_k8s_pod_deleted\",\"op\":\"exists\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":7200,\"granularity\":0}", "completion": "{\"breakdowns\":[\"service_version\"],\"calculations\":[{\"op\":\"COUNT\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:k8s.container.cpu_request,k8s.container.cpu_limit,otelcol_process_cpu_seconds,processor,otelcol_processor_batch_batch_send_size.avg,otelcol_process_runtime_total_alloc_bytes,k8s.node.name,container.image.name,otelcol_process_memory_rss,container.id,k8s.node.uid,container.image.tag,otelcol_processor_batch_batch_send_size.count,otelcol_process_uptime,otelcol_process_runtime_total_sys_memory_bytes,k8s.daemonset.current_scheduled_nodes,net.host.name,otelcol_processor_batch_batch_send_size.p50,k8s.node.condition_ready,k8s.daemonset.ready_nodes,otelcol_process_runtime_heap_alloc_bytes,k8s.daemonset.misscheduled_nodes,otelcol_processor_batch_batch_send_size.p05,otelcol_processor_batch_batch_send_size.p001,k8s.container.ready,otelcol_processor_batch_batch_send_size.sum,k8s.container.memory_request,k8s.container.name,k8s.daemonset.desired_scheduled_nodes,net.host.port,k8s.container.memory_limit,otelcol_processor_batch_batch_send_size.min,k8s.hpa.current_replicas,otelcol_processor_batch_batch_send_size.p90,k8s.cronjob.active_jobs,service.name,otelcol_processor_dropped_metric_points,otelcol_processor_refused_metric_points,otelcol_processor_batch_batch_send_size.p75,otelcol_processor_batch_batch_send_size.p95,otelcol_processor_batch_batch_send_size.p99,otelcol_processor_batch_batch_send_size.p01,k8s.pod.phase,otelcol_processor_batch_batch_send_size.p25,up,k8s.container.restarts,k8s.job.active_pods,k8s.cronjob.name,otelcol_exporter_queue_capacity,otelcol_processor_accepted_metric_points,service_version,http.route,name,trace.parent_id,duration_ms,service_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:Container CPU Usage by Node (%)\nEXISTING QUERY:{\"breakdowns\":[\"service_version\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":7200,\"granularity\":0}", "completion": "{\"breakdowns\":[\"k8s.node.name\"],\"calculations\":[{\"column\":\"k8s.container.cpu_usage\",\"op\":\"AVG\"}],\"filters\":[{\"column\":\"k8s.container.cpu_usage\",\"op\":\"exists\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:http.route,http.url,http.method,http.scheme,http.host,net.transport,name,express.name,http.target,service.name,net.host.name,express.type,http.flavor,net.host.ip,net.host.port,library.name,parent_name,controller,http.user_agent,method,http.status_text,status_code,http.status_code,span.num_links,exception.stacktrace,net.peer.port,net.peer.ip,telemetry.sdk.name,error,library.version,trace.trace_id,duration_ms,span.kind,lib,trace.span_id,exception.message,type,meta.annotation_type,telemetry.sdk.language,meta.signal_type,status_message,exception.type,trace.parent_id,telemetry.instrumentation_library,span.num_events,telemetry.sdk.version,service_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:the name of all unique http routes\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"op\":\"COUNT_DISTINCT\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:k8s.container.memory_limit,k8s.container.memory_request,container.image.name,container.id,container.image.tag,otelcol_process_runtime_total_sys_memory_bytes,otelcol_process_memory_rss,otelcol_process_runtime_total_alloc_bytes,otelcol_process_runtime_heap_alloc_bytes,k8s.container.cpu_limit,k8s.container.cpu_request,otelcol_processor_batch_batch_send_size.count,processor,otelcol_processor_batch_batch_send_size.avg,otelcol_otelsvc_k8s_pod_table_size,otelcol_processor_batch_batch_send_size.p001,otelcol_processor_batch_batch_send_size.p50,k8s.container.name,up,k8s.container.ready,otelcol_exporter_queue_capacity,otelcol_processor_batch_batch_send_size.p05,otelcol_processor_batch_batch_send_size.p01,otelcol_processor_batch_batch_send_size.sum,k8s.container.restarts,otelcol_processor_batch_batch_send_size.p75,otelcol_processor_batch_batch_send_size.p90,otelcol_processor_batch_batch_send_size.min,otelcol_processor_batch_batch_send_size.p95,receiver,net.host.port,otelcol_processor_batch_batch_send_size.p25,otelcol_exporter_queue_size,otelcol_processor_batch_batch_send_size.max,otelcol_processor_batch_batch_send_size.p99,transport,otelcol_processor_batch_batch_send_size.p999,otelcol_processor_batch_batch_send_size.p10,otelcol_process_cpu_seconds,k8s.node.uid,k8s.deployment.available,k8s.pod.phase,k8s.deployment.desired,service.instance.id,k8s.statefulset.uid,k8s.hpa.current_replicas,k8s.pod.uid,k8s.replication_controller.available,k8s.job.active_pods,k8s.daemonset.uid,k8s.node.name,duration_ms,http.route,name,trace.parent_id,service_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:Container Memory Usage\nEXISTING QUERY:{\"breakdowns\":[\"k8s.node.name\"],\"calculations\":[{\"column\":\"k8s.container.cpu_request\",\"op\":\"SUM\"},{\"column\":\"k8s.container.cpu_limit\",\"op\":\"SUM\"},{\"column\":\"otelcol_process_cpu_seconds\",\"op\":\"SUM\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":7200,\"granularity\":0}", "completion": "{\"breakdowns\":[\"k8s.node.name\"],\"calculations\":[{\"column\":\"k8s.container.memory_limit\",\"op\":\"SUM\"},{\"column\":\"k8s.container.memory_request\",\"op\":\"SUM\"},{\"column\":\"otelcol_process_memory_rss\",\"op\":\"SUM\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":7200,\"granularity\":0}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,sli_cart_checkout_errors,message.type,ip,os.type,success,area,requestID,orderid,Context Keys,host.name,name,http.url,currency,dropped,host.arch,message.id,userid,type,duration_ms,db.name,http.route,otlp.exporter.exported,service.name,context_keys,http.method,os.description,gc,status_code,pool,library.name,process.pid,active_threads,queueSize,net.transport,http.host,itemCount,rpc.system,method,thread.id,process.command_line,http.target,thread.name,db.statement,num_products,library.version,cachesize,status_message,net.host.ip,net.host.name,exception.message,trace.parent_id,parent_name,http.status_code,service_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:what are my errors?\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,sli_api_response_time,http.url,http.method,error,http.target,elasticsearch.timed_out,http.route,elasticsearch.took,name,graphql.variables,http.host,host.name,service.name,upcs,db.system,db.user,graphql.document,http.scheme,type,http.flavor,span.kind,db.name,exception.stacktrace,library.version,todo_id,db.statement,status_code,net.host.port,exception.type,elasticsearch.target,library.name,net.peer.port,http.status_code,top_level_spans_only,status_message,http.user_agent,exception.message,exception.escaped,elasticsearch.url,elasticsearch.found,user.id,span.num_links,graphql.operation.name,net.peer.name,parent_name,elasticsearch.method,trace.trace_id,elasticsearch.params,trace.span_id,trace.parent_id\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"graphql.operation.name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"graphql.operation.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"graphql.operation.name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"graphql.operation.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"graphql.operation.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"graphql.operation.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"graphql.operation.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"graphql.operation.name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:slow requests\nEXISTING QUERY:", "completion": "{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:span.num_events,topic,name,eaist.count,eaist.entity,eaist.isList,parent_name,eaist.dto,service.name,os.description,os.type,span.kind,os.name,library.name,os.version,app.manual-span.message,duration_ms,honeycomb.distro.language,service.version,type,telemetry.sdk.language,service.instance.id,eaist.is_list,trace.parent_id,trace.trace_id,trace.span_id,span.num_links,telemetry.sdk.name,status_code,process.runtime.name,meta.annotation_type,meta.signal_type,telemetry.sdk.version,dtoTypesToUpdate,process.runtime.version,honeycomb.distro.version,honeycomb.distro.runtime_version,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:show all events\nEXISTING QUERY:", "completion": "{\"calculations\":[{\"op\":\"COUNT\"}]}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:duration_ms,sli_route_latency_1500,requestID,sli_route_latency,runtime.jvm.gc.time,Context Keys,http.url,queueSize,Context Keys length,http.status_code,net.transport,http.request_content_length,http.host,http.route,http.method,rpc.user_agent,ip,http.user_agent,status_code,area,rpc.method,http.target,trace.trace_id,message.type,status_message,runtime.jvm.memory.pool,http.flavor,context_keys,orderid,process.pid,trace.span_id,chargeTotal,itemCount,service.version,rpc.service,span.num_events,host.name,active_threads,cachesize,net.host.ip,pool,thread.id,service.name,os.type,cart_total,method,process.runtime.description,thread.name,telemetry.sdk.name,runtime.jvm.memory.area,error,trace.parent_id,name,exception.message,parent_name,db.statement,service_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service_name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service_name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:Request response time heatmap\nEXISTING QUERY:{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":1000,\"start_time\":1700686978,\"end_time\":1700715778,\"granularity\":0}", "completion": "{\"breakdowns\":[\"http.method\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:sumup.hardware.terminal.status,sumup.hardware.terminal.id,sumup.hardware.terminal.tax_rate.id,sumup.hardware.terminal.total_amount,web-dashboard-api-request-healthy,sumup.hardware.terminal.tax_amount,sumup.hardware.terminal.state,sumup.hardware.terminal.kernel_id,datastore_query_count,sumup.hardware.terminal.description,sumup.hardware.terminal.kernel_result,sumup.hardware.terminal.installments,sumup.hardware.terminal.tip_amount,meta.span_count,sumup.hardware.terminal.online_result,sumup.apigateway.endpoint.route,sumup.hardware.terminal.outcome_result,sumup.hardware.terminal.new_platform,sumup.hardware.terminal.tax_rate.rate,sumup.hardware.terminal.checkout_application,sumup.hardware.terminal.error_details,sumup.hardware.terminal.slot,sumup.hardware.terminal.hsm.command.name,refunds_count,sumup.hardware.terminal.processor_termination_state,catalog-v0-api-calls,sumup.hardware.terminal.cvm,sumup.hardware.terminal.slots_history,sumup.hardware.terminal.authorization_response_code,sumup.hardware.terminal.authorization_code,web-dashboard-request-healthy,sumup.portier.terminals.pairing.id,sumup.hardware.terminal.processing_state,sumup.hardware.terminal.slots_state,redaction.redacted.count,sumup.hardware.terminal.pass_on_fees.fee_name,sumup.portier.terminals.pairing.device.id,sumup.hardware.terminal.get_device_info_reader_response,catalog-v2-api-calls,sumup.hardware.terminal.signature,sumup.hardware.terminal.card_type,catalog-v3-api-calls,sumup.hardware.terminal.deferred_maintenance_required,sumup.hardware.terminal.reader_mode,referral_code_usage_count,sumup.hardware.terminal.pass_on_fees,sumup.hardware.terminal.card_scheme,catalog-importer-exporter-rest-api-health,sumup.hardware.terminal.is_fallback,http.resend_count,name,service.name,duration_ms,request_time,kind,error,http.status_code,reason,exception.message,parent_name,request_path,status,http.route,trace.parent_id,db.statement,namespace,message\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: Overall activity for all web traffic\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}],\"time_range\":7200}\n\nNLQ: Web traffic overview\nEXISTING QUERY:\n{\"breakdowns\":[\"request_path\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":10,\"time_range\":7200}\n\n\nNLQ:Get counts of terminal-hub which name is /api/terminals or /api/terminals/:id\nEXISTING QUERY:{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"=\",\"value\":\"terminal-hub\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"/api/terminals\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":100,\"time_range\":28800,\"granularity\":0}", "completion": "{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"=\",\"value\":\"terminal-hub\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"in\",\"value\":[\"/api/terminals\",\"/api/terminals/:id\"],\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"limit\":100,\"time_range\":28800,\"granularity\":0}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,app.event_name,app.event_id,type,span.num_events,name,app.collection,http.target,exception.type,span.kind,service.ownership,exception.stacktrace,db.name,db.system,service.name,deployment.environment,library.name,http.route,duration_ms,exception.message,messaging.system,service.version,process.command,status_message,job.enqueued_at,http.host,library.version,db.statement,meta.refinery.reason,job.created_at,parent_name,process.pid,app.subscriber_name,messaging.destination,messaging.protocol,http.method,status_code,telemetry.sdk.language,http.scheme,telemetry.instrumentation_library,process.runtime.description,job.latency_ms,messaging.operation,trace.link.trace_id,meta.signal_type,app.queued_times,span.num_links,trace.parent_id,net.peer.name,net.peer.port,http.status_code\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n{\"breakdowns\":[\"http.route\",\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}]}\n\nNLQ: by service\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n{\"breakdowns\":[\"service.name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\nNLQ: where span is client_request\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"time_range\":604800}\n{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"},{\"column\":\"name\",\"op\":\"=\",\"value\":\"client_request\",\"join_column\":\"\"}],\"time_range\":604800}\n\nNLQ: add count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"http.route\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: remove count\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"name\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}],\"filters\":[{\"column\":\"service.name\",\"op\":\"exists\",\"join_column\":\"\"}]}\n\nNLQ: add count\nEXISTING QUERY:\n{\"calculations\":[{\"op\":\"COUNT\"}]}\n\nNLQ: slow requests\nEXISTING QUERY:{\"breakdowns\":[\"name\"],\"filters\":[{\"column\":\"error\",\"op\":\"exists\",\"join_column\":\"\"}]}\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"}]}\n\n\nNLQ:events\nEXISTING QUERY:{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"app.event_name\",\"op\":\"=\",\"value\":\"Event drop\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"limit\":1000,\"time_range\":7200,\"granularity\":0}", "completion": "{\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"app.event_name\",\"op\":\"=\",\"value\":\"Event drop\",\"join_column\":\"\"}],\"filter_combination\":\"AND\",\"time_range\":7200}"}
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,sli_cart_checkout_errors,message.type,ip,os.type,success,area,requestID,orderid,Context Keys,host.name,name,http.url,currency,dropped,host.arch,message.id,userid,type,duration_ms,db.name,http.route,otlp.exporter.exported,service.name,context_keys,http.method,os.description,gc,status_code,pool,library.name,process.pid,active_threads,queueSize,net.transport,http.host,itemCount,rpc.system,method,thread.id,process.command_line,http.target,thread.name,db.statement,num_products,library.version,cachesize,status_message,net.host.ip,net.host.name,parent_name,exception.message,trace.parent_id,http.status_code,service_name\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are just op\n {\"op\": \"HEATMAP\", \"column\": \"name\"}\n],\n\"filters\":[\n // ops: =, !=, >, >=, <, <=, starts-with, does-not-start-with, exists, does-not-exist, contains, does-not-contain, in, not-in\n {\"column\": \"name\", \"op\": \"exists\"}, // exists and does-not-exist ops only have column\n {\"column\": \"name\", \"op\": \"=\", \"value\": \"something\"}\n],\n\"filter_combination\": \"AND\", // AND or OR\n\"breakdowns\":[\n // columns in COLUMNS\n \"column1\",\"column2\"\n],\n\"orders\":[\n // HEATMAP not allowed\n // Must come from breakdowns or calculations\n {\"op\": \"op_in_calculation\", \"column\": \"column_in_calculation\", \"order\": \"ascending\"},\n {\"op\": \"COUNT\", \"order\": \"descending\"}, // COUNT and CONCURRENCY have no column\n {\"column\": \"column1\", \"order\": \"descending\"},\n],\n\"havings\":[\n // HEATMAP not allowed\n {\"calculate_op\": \"op_in_calculation\", \"column\": \"name\", \"op\": \"OPNAME\", \"value\": 100},\n {\"calculate_op\": \"COUNT\", \"op\": \">\", \"value\": 10}, // COUNT and CONCURRENCY have no column\n],\n\"time_range\": 7200, // Relative time range in seconds.\n\"start_time\": 1234567890, // UNIX timestamp\n\"end_time\": 1234567890, // UNIX timestamp\n```\n\nTIPS:\nCOUNT counts events/spans. COUNT_DISTINCT counts unique values of columns.\nHEATMAP shows value distributions.\ntrace.parent_id does-not-exist shows root span of a trace. Use that to count requests and traces.\nname is a span or span event.\nparent_name is the name of a span that created a span event.\n\nWhen the user input is asking about a time range (such as \"yesterday\" or \"since last week\"),\nalways use the time_range, start_time, and end_time fields. time_range\nis relative and can be combined with either start_time or end_time but not both.\n\nModify existing query or create a new query based on NLQ. Only include the query in your response.\n\nNLQ: Exception count by exception and caller\nEXISTING QUERY:\n{\"breakdowns\":[\"exception.message\",\"parent_name\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"exception.message\",\"op\":\"exists\",\"join_column\":\"\"},{\"column\":\"parent_name\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error count\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"filters\":[{\"column\":\"error\",\"op\":\"=\",\"value\":true,\"join_column\":\"\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Error rate\nEXISTING QUERY:\n{\"breakdowns\":[\"error\"],\"calculations\":[{\"op\":\"COUNT\"}],\"orders\":[{\"op\":\"COUNT\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow requests\nEXISTING QUERY:\n{\"breakdowns\":[\"http.route\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trace.parent_id\",\"op\":\"does-not-exist\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"MAX\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Latency distribution by status code\nEXISTING QUERY:\n{\"breakdowns\":[\"http.status_code\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"http.status_code\",\"op\":\"exists\",\"join_column\":\"\"}],\"time_range\":7200}\n\nNLQ: Most time consuming db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"name\",\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"SUM\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"SUM\",\"order\":\"descending\"}],\"time_range\":7200}\n\nNLQ: Slow db queries\nEXISTING QUERY:\n{\"breakdowns\":[\"db.statement\"],\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"P95\"}],\"filters\":[{\"column\":\"db.statement\",\"op\":\"exists\",\"join_column\":\"\"}],\"orders\":[{\"column\":\"duration_ms\",\"op\":\"P95\",\"order\":\"descending\"}],\"time_range\":604800}\n\nNLQ: by endpoint and operation\nEXISTING QUERY:{\"calculations\":[{\"column\":\"duration_ms\",\"op\":\"HEATMAP\"},{\"column\":\"duration_ms\",\"op\":\"MAX\"}],\"filters\":[{\"column\":\"trac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment