Skip to content

feature: flightrecorder to enable Go trace#2985

Open
szuecs wants to merge 3 commits intomasterfrom
feature/flight-recorder
Open

feature: flightrecorder to enable Go trace#2985
szuecs wants to merge 3 commits intomasterfrom
feature/flight-recorder

Conversation

@szuecs
Copy link
Copy Markdown
Member

@szuecs szuecs commented Mar 14, 2024

feature: flightrecorder to enable Go trace

2025: https://go.dev/blog/flight-recorder
FlightRecorder got a bit more attraction from Go team, so I think we should be able to integrate this.

stdlib package https://pkg.go.dev/runtime/trace#FlightRecorder

Ideas from discussion

  • enable flightrecorder by filter
  • write to http endpoint PUT (think of cluster local service that collects the trace and make it available or S3)
  • test: separate client and server similar to stdlib to benchmark overhead only in proxy

@szuecs szuecs force-pushed the feature/flight-recorder branch from 74b6d67 to e9d5125 Compare March 19, 2024 17:30
@szuecs szuecs force-pushed the feature/flight-recorder branch 2 times, most recently from b23465b to c42035a Compare March 20, 2024 18:56
@szuecs

This comment was marked as resolved.

@szuecs szuecs force-pushed the feature/flight-recorder branch from f7e2831 to b9d62b2 Compare April 16, 2024 11:20
@szuecs szuecs force-pushed the feature/flight-recorder branch 4 times, most recently from 0498acc to baa60cf Compare July 1, 2024 13:54
@szuecs szuecs marked this pull request as ready for review July 1, 2024 15:03
@szuecs szuecs added the minor no risk changes, for example new filters label Jul 1, 2024
@szuecs szuecs force-pushed the feature/flight-recorder branch 2 times, most recently from b073f6c to fadd0fe Compare September 6, 2024 11:00
@szuecs szuecs force-pushed the feature/flight-recorder branch 2 times, most recently from 98f84bc to 904c64c Compare September 10, 2024 15:20
p.FlightRecorder.Stop()
p.FlightRecorder = nil
} else {
go func() {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forever runs and tries to be an efficient way of handling multiple goroutines fire "we are slow" and write only once in an hour trace data to check.

@szuecs szuecs force-pushed the feature/flight-recorder branch 4 times, most recently from 22c3e06 to 40a3067 Compare September 10, 2024 21:33
@szuecs szuecs force-pushed the feature/flight-recorder branch 2 times, most recently from d879db9 to e39547f Compare October 15, 2025 09:04
@szuecs szuecs added major moderate risk, for example new API, small filter changes that have no risk like refactoring or logs and removed minor no risk changes, for example new filters labels Oct 15, 2025
@szuecs szuecs force-pushed the feature/flight-recorder branch 2 times, most recently from d65aa82 to bf08980 Compare October 15, 2025 20:47
@szuecs szuecs force-pushed the feature/flight-recorder branch from bf08980 to 7a67eb8 Compare March 26, 2026 20:16
@szuecs szuecs force-pushed the feature/flight-recorder branch from 7a67eb8 to 935a845 Compare March 26, 2026 20:36
config: allow configuration for Go runtime/trace.FlightRecorder pass default period to define what means skipper to be slow
config: set defaults to 100ms is slow and max 16MB trace file size

Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
@szuecs szuecs force-pushed the feature/flight-recorder branch from 935a845 to ffc83f5 Compare March 26, 2026 20:46
…test output

Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
@ponimas
Copy link
Copy Markdown
Member

ponimas commented Mar 27, 2026

👍

Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement major moderate risk, for example new API, small filter changes that have no risk like refactoring or logs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants