{"id":13651431,"url":"https://github.com/opencensus-beam/opencensus-prometheus","last_synced_at":"2026-04-10T10:02:32.145Z","repository":{"id":57545011,"uuid":"105520828","full_name":"opencensus-beam/opencensus-prometheus","owner":"opencensus-beam","description":"Export opencensus span metrics and statistics to Prometheus","archived":false,"fork":false,"pushed_at":"2019-01-15T15:31:37.000Z","size":46,"stargazers_count":18,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-02T10:02:53.558Z","etag":null,"topics":["erlang","metrics","opencensus","prometheus"],"latest_commit_sha":null,"homepage":"","language":"Erlang","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/opencensus-beam.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-10-02T10:04:19.000Z","updated_at":"2024-10-27T03:44:21.000Z","dependencies_parsed_at":"2022-08-27T05:21:39.381Z","dependency_job_id":null,"html_url":"https://github.com/opencensus-beam/opencensus-prometheus","commit_stats":null,"previous_names":["deadtrickster/opencensus-erlang-prometheus","opencensus-beam/prometheus"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/opencensus-beam/opencensus-prometheus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencensus-beam%2Fopencensus-prometheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencensus-beam%2Fopencensus-prometheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencensus-beam%2Fopencensus-prometheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencensus-beam%2Fopencensus-prometheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencensus-beam","download_url":"https://codeload.github.com/opencensus-beam/opencensus-prometheus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencensus-beam%2Fopencensus-prometheus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31637748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"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":["erlang","metrics","opencensus","prometheus"],"created_at":"2024-08-02T02:00:49.400Z","updated_at":"2026-04-10T10:02:32.128Z","avatar_url":"https://github.com/opencensus-beam.png","language":"Erlang","funding_links":[],"categories":["Tracing"],"sub_categories":[],"readme":"\n\n# Opencensus Prometheus integration for Erlang/BEAM #\n\nCopyright (c) 2018 Ilya Khaprov \u003c\u003ci.khaprov@gmail.com\u003e\u003e.\n\n__Version:__ 0.3.1\n\n[![Hex.pm][Hex badge]][Hex link]\n[![Hex.pm Downloads][Hex downloads badge]][Hex link]\n[![Build Status][Travis badge]][Travis link]\n[![Coverage Status][Coveralls badge]][Coveralls link]\n\n\u003e [Opencensus][Opencensus Erlang link]: Erlang stats collection and distributed tracing framework.\n\n\u003e [Prometheus.io][Prometheus Erlang link]: monitoring system and time series database client in Erlang.\n\n## Using\n\nOpencensus has trace and stats packages, trace package if for distributed tracing and\nstats package is for backend-agnostic metrics collection.\n\nThis library implements a trace `reporter` for exporting spans duration as prometheus metrics and\na stats `exporter` for exporting metrics collected using Opencensus.\n\nExample configuration:\n\n```erlang\n\n{opencensus, [\n        {reporter, {oc_reporter_sequential, [\n          {oc_reporter_zipkin, [\n            {url, \"http://localhost:9411\"},\n            {service_name, \"service_name\"}\n          ]},\n          {oc_prometheus_reporter, [{type, histogram}, %% metric type\n                                    {name, span_histogram_seconds}, %% metric name, note the time unit\n                                    {buckets, [0, 1, 2]}]} %% histogram buckets with bounds in the time unit\n        ]}},\n        {sampler, {oc_sampler_probability, [\n            {probability, 0.001} %% one in a thousand\n        ]}}\n    ]}\n\n```\n\nSince Prometheus uses push model you don't need to set up Opencensus stats exporter as usual.\nInstead, this library provides `oc_stat_exporter_prometheus` which implements Prometheus collector interface.\n\n```erlang\n\n  prometheus_registry:register_collector(oc_stat_exporter_prometheus)\n\n```\n\n## Other Prometheus and Opencensus Links\n\n## Opencensus\n\n- [Cowboy 2 Integration](https://github.com/deadtrickster/opencensus-cowboy)\n- [Google Cloud Trace](https://github.com/tsloughter/oc_google_reporter)\n\n### Prometheus\n\n- [Cowboy1/2 Exporters and Cowboy2 instrumenter](https://hex.pm/packages/prometheus_cowboy)\n- [Ecto Instrumenter](https://hex.pm/packages/prometheus_ecto)\n- [Elixir client](https://github.com/deadtrickster/prometheus.ex)\n- [Elixir plugs Instrumenters and Exporter](https://hex.pm/packages/prometheus_plugs)\n- [Extatus - App to report metrics to Prometheus from Elixir GenServers](https://github.com/gmtprime/extatus)\n- [Fuse plugin](https://github.com/jlouis/fuse#fuse_stats_prometheus)\n- [Inets HTTPD Exporter](https://github.com/deadtrickster/prometheus_httpd)\n- [OS process info Collector](https://hex.pm/packages/prometheus_process_collector) (linux, freebsd, macos)\n- [Phoenix Instrumenter](https://hex.pm/packages/prometheus_phoenix)\n- [RabbitMQ Exporter](https://github.com/deadtrickster/prometheus_rabbitmq_exporter).\n\n## Contributing\n\nSection order:\n\n- Types\n- Macros\n- Callbacks\n- Public API\n- Deprecations\n- Private Parts\n\nInstall the `git` pre-commit hook:\n\n```bash\n\n./bin/pre-commit.sh install\n\n```\n\nThe pre-commit check can be skipped by passing `--no-verify` to `git commit`.\n\n## License\n\nMIT\n\n[Hex badge]: https://img.shields.io/hexpm/v/opencensus_erlang_prometheus.svg?maxAge=2592000?style=plastic\n[Hex link]: https://hex.pm/packages/opencensus_erlang_prometheus\n[Hex downloads badge]: https://img.shields.io/hexpm/dt/opencensus_erlang_prometheus.svg?maxAge=2592000\n[Travis badge]: https://travis-ci.org/deadtrickster/opencensus_erlang_prometheus.svg?branch=version-3\n[Travis link]: https://travis-ci.org/deadtrickster/opencensus_erlang_prometheus\n[Coveralls badge]: https://coveralls.io/repos/github/deadtrickster/opencensus_erlang_prometheus/badge.svg?branch=master\n[Coveralls link]: https://coveralls.io/github/deadtrickster/opencensus_erlang_prometheus?branch=master\n[Opencensus Erlang link]: https://github.com/census-instrumentation/opencensus-erlang\n[Prometheus Erlang link]: https://github.com/deadtrickster/prometheus.erl\n\n\n## Modules ##\n\n\n\u003ctable width=\"100%\" border=\"0\" summary=\"list of modules\"\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ca href=\"https://github.com/deadtrickster/opencensus-erlang-prometheus/blob/master/doc/oc_reporter_prometheus.md\" class=\"module\"\u003eoc_reporter_prometheus\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ca href=\"https://github.com/deadtrickster/opencensus-erlang-prometheus/blob/master/doc/oc_stat_exporter_prometheus.md\" class=\"module\"\u003eoc_stat_exporter_prometheus\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencensus-beam%2Fopencensus-prometheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencensus-beam%2Fopencensus-prometheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencensus-beam%2Fopencensus-prometheus/lists"}