netoscope 0.2.4
netoscope: ^0.2.4 copied to clipboard
Network logger and HTTP inspector for Flutter. Logs Dio, http, GraphQL, WebSocket, SSE and gRPC traffic with an in-app inspector, secret redaction, timeline and N+1 detection.
0.2.4 #
Stronger capture-time redaction. Existing configurations keep working; more values are masked than before.
- Scoped deny-lists:
NetworkLoggerConfig.sensitiveHeaders,sensitiveQueryParametersandsensitiveBodyKeysredact a name in one context only.sensitiveKeysstill applies everywhere. - New redactions:
- URL fragments (
#access_token=…), the query parameterkey, JSON query values (GraphQLvariablesin GET requests) and JSON Web Tokens in URL paths. - JSON documents nested in string values, and multipart fields holding JSON
(such as GraphQL
operations). Bearer/Basiccredentials, JWTs and URL credentials in any header value or string value, not just under sensitive keys.- Percent-encoded form keys (
user%5Bpassword%5D=…),key: valuepairs in plain text, and URL user info and query secrets in error messages. - In unparseable or truncated JSON, the whole object or array under a sensitive key is masked, instead of only its first token.
- URL fragments (
dart:iocapture: afterstopCapturingDartIo(), newHttpClients are no longer recorded even when anHttpOverridesinstalled later still delegates to Netoscope's.- Tests: an end-to-end suite checks that secrets sent through Dio,
package:http,dart:ioand external calls reach none of the store, console, notifications, cURL, JSON/HAR exports, persisted history or the inspector. Newdart:iotests coverpackage:httpand Dio without their integrations. - README: supported
dart:ioconfigurations, lifecycle requirements and limitations, and how unparseable bodies are handled.
0.2.3 #
NetworkLoggerConfig.inspectorThemeMode(system,light,dark): force the inspector's theme instead of following the app's brightness, for example a dark inspector in a light-only app. Applies to every inspector screen. The default,system, keeps the previous behavior.- Theme switch in the inspector's settings panel (System / Light / Dark), and
Netoscope.setInspectorThemeModeto change it from code. Open inspector screens update immediately.NetoscopeSettingsgainsthemeMode.
0.2.2 #
- README: a quick start and a guide for switching from other network loggers.
- Clearer package description.
0.2.1 #
- Adds screenshots to the pub.dev listing and the README.
0.2.0 #
Multi-protocol inspection. Existing HTTP integrations and APIs keep working unchanged.
- Responsive inspector: verified from 320 pt phones to 1440 px desktops, in landscape, at 1.3× and 2× text and right-to-left. On narrow toolbars, Timeline and Statistics move into the More menu. Detail and statistics content stays within a readable 960 px column on wide screens. List rows, JSON tree keys and the timeline adapt to large text instead of overflowing.
- Event model:
NetworkLogEntrygainsprotocol,kind,direction,lifecycle,connectionId, typeddetails(ProtocolDetails) andmetadata, all optional with HTTP defaults.NetworkLogBodygains an openPayloadFormatandcontentType. - Payload pipeline:
- Content-type-first format detection with sniffing (JSON, XML, HTML, form, multipart, protobuf, text, binary).
- XML/HTML-aware redaction.
- A pluggable
PayloadDecodercontract andProtobufPayloadDecoder, which understands gRPC framing.
- GraphQL over HTTP:
- Operations, types, redacted documents and variables, persisted queries, batches and multipart uploads.
- Errors with paths and codes, and partial data.
- Transport outcome is kept separate from GraphQL execution errors.
- Server-Sent Events: recorded automatically by
httpClient(), live and without buffering.SseRecordercovers other clients. - Real-time recorders:
WebSocketRecorder(including GraphQL over WebSocket),MqttRecorder,GrpcCallRecorderand a genericConnectionRecorder. None of them add dependencies. - gRPC-Web recognized over Dio and
package:http. - Webhooks:
- Outbound delivery attempts with outcome and retryability.
- Signatures are reduced to their algorithm.
importWebhookDeliveriesimports backend delivery logs.
- Dio upload/download progress is recorded for requests that report it.
- Inspector:
- Protocol-aware rows and a filters sheet: protocol, time range, GraphQL, message direction, SSE event type and payload format.
- Search across operations, events and topics.
- A GraphQL tab and connection event views.
- Custom
PayloadViewers. - Background formatting and lazy rendering for large bodies.
- Deep inspection:
- Search syntax:
method:,status:(ranges, classes, outcomes),host:,path:,duration:,size:,protocol:,tag:,is:,op:,header:,body:and more, with negation and alternatives, plus an in-app cheat sheet. - Call tagging:
tagged()(zone-scoped, across all clients),addTag/removeTag/clearTags, and per-request Dio tags.NetworkLogEntry.tags. - Duplicate and N+1 detection:
TrafficAnalyzer,analyzeTraffic(), row badges, explanations, and group views. - Statistics dashboard:
TrafficStatisticsandstatistics(). - Gantt timeline: zoom, fit and tap to open.
- Search syntax:
- Persistence and export:
NetworkLogEntry.fromJsonandfromJsonfor every entity.NetworkLogPersistence,FileNetworkLogPersistenceandPersistentNetworkLogStore.- HAR 1.2 export (
exportHar()), and anexportHandlerhook for sharing.
- Native capture:
recordExternalCallandExternalNetworkCall.- The new
netoscope_nativeplugin (OkHttp interceptor andURLSessioncapture).
dart:iocapture:captureDartIo(),stopCapturingDartIo()andisCapturingDartIorecordHttpClientcalls (includingImage.networkand SDKs) through a chainedHttpOverrides.- Calls already recorded by the Dio or
httphooks are not doubled. - Web builds are unaffected (conditional import).
- Client compatibility: Retrofit, Chopper and
gql_http_link(used bygraphql,graphql_flutterandferry) are verified by integration tests inpackages/netoscope_integration_tests. - Runtime switches:
setLoggingEnabled,setFloatingButtonEnabled,setNotificationEnabledandupdateSettings, plussettings,settingsChangesandisRecording.- An inspector settings panel and a "Recording paused" banner.
- The switches are ignored when logging is disabled for the build.
- Activity notification:
- The
NetworkActivityNotifiercontract, withNetoscope(notifier:),attachNotifierand a throttledNetworkActivitySummary. - The companion package
netoscope_notificationsimplements it withflutter_local_notifications; tapping the notification opens the inspector.
- The
- Inspector helpers:
openInspectorOn(navigator)opens without aBuildContext, andisInspectorOpenreports whether one is showing. The floating button hides while the inspector is open. - Copy as cURL: from the detail screen or a long-press on a row. The command is built from redacted data and says when values are masked.
- Inspector redesign:
- Colored method and status pills, an outcome accent bar on each row and a summary strip.
- A header card with stats and copy actions, and card-style sections.
- Payload views: syntax-highlighted JSON, XML/HTML, GraphQL and forms with line numbers and wrap, a collapsible JSON tree, and highlighted redacted values.
- Console: verbose output is framed and pretty-printed, with optional
ANSI colors (
consoleColors). - Config:
consoleColors,payloadDecoders,detectGraphQL,webhooks,captureTransferProgressandcaptureRealtimeMessages. - Behavior changes:
signatureis now a sensitive-key fragment.- The inspector's "Failed" filter now means a failed or cancelled outcome. For HTTP calls this is unchanged.
- Exported body JSON includes
formatandcontentType.
0.1.0 #
Initial release.
Netoscopefacade withdioInterceptor,httpClient(),logs,logChanges,clearLogs(),exportJson()andopenInspector().- Dio interceptor: captures successes, HTTP errors, timeouts, connection failures and cancellations without altering requests, responses or errors.
package:httpclient wrapper that observes response streams without consuming them.- Redaction of credentials, tokens, passwords, OTPs, cookies, API keys, nested JSON fields and URL query parameters, with configurable extra keys.
- Safe capture of JSON, text, form, multipart, binary and streamed bodies, with truncation.
- Bounded in-memory history with a change stream.
- Console output via
dart:developeratnone,summaryorverboselevel. - Optional inspector with search, status/method/slow filters, detail view,
copy and JSON export, plus
NetworkInspectorButtonandNetworkInspectorOverlay. - Logging disabled by default in release builds.
