{"id":17882196,"url":"https://github.com/mackee/go-kinesis-writer","last_synced_at":"2025-10-14T05:36:22.853Z","repository":{"id":241999574,"uuid":"798062132","full_name":"mackee/go-kinesis-writer","owner":"mackee","description":"The writer to kinesis for logger like a for uber-go/zap","archived":false,"fork":false,"pushed_at":"2024-05-09T03:04:44.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-14T05:36:19.035Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/mackee.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-09T02:45:15.000Z","updated_at":"2024-05-30T06:58:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"629bd518-3f2f-44c7-b2d0-f1c5fe5b6c34","html_url":"https://github.com/mackee/go-kinesis-writer","commit_stats":null,"previous_names":["mackee/go-kinesis-writer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mackee/go-kinesis-writer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackee%2Fgo-kinesis-writer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackee%2Fgo-kinesis-writer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackee%2Fgo-kinesis-writer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackee%2Fgo-kinesis-writer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mackee","download_url":"https://codeload.github.com/mackee/go-kinesis-writer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackee%2Fgo-kinesis-writer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018014,"owners_count":26086235,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-28T12:48:42.876Z","updated_at":"2025-10-14T05:36:22.839Z","avatar_url":"https://github.com/mackee.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-kinesis-writer\n\n[![GoDoc](https://godoc.org/github.com/mackee/go-kinesis-writer?status.svg)](https://pkg.go.dev/github.com/mackee/go-kinesis-writer)\n\ngo-kinesis-writer is a library for Go that allows output from the [uber-go/zap](https://github.com/uber-go/zap) to be sent to [Amazon Kinesis Data Streams](https://aws.amazon.com/kinesis/data-streams/). By using this library, logs generated by zap can be streamed to Amazon Kinesis Data Streams in real-time, enabling the analysis and processing of large-scale log data.\n\n## Features\n\n* Easy Configuration: Add a few lines to your existing zap configuration to start outputting logs to Kinesis Data Streams.\n* Asynchronous Transmission: Logs are sent asynchronously, ensuring that your application's performance is not hindered.\n* Batch Processing: Logs are batch processed before being transmitted to Kinesis for efficient transport.\n\n## Prerequisites\n\n* Go 1.x\n* An AWS account and configured Amazon Kinesis stream\n\n## Installation\n\n```bash\ngo get github.com/mackee/go-kinesis-writer\n```\n\n## Usage\n\n### Basic Setup\n\nThis example is use [uber-go/zap](https://github.com/uber-go/zap) as the logger. First, set up your zap logger. Then, use go-kinesis-writer to redirect zap's output to Kinesis.\n\n```go\npackage main\n\nimport (\n    \"github.com/mackee/go-kinesis-writer\"\n    \"go.uber.org/zap\"\n)\n\nfunc main() {\n    // Setting up zap logger\n    logger, _ := zap.NewProduction()\n\n    ctx := context.Background()\n    // Configuring Kinesis Writer\n    kw, err := kinesiswriter.New(ctx, \"your-kinesis-stream-arn\")\n    if err != nil {\n        logger.Fatal(\"Failed to create kinesis writer\", zap.Error(err))\n    }\n\n    // Integrating Kinesis Writer with zap\n    logger = logger.WithOptions(zap.WrapCore(func(core zapcore.Core) zapcore.Core {\n        return zapcore.NewCore(\n            zapcore.NewJSONEncoder(zap.NewProductionEncoderConfig()),\n            kw,\n            zapcore.DebugLevel,\n        )\n    }))\n\n    // Logging a test message\n    logger.Info(\"This is a test log sent to Amazon Kinesis\")\n}\n```\n\n## Contributing\n\nIf you are interested in contributing to go-kinesis-writer, please feel free to submit pull requests or issues. Before contributing, please read the contribution guidelines.\n\n## License\n\nThis project is licensed under the MIT License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmackee%2Fgo-kinesis-writer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmackee%2Fgo-kinesis-writer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmackee%2Fgo-kinesis-writer/lists"}