Skip to content

[Core feature] Add some start time template variable for Spark log links #6328

@Tom-Newton

Description

@Tom-Newton

Motivation: Why do you think this is important?

When linking to some external logging service its very convenient if it automatically opens the correct time window. Currently this is not really possible for Spark tasks.

Goal: What should the final outcome look like, ideally?

Approximate parity with normal python tasks in terms of the template variables available for forming log links

workerLog, err := logPlugin.GetTaskLogs(tasklog.Input{
PodName: name + fmt.Sprintf("-worker-%d", workerIndex),
Namespace: namespace,
PodRFC3339StartTime: RFC3999StartTime,
PodRFC3339FinishTime: RFC3999FinishTime,
PodUnixStartTime: startTime,
PodUnixFinishTime: finishTime,
TaskExecutionID: taskExecID,
})
.

Describe alternatives you've considered

Just provide log links with a really long time window. Unfortunately this can slow down the queries on the logging tool and occasionally leads to timeouts.

Propose: Link/Inline OR Additional context

For spark tasks the log links are created by

o, err := p.GetTaskLogs(tasklog.Input{
PodName: sj.Status.DriverInfo.PodName,
Namespace: sj.Namespace,
LogName: "(Driver Logs)",
TaskExecutionID: taskExecID,
})

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    backloggedFor internal use. Reserved for contributor team workflow.enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions