{"id":20806297,"url":"https://github.com/nodesource/ah-net","last_synced_at":"2025-03-12T03:41:26.740Z","repository":{"id":57174686,"uuid":"84423869","full_name":"nodesource/ah-net","owner":"nodesource","description":"Tracks async hook events related to network operations.","archived":false,"fork":false,"pushed_at":"2017-10-26T17:28:26.000Z","size":1219,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-18T13:28:22.539Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodesource.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-09T09:33:09.000Z","updated_at":"2021-12-23T17:16:43.000Z","dependencies_parsed_at":"2022-08-29T00:11:03.031Z","dependency_job_id":null,"html_url":"https://github.com/nodesource/ah-net","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodesource%2Fah-net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodesource%2Fah-net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodesource%2Fah-net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodesource%2Fah-net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodesource","download_url":"https://codeload.github.com/nodesource/ah-net/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243152876,"owners_count":20244657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T19:19:09.233Z","updated_at":"2025-03-12T03:41:26.724Z","avatar_url":"https://github.com/nodesource.png","language":"JavaScript","readme":"# ah-net [![build status](https://secure.travis-ci.org/nodesource/ah-net.svg?branch=master)](http://travis-ci.org/nodesource/ah-net)\n\nTracks async hook events related to network operations.\n\n## Installation\n\n    npm install ah-net\n\n## [API](https://nodesource.github.io/ah-net)\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n### NetworkActivityCollector\n\nInstantiates a NetworkActivityCollector.\n\nMost of the actual processing of resources is performed by th @see\nNetworkResourceProcessor.\n\nExtends [ActivityCollector](https://github.com/nodesource/ah-collector) and thus\nexposes the same [public\nAPI](https://github.com/nodesource/ah-collector#api) with added\nfunctionality.\n\n**Parameters**\n\n-   `$0.start` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)\u003e** the start time of the process, i.e. the result of `process.hrtime()`\n-   `$0.stackCapturer` **StackCapturer?** [see ah-stack-capturer](https://github.com/nodesource/ah-stack-capturer) which\n    configures how and when stacks traces are captured and processed.By default a StackCapturer is used that captures stacks for all events for\n    file system related types: `FSREQWRAP`, `FSREQUESTWRAP` and some others like\n    `TickObject`s that also are related, i.e. if they contain information related\n    to streams. (optional, default `StackCapturer`)\n-   `$0.bufferLength` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** determines how many elements of Buffers are\n    captured. By default not Buffer data is captured. (optional, default `0`)\n-   `$0.stringLength` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** determines how much of each string is\n    captured. By default no string data is captured. (optional, default `0`)\n-   `$0.captureArguments` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** if `true` arguments of callbacks\n    are captured when they are processed. (optional, default `false`)\n-   `$0.captureSource` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** if `true` the source code of callbacks\n    is captured when they are processed. (optional, default `false`)\n\n### NetworkResourceProcessor\n\n**Extends ResourceProcessor**\n\nThe Network processor grabs information off the network socket itself,\nthe server if present.\n\nIn the case of an http request the HTTPPARSR resource is present.\nIt has a lot of useful properties attached to it, including incoming and\noutgoing http messages.\n\nBelow is a condensed outline of the HTTPARSER properties that are most relevant:\n\n```js\n{\n   socket: {\n     _httpMessage {\n           _header\n         , statusMessage\n         , statusCode\n         , _headerSent\n         , finished\n           ...\n      }\n    , _handle: { fd, reading, _parent }\n    , server: { _connectionKey }\n  }\n , incoming {\n     httpVersion*\n   , headers: { host, connection }\n   , upgrade\n   , url\n   , method\n   , statusCode\n   , statusMessage\n  }\n}\n```\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodesource%2Fah-net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodesource%2Fah-net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodesource%2Fah-net/lists"}