prefect
prefect copied to clipboard
Agent: Add tags to flow runs
Added an option to prefect agent start
that that would cause the agent to append tags to every flow run it runs.
Since the Orion UI currently do not show agent information, this is useful for identifying the agent running the flow in case of failures.
Example
prefect agent start -a develop-agent01
prefect agent start --add-tags develop-agent01
Checklist
- [ ] This pull request references any related issue by including "closes
<link to issue>
"- If no issue exists and your change is not a small fix, please create an issue first.
- [ ] This pull request includes tests or only affects documentation.
- [ ] This pull request includes a label categorizing the change e.g.
fix
,feature
,enhancement
Deploy Preview for prefect-orion ready!
Built without sensitive environment variables
Name | Link |
---|---|
Latest commit | 66554663c5d0b9d0916e247a4a8df72579776444 |
Latest deploy log | https://app.netlify.com/sites/prefect-orion/deploys/635baf5a8c785a00085aa81a |
Deploy Preview | https://deploy-preview-7362--prefect-orion.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
@eudyptula let me get this moving with a look from our product team cc @billpalombi @cicdw
@billpalombi / @cicdw: Any hopes that this can make the next release? Let me know if I can do anything to help out.
It is currently quite tricky to figure out on which runners the flows have been run, and thereby debugging in case of an infrastructure issue (Prefect v1 was easier in that aspect). This feature is very helpful in finding out where flows are running.
Any chance that this pull request could be prioritised?
@eudyptula thank you for this contribution.
We are currently designing a different way to address this problem. We expect to ship the change in January or February. We will share more information in our slack community as soon as we can.
Any updates on this one?
My apologies for the delay on this. We are close to a release, but don't have a definitive date yet. Most likely, we will ship it in about 2 weeks.
Hi @eudyptula - will here from the product team at prefect. Are you on prefect cloud? we're currently instrumenting workers to emit events upon submission and execution of work which I think will address this most holistically. on the UI side, we'll display those events along the flow run timeline so you can correlate infra events with execution progression.
@WillRaphaelson Not on cloud, running our own server to avoid our control systems being dependent on a 3rd party, and to avoid accidentally writing data protected under the GDPR in the logs.
All we really want is to be able to see (in the UI) which server ran which flow run. When certain things fails, there's usually more information and logs to be found if we know what agent ran the flow run.
In addition, it would also be nice to see which agents are alive and running flows - maybe even some history showing how many flows they ran simultaneously (if I'm allowed to dream a little). Would help us monitor if everything is up and okay.
Hi @eudyptula, thanks for the PR here and sorry for the back and forth. I understand that the ability to see which agent is running the flow is important. A few notes:
- Workers are the next generation of Agents, which is where we should add functionality like this moving forward.
- While tags on the flow run are one way to accomplish this, we’re investing in the events system to capture infrastructure telemetry, which for the time being is Cloud only.
- One thing im hoping will be useful here is the addition of worker logs to the flow run logs, which will print the name of the worker thats running the flow. Thats here and will be out with tomorrows release. On the topic of richer agent pages - in the next new months, we’ll have a concept of rich worker pages in the application, where you can see the runs it submitted and various healthchecks. I’d love to talk about this with you as we kick off design, which could be as soon as the next few weeks. Are you in the slack community? If so we can coordinate there to codesign.
Given all this, I think we’ll want to go ahead and close this PR for now, but happy to coordinate on future ones and thanks again.