Skip to content

[FEATURE] Support timestamps in Buildkite job logs for agent-stack-k8s #787

@andrewlarry

Description

@andrewlarry

Is your feature request related to a problem? Please describe.

I'm unable to get timestamps in Buildkite job logs when using the agent-stack-k8s controller. We're currently using EC2 hosted agents (which show timestamps) and experimenting with the Kubernetes stack, but the Kubernetes agents don't show timestamps in the Buildkite UI.

This makes it difficult to debug timing issues and understand when specific log events occurred during builds. The timestamps are really helpful for understanding build performance and debugging slow steps.

Describe the solution you'd like

I'd like timestamps to appear in Buildkite job logs when using agent-stack-k8s, similar to how they work with EC2 hosted agents. Ideally, this would be configurable via Helm values or environment variables.

Describe alternatives you've considered

I've tried setting BUILDKITE_AGENT_TIMESTAMP_LINES=true on the agent container via pod-spec-patch:

config:
  pod-spec-patch:
    containers:
    - name: agent
      env:
      - name: BUILDKITE_AGENT_TIMESTAMP_LINES
        value: "true"

However, timestamps still don't appear in the Buildkite UI logs. I'm open to the possibility that I'm missing something or configuring this incorrectly - if there's already a way to enable timestamps, I'd love to know!

Additional context

Comparison of logs:

Without timestamps (Kubernetes agent):

Preparing working directory
# Creating "/workspace/build/buildkite"
$ cd /workspace/build/buildkite
Pseudo-terminal will not be allocated because stdin is not a terminal.

With timestamps (EC2 hosted agent):

[2025-10-20T20:49:18Z] Preparing working directory
[2025-10-20T20:49:18Z] $ cd /var/lib/buildkite-agent/builds/all-the-things
[2025-10-20T20:49:18Z] Pseudo-terminal will not be allocated because stdin is not a terminal.

We're currently using EC2 hosted agents and experimenting with agent-stack-k8s. Having feature parity (especially for observability features like timestamps) would make the migration smoother.

  • Agent Stack Version: helm chart oci://ghcr.io/buildkite/helm/agent-stack-k8s (version 0.36.1)
  • Agent Image: buildkite/agent:latest
  • Kubernetes: EKS cluster

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions