#3091 [Core feature] Break down the time spent in SDK/user code
Issue created by
eapolinario
### Motivation: Why do you think this is important?
Users should have access to a breakdown of total time spent during a task execution. This breakdown should show the time spent in SDK activities (e.g. download inputs from blob storage, writing inputs to blob storage) and user code.
### Goal: What should the final outcome look like, ideally?
Ideally users would get granular metrics exposed in a variety of interfaces, including flyteconsole's timeline view.
Also, this system should expose a hook so that users are able to instrument their code using opentelemetry's constructs.
### Describe alternatives you've considered
It's rather difficult to instrument user code now. One alternative is to generate flamegraphs and return them as the output of a particular task, but there's no general facility to plug that in across all tasks in an execution.
### Propose: Link/Inline OR Additional context
This could start as simple as having an option to produce a flamegraph per python task.
Eventually we could think of working on an instrumentation framekwork in flytekit to help users trace their task+workflow executions.
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flyte