-
Notifications
You must be signed in to change notification settings - Fork 3
Add support of FTNetworkTracer #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…and tracking Adds FTNetworkTracer to enable comprehensive logging and tracking of network requests, responses, and errors for URLSession tasks. This improves debugging and observability. Also updates minimum platform versions.
This commit introduces a new test suite to verify the proper integration and functionality of FTNetworkTracer with FTAPIKit, ensuring network events are correctly logged.
Migrate FTNetworkTracer dependency from personal repository to futuredapp organization.
Extract MockAnalytics class from NetworkTracerIntegrationTests into a separate file for better organization and potential reusability across tests.
Added documentation to clarify the purpose and default implementation of the `networkTracer` property in the `URLServer` protocol.
Depend on a specific version instead of the main branch for stability.
jmarek41
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
Updates the FTNetworkTracer dependency to version 0.2.1.
Migrate workflows to use macOS 14 and 15 runners, update actions/checkout to v4, and remove redundant Xcode setup.
The project can now use a single Package.swift for both building and DocC generation by updating the tools version to 5.5.
|
Hey there, just pitching in as an original author of FTAPIKit. Ideally, FTAPIKit should not depend on FTNetworkTracer. It is strictly not necessary and adds some overhead. Instead, URLServer can hold array of "middlewares" (new protocol can be introduced for that). This allow any logging, signposting etc. to watch for any network requests and responses. What's more, |
…ware - Remove hard dependency on FTNetworkTracer package - Introduce NetworkObserver protocol with type-safe associated Context - Support array of middlewares for multiple observers - Zero overhead when no observers configured (empty array = no work) - Use RequestToken pattern for type erasure while preserving type safety Breaking change: `networkTracer: FTNetworkTracer?` replaced with `networkObservers: [any NetworkObserver]`
Explicitly document that `didReceiveResponse` is always invoked with raw data, and `didFail` is an additional callback for errors occurring after the response is received. Update tests to assert this behavior.
…observer-middleware Replace FTNetworkTracer with observer middleware
Update CI tests
SwiftLint is not pre-installed on GitHub Actions macOS runners, causing the lint step to fail with "command not found". Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use scoped disable/enable for nesting rule in EndpointPublisher - Remove unneeded synthesized initializer in URLRequestBuilder - Fix opening brace spacing in URL+MIME Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update CocoaPods from ~> 1.11 to ~> 1.14 to fix DT_TOOLCHAIN_DIR error - Bump iOS deployment target from 9.0 to 12.0 - Bump macOS deployment target from 10.10 to 10.13 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Network Tracer Integration and Platform Updates
This PR integrates
FTNetworkTracerfor enhanced network request logging and tracking, and updates the minimum supported platform versions.Key Features:
FTNetworkTracerto log and track network requests, responses, and errors withinURLServertasks (data, upload, download).FTNetworkTracerfunctionality.Platform Version Changes: