RELEASE 1.0.1: v2 log format, source_tag-labeled metrics, lint cleanup
Wire-format and metric overhaul. Both file and UDP ingest now share one
versioned ParseLine that dispatches on the v<N>\t prefix; v1 stays
unchanged, v2 adds $bytes_sent (replacing $body_bytes_sent),
$request_length, $upstream_response_time, and $upstream_status. File
ingest gains the same versioning, and the legacy positional file format
is removed (no live deployments).
Prometheus exposition is rewritten:
- nginx_http_bytes_sent and nginx_http_request_duration_seconds gain
a source_tag label.
- nginx_http_requests_by_source_total gains status_class.
- New v2-only metrics: nginx_http_request_bytes,
nginx_http_upstream_duration_seconds,
nginx_http_upstream_requests_total{status_class}.
- Dropped nginx_http_response_body_bytes_by_source (subsumed by the
dual-labeled bytes_sent metric).
Adds 'make fixstyle' (gofmt -w) and clears all golangci-lint findings
across the repo (errcheck, S1001, ST1005, unused).
Docs in design.md FR-2/FR-8 and user-guide.md are rewritten to present
v2 as the recommended log format.
This commit is contained in:
@@ -5,7 +5,7 @@ PROTO_FILE := $(PROTO_DIR)/logtail.proto
|
||||
GEN_FILES := proto/logtailpb/logtail.pb.go proto/logtailpb/logtail_grpc.pb.go
|
||||
|
||||
NATIVE_ARCH := $(shell go env GOARCH)
|
||||
VERSION := 0.9.2
|
||||
VERSION := 1.0.1
|
||||
COMMIT_HASH := $(shell git rev-parse --short HEAD 2>/dev/null || echo unknown)
|
||||
DATE := $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
LDFLAGS := -s -w \
|
||||
@@ -28,7 +28,7 @@ GO_VERSION ?= 1.24.6
|
||||
# accepts. Older releases can't parse recent Go syntax.
|
||||
GOLANGCI_LINT_VERSION ?= 1.64.0
|
||||
|
||||
.PHONY: help all build build-amd64 build-arm64 test lint proto pkg-deb docker docker-push clean \
|
||||
.PHONY: help all build build-amd64 build-arm64 test lint fixstyle proto pkg-deb docker docker-push clean \
|
||||
install-deps install-deps-apt install-deps-go install-deps-go-tools
|
||||
|
||||
# help is the default target. Keep the list aligned with the .PHONY block above.
|
||||
@@ -40,6 +40,7 @@ help:
|
||||
@echo " build-arm64 build all four binaries for linux/arm64 into build/arm64/"
|
||||
@echo " test run 'go test ./...'"
|
||||
@echo " lint run 'golangci-lint run ./...'"
|
||||
@echo " fixstyle rewrite all .go files in place with 'gofmt -w'"
|
||||
@echo " proto regenerate proto/logtailpb/*.pb.go from proto/logtail.proto"
|
||||
@echo " pkg-deb build amd64 + arm64 .deb packages (requires dpkg-deb)"
|
||||
@echo " docker buildx --load two tags ($(IMAGE):v$(VERSION), $(IMAGE):latest) for the native arch"
|
||||
@@ -74,6 +75,11 @@ test: $(GEN_FILES)
|
||||
lint:
|
||||
golangci-lint run ./...
|
||||
|
||||
# fixstyle rewrites all tracked .go files with gofmt. Generated proto files are
|
||||
# excluded — they are regenerated from .proto via `make proto`.
|
||||
fixstyle:
|
||||
gofmt -w $(shell find . -name '*.go' -not -path './proto/logtailpb/*')
|
||||
|
||||
proto: $(GEN_FILES)
|
||||
|
||||
# protoc's go_package option places output at the go_package path (not source-relative).
|
||||
|
||||
Reference in New Issue
Block a user