feat: Add API log writer with ldx-sync integration#450
Draft
bastiandoetsch wants to merge 3 commits intomainfrom
Draft
feat: Add API log writer with ldx-sync integration#450bastiandoetsch wants to merge 3 commits intomainfrom
bastiandoetsch wants to merge 3 commits intomainfrom
Conversation
- Update ldx-sync spec to latest version (2024-10-15) - Add APILogWriter for buffered remote logging with configurable trigger levels - Implement LogSource integration for tracking integration metadata - Add comprehensive test coverage (88.3%) - Refactor conversion logic to eliminate duplication between marshalEntry and ToAPIFormat
Add performance benchmarks covering: - Basic WriteLevel operations (~77 ns/op) - WriteLevel with API triggers (~205 ns/op) - Batching logic for large payloads (~149 µs/op for 1000 entries) - Format conversion (~3 µs/op for 100 entries) - Level conversion (~1 ns/op) - Concurrent/parallel writes (~162 ns/op) - Buffer trimming under memory pressure (~62 ns/op) - JSON serialization (~140 ns/op) Results show excellent performance characteristics: - Low latency for buffering operations - Minimal memory allocations - Good concurrent write performance - Efficient batching for large volumes
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
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.
Summary
This PR adds a new API log writer that integrates with the ldx-sync API for remote logging capabilities.
Changes
Updated ldx-sync spec to latest version (2024-10-15)
LogMessage,LogSource, andCreateLogMessageJSONBodytypesAdded APILogWriter (
pkg/logging/apiLogWriter.go)Added comprehensive test coverage (
pkg/logging/apiLogWriter_test.go)Code quality improvements
Performance Benchmarks
Key Performance Characteristics:
Testing
✅ All tests pass
✅ Code passes go vet
✅ Code passes gofmt
Related