{"id":18344107,"url":"https://github.com/b0ch3nski/go-prom-remote-write","last_synced_at":"2025-04-09T22:24:32.803Z","repository":{"id":199131863,"uuid":"702199248","full_name":"b0ch3nski/go-prom-remote-write","owner":"b0ch3nski","description":"Bare minimum Prometheus Remote-Write client.","archived":false,"fork":false,"pushed_at":"2024-08-11T21:39:19.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-15T14:16:32.469Z","etag":null,"topics":["golang","metrics","monitoring","prometheus","remote-write","time-series"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/b0ch3nski.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":"2023-10-08T19:23:39.000Z","updated_at":"2024-08-11T21:34:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"4486201d-b701-499b-8928-b8206c7bf56e","html_url":"https://github.com/b0ch3nski/go-prom-remote-write","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"0558d879a70fecf30637b1af7be9c8f00e4b184e"},"previous_names":["b0ch3nski/go-prom-remote-write"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b0ch3nski%2Fgo-prom-remote-write","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b0ch3nski%2Fgo-prom-remote-write/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b0ch3nski%2Fgo-prom-remote-write/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b0ch3nski%2Fgo-prom-remote-write/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b0ch3nski","download_url":"https://codeload.github.com/b0ch3nski/go-prom-remote-write/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248121157,"owners_count":21051088,"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":["golang","metrics","monitoring","prometheus","remote-write","time-series"],"created_at":"2024-11-05T21:04:52.739Z","updated_at":"2025-04-09T22:24:32.774Z","avatar_url":"https://github.com/b0ch3nski.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-prom-remote-write\n[![license](https://img.shields.io/github/license/b0ch3nski/go-prom-remote-write)](LICENSE)\n[![release](https://img.shields.io/github/v/release/b0ch3nski/go-prom-remote-write)](https://github.com/b0ch3nski/go-prom-remote-write/releases)\n[![go.dev](https://pkg.go.dev/badge/github.com/b0ch3nski/go-prom-remote-write)](https://pkg.go.dev/github.com/b0ch3nski/go-prom-remote-write)\n[![goreportcard](https://goreportcard.com/badge/github.com/b0ch3nski/go-prom-remote-write)](https://goreportcard.com/report/github.com/b0ch3nski/go-prom-remote-write)\n[![issues](https://img.shields.io/github/issues/b0ch3nski/go-prom-remote-write)](https://github.com/b0ch3nski/go-prom-remote-write/issues)\n[![sourcegraph](https://sourcegraph.com/github.com/b0ch3nski/go-prom-remote-write/-/badge.svg)](https://sourcegraph.com/github.com/b0ch3nski/go-prom-remote-write)\n\nBare minimum Prometheus Remote-Write client, based on Proto files acquired from upstream [repository][repo]. \\\nAll dependencies were cut down with only `snappy` and `protobuf` remaining. \\\nData marshaling doesn't use reflection, thanks to the [vtprotobuf][vtproto] generation helper.\n\nFor a code generation procedure, see included [Makefile](Makefile).\n\nSimple client fulfills the Remote-Write [specification][spec] with couple small additions, like ability to handle\ntimeouts and Basic authentication.\n\n[repo]: https://github.com/prometheus/prometheus/tree/main/prompb\n[vtproto]: https://github.com/planetscale/vtprotobuf\n[spec]: https://prometheus.io/docs/concepts/remote_write_spec\n\n## install\n\n```\ngo get github.com/b0ch3nski/go-prom-remote-write@latest\n```\n\n## example\n\n```go\nimport \"github.com/b0ch3nski/go-prom-remote-write/promrw\"\nimport \"github.com/b0ch3nski/go-prom-remote-write/promrw/model\"\n\npromClient := promrw.\n\tNewClient(\"http://localhost:9090/api/v1/write\").\n\tWithAuthBasic(\"username\", \"password\").\n\tWithTimeout(3 * time.Second).\n\tWithHttpClient(\u0026http.Client{Transport: \u0026http.Transport{MaxConnsPerHost: 0}})\n\nseries := []*model.TimeSeries{\n\t{\n\t\tSamples: []*model.Sample{\n\t\t\t{\n\t\t\t\tValue:     321.123,\n\t\t\t\tTimestamp: time.Now().UTC().UnixMilli(),\n\t\t\t},\n\t\t},\n\t\tLabels: []*model.Label{\n\t\t\t{\n\t\t\t\tName:  \"__name__\",\n\t\t\t\tValue: \"test_metric\",\n\t\t\t},\n\t\t},\n\t},\n}\n\npromClient.Write(context.Background(), series)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb0ch3nski%2Fgo-prom-remote-write","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb0ch3nski%2Fgo-prom-remote-write","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb0ch3nski%2Fgo-prom-remote-write/lists"}