Hi, I am looking to get all logs for a specific task run, not just the flow run. Any help would be great, bit stuck.
k
Kevin Kho
01/21/2022, 8:29 PM
Wouldn’t it be like this:
Copy code
query{
task_run {
id
logs {
id
message
timestamp
}
}
}
and then specify your task_run id? or am i missing something?
m
Matthew Millendorf
01/24/2022, 12:33 AM
I see, apologies. I am now using the correct query but I am finding the logs are turning up empty, despite there being logs for the TaskRun on the UI. Any ideas? For several flow run IDs, I get all the TaskRuns back but again, no logs.
This is my query:
Copy code
{
task_run(where: {flow_run_id: {_eq: '<flow_run_id>'}}) {
id
logs {
id
}
}
}
Matthew Millendorf
01/24/2022, 1:22 AM
have also tried:
Copy code
{
log(where :{task_run_id: {_eq:"<task_run_id>"}}) {
id
}
}
{
log(where :{flow_run_id: {_eq:"<flow_run_id>"}}) {
id
}
}
The query to populate a FlowRunView logs works, and am trying to modify it to work with the TaskRun ID
k
Kevin Kho
01/24/2022, 1:32 AM
Ah gotcha, you are right. will check with the team tomorrow
Kevin Kho
01/24/2022, 1:35 AM
Maybe the
task_run_by_pk
endpoint will be better. Try this
Copy code
query{
task_run_by_pk(id: "5bcadf0c-e5c1-42c8-b468-48c7c927712e") {
id
flow_run_id
start_time
state
logs(
order_by: { timestamp: desc }
) {
id
level
message
name
timestamp
}
}
}
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.