{"id":23292787,"url":"https://github.com/apitraffic/apitraffic-fastify","last_synced_at":"2026-02-09T13:33:38.522Z","repository":{"id":232901637,"uuid":"780145737","full_name":"apitraffic/apitraffic-fastify","owner":"apitraffic","description":"The official ApiTraffic plugin for Fastify. Add ApiTraffic to Fastify applications to seamlessly integrate with over 240 external systems and add API request monitoring for analytical purposes.","archived":false,"fork":false,"pushed_at":"2024-12-12T10:19:13.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-17T18:46:03.557Z","etag":null,"topics":["api","api-monitoring","api-observability","apitraffic","backend","developer-tool","fastify","nodejs","rest-api","workflow"],"latest_commit_sha":null,"homepage":"https://apitraffic.io","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/apitraffic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-31T20:25:34.000Z","updated_at":"2024-12-12T10:19:17.000Z","dependencies_parsed_at":"2024-04-12T06:29:59.138Z","dependency_job_id":"28155fe7-609f-4b4c-acbc-19fd618fd967","html_url":"https://github.com/apitraffic/apitraffic-fastify","commit_stats":null,"previous_names":["apitraffic/apitraffic-fastify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/apitraffic/apitraffic-fastify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apitraffic%2Fapitraffic-fastify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apitraffic%2Fapitraffic-fastify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apitraffic%2Fapitraffic-fastify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apitraffic%2Fapitraffic-fastify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apitraffic","download_url":"https://codeload.github.com/apitraffic/apitraffic-fastify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apitraffic%2Fapitraffic-fastify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29267006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T12:53:16.161Z","status":"ssl_error","status_checked_at":"2026-02-09T12:52:30.244Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api","api-monitoring","api-observability","apitraffic","backend","developer-tool","fastify","nodejs","rest-api","workflow"],"created_at":"2024-12-20T06:12:03.664Z","updated_at":"2026-02-09T13:33:38.506Z","avatar_url":"https://github.com/apitraffic.png","language":"JavaScript","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://app.apitraffic.io/assets/images/apitraffic-logo.svg\" height=\"75\"/\u003e\n  \u003cbr/\u003e\n  \u003cbr/\u003e\n  \u003cimg src=\"https://cdn.apitraffic.io/images/RepositoryMasthead.png\"/\u003e\n  \u003cbr/\u003e\n  \u003cbr/\u003e\n\u003c/div\u003e\n\u003chr /\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://apitraffic.io\" target=\"_blank\" style=\"color: #59BB7A;\"\u003eWebsite\u003c/a\u003e\n    \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n    \u003ca href=\"https://docs.apitraffic.io\" target=\"_blank\" style=\"color: #59BB7A;\"\u003eDocs\u003c/a\u003e\n    \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n    \u003ca href=\"https://github.com/apitraffic/apitraffic-fastify/tree/master/examples/basic\" target=\"_blank\" style=\"color: #59BB7A;\"\u003eSample Application\u003c/a\u003e\n    \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e    \n    \u003ca href=\"https://x.com/apitraffic\" target=\"_blank\" style=\"color: #59BB7A;\"\u003eX\u003c/a\u003e\n    \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e    \n    \u003ca href=\"https://apitraffic.io/chat\" target=\"_blank\" style=\"color: #59BB7A;\"\u003eDiscord\u003c/a\u003e\n\u003c/div\u003e\n\u003chr /\u003e\n\u003cbr/\u003e\n\nApiTraffic helps engineering teams save development time so they can ship features faster. \n\n## Features\n\n* \u003ca href=\"https://www.apitraffic.io/observability-and-logging\" target=\"_blank\" style=\"color: #59BB7A;\"\u003eAPI Monitoring \u0026 Observablity\u003c/a\u003e\n* \u003ca href=\"https://www.apitraffic.io/workflow-engine\" target=\"_blank\" style=\"color: #59BB7A;\"\u003eAPI Integrations (Workflow Engine)\u003c/a\u003e\n* \u003ca href=\"https://www.apitraffic.io/integrations\" target=\"_blank\" style=\"color: #59BB7A;\"\u003eSupported Integrations\u003c/a\u003e\n\n## How ApiTraffic Works\n\nOnce you’ve integrated the ApiTraffic SDK into your application, each request/response will be sent to the ApiTraffic, processed, and will then appear within your desired bucket. \n\nFrom within your ApiTraffic account you will see real-time requests to your API, API analytics, the load size of the response, etc.\n\n\u003e Visit \u003ca href=\"https://docs.apitraffic.io\" target=\"_blank\" style=\"color: #59BB7A;\"\u003eour knowledgebase\u003c/a\u003e for the complete documentation.\n\n## Security\n\n### Redacting Data\nData can be redacted either before it leaves your server or once it arrives to ApiTraffic for processing. Data redaction settings do not require any code changes as all configuration is done within your ApiTraffic account and pushed down to each connected server.\n\n\u003ca href=\"https://docs.apitraffic.io/en/articles/10146595-redactions\" target=\"_blank\" style=\"color: #59BB7A;\"\u003eLearn more\u003c/a\u003e about redacting data. \n\n### Request Exclusions\nExclusions can be configured in cases where certain endpoints should not be logged. Like data redactions (above), no integration specific changes are required to exclude request that match a certain criteria. \n\n\u003ca href=\"https://docs.apitraffic.io/en/articles/10146597-exclusions\" target=\"_blank\" style=\"color: #59BB7A;\"\u003eLearn more\u003c/a\u003e about excluding requests. \n\n\n## Get Started\n\n1. Sign in to \u003ca href=\"https://app.apitraffic.io\" target=\"_blank\" style=\"color: #59BB7A;\"\u003eApiTraffic\u003c/a\u003e.\n2. \u003ca href=\"#install-the-SDK\" target=\"_blank\" style=\"color: #59BB7A;\"\u003eSetup the SDK\u003c/a\u003e for your application.\n\n### Install the SDK\n\n```sh\nnpm i @apitraffic/fastify --save\n```\n\n\u003e **IMPORTANT**: Node 18+ required.\n\n### Add Code To Application\n```js\nconst apiTraffic = require('@apitraffic/fastify');\n\n// register middleware...\nfastify.register(apiTraffic);\n```\n\n### Configuration\n\nThere are a two different methods for configuring the ApiTraffic SDK:\n1. Parameters passed into the `apiTraffic.middleware()` function\n2. Setting values as environment variables\n\nThese methods are not mutually exclusive, if for whatever reason you need to set some as parameters and some as environment variables, it is ok they can be mixed.\n\n\u003e If the same variable is set in both places, the parameters that are passed in will always supersede the environment variables. \n\n#### Options\n\n| Function Param  | Environment Variable | Required | Type | Details |\n|---|---|:---:|---|---|\n| token  | API_TRAFFIC_TOKEN  | Yes  |  String  |  Ingest token provided from your ApiTraffic account.  |\n| bucket  | API_TRAFFIC_BUCKET  | Yes  | String   | The bucket the data should be sent to when ingested.  |\n| interceptOutbound  | API_TRAFFIC_INTERCEPT_OUTBOUND  | No  |  Boolean  |  If outbound requests should be intercepted. (Default: true)  |\n| debug  | API_TRAFFIC_DEBUG  | No  |  String  |  Flag that toggles if the debug output should be added to the console. (Default: true)  |\n\n## Tagging \u0026 Tracing\nAdditional context can be added to requests via the `tag()` and `trace()` functions provided by the ApiTraffic SDK.\n\n\u003cimg src=\"https://cdn.prod.website-files.com/67308d108b18f8780bb38832/6732606f1b4f9d6c39888769_Tagging%20and%20Tracing.png\" width=\"500\"/\u003e\n\n### Tagging\nTagging allows requests to be searchable by any number of tags that have been added to requests. For example, requests can be tagged by account or user ids which would then allow your team to view all API reqeusts for a specific account/person. There is no limit to the number of tags that can be added.\n\n```\n// include this in any file that needs tagging capabilities.\nconst apiTraffic = require('@apitraffic/fastify');\n\n// use the tag function.\napiTraffic.tag(\"key\", \"value\");\n```\n\n### Traces \nIt's console.log for production! Traces can easily be added to identify a specific code path or if data needs to be surfaced to help troubleshooting efforts.\n\n```\n// include this in any file that needs tracing capabilities.\nconst apiTraffic = require('@apitraffic/fastify');\n\n// use the trace function.\napiTraffic.trace(\"Whatever value that needs to be traced.\");\n```\n\n## Sample Application\n\nA working sample has been provided in this repository. [View the README](https://github.com/apitraffic/apitraffic-fastify/tree/master/examples/basic) for the sample application for details on how to run it.\n\n## Community\n\nTo get started: Star \u0026 watch [this repository](https://github.com/apitraffic/apitraffic-fastify) to stay updated on the latest changes.\n\nFollow us on our [Blog](https://apitraffic.io.blog) and on [X](https://x.com/apitraffic).\n\nChat with the ApiTraffic team and other memebers on [Discord](https://apitraffic.com/chat) and follow our tutorials and other videos on [YouTube](https://www.youtube.com/@ApiTraffic).\n\n[![ApiTraffic Discord](https://img.shields.io/badge/ApiTraffic%20Discord-Join%20our%20Discord-F3F5FC?labelColor=7289DA\u0026style=for-the-badge\u0026logo=discord\u0026logoColor=F3F5FC\u0026link=https://apitraffic.io/chat)](https://apitraffic.io/chat)\n\n[![ApiTraffic YouTube](https://img.shields.io/badge/ApiTraffic%20YouTube-Subscribe%20on%20YouTube-F3F5FC?labelColor=c4302b\u0026style=for-the-badge\u0026logo=YouTube\u0026logoColor=F3F5FC\u0026link=https://youtube.com/@apitraffic)](https://youtube.com/@apitraffic)\n\n[![ApiTraffic on X](https://img.shields.io/badge/ApiTraffic%20on%20X-Follow%20Us-F3F5FC?labelColor=000000\u0026style=for-the-badge\u0026logo=X\u0026logoColor=F3F5FC\u0026link=https://twitter.com/apitraffic)](https://x.com/apitraffic)\n\n### How to contribute\n\nHere are some ways you can help improve ApiTraffic:\n\n- Give [ApiTraffic a try](https://docs.apitraffic.io) and share your feedback to help make ApiTraffic even better for you. Feel free to reach out to us on [Discord](https://apitraffic.com/chat)!\n- Join our [Discord](https://apitraffic.com/chat) to connect with other members, share your experiences, and learn from one another.\n- Submit a pull request to any of our [open source repositories](https://github.com/apitraffic). Be sure to review the contribution guide in the repository for detailed instructions on how to get started. We’re excited to see your contributions!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapitraffic%2Fapitraffic-fastify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapitraffic%2Fapitraffic-fastify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapitraffic%2Fapitraffic-fastify/lists"}