Repository navigation
feat: traffic of each site and each site's own files (contract v0.6.0) - #53
Merged
Merged
Conversation
…files (contract v0.6.0) - traffic: the bytes the front proxy sent for each site name since the sample before, read from ~/.fly/nginx/logs/traffic.log; null without the file. - The first read starts at the end; the offset is saved before the sample is buffered; a new or cut file is read from the start; a file past 64 MiB is cut once read; at most 1000 names. - sites[].files_bytes: the app folder of each project, from the same disk walk. For flywp/flywp-internal-tasks#91 and #92. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AMtTQGy4K62exCWTJQCTdG
…file - O_NOFOLLOW and a regular file only: a link in its place must not make the agent cut another file. - The inode comes from the open file, and the cut is of the open file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AMtTQGy4K62exCWTJQCTdG
…s never re-created for it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AMtTQGy4K62exCWTJQCTdG
itsrafsanjani
marked this pull request as ready for review
October 19, 2026 09:53
setup-go now installs Go 1.27.2, and golangci-lint v2.13.2 cannot read its export data: the typecheck of the standard library fails, so make check stops at lint.
…inode only Linux can give a new file the inode of one that was just deleted. The reader then went on from the old offset, in the middle of a line, and a line cut there can name another site. CI failed on it: TestTrafficReadsANewOrCutFileFromTheStart.
Contributor
|
CI fixes
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
White Label bandwidth and disk for each customer (flywp/flywp-internal-tasks#91, #92). Contract v0.6.0.
What changes
~/.fly/nginx/vhost/flywp-traffic.log($server_name $bytes_sent), from a saved offset. Each sample getstraffic: [{host, bytes}].O_NOFOLLOWand must be a regular file. The agent cuts the open file once it read it and it is larger than 64 MiB.sites[].files_bytesis the site'sappfolder only, from the same disk walk. Thedisk_bytesfigure does not change.Tested
make check: lint 0 issues, all tests pass, on macOS and on Linux (Go 1.27.2). golangci-lint goes to v2.15.0: v2.13.2 cannot read the export data of Go 1.27.2. New tests ininternal/metrics/traffic_test.go.Release
v0.3.0or newer (WHITE_LABEL_TRAFFIC_AGENT_VERSION). For another version number, set that env on FlyWP.🤖 Generated with Claude Code