{"id":38508318,"url":"https://github.com/lincc-frameworks/metric-emitter","last_synced_at":"2026-01-17T06:18:17.361Z","repository":{"id":177319279,"uuid":"656418479","full_name":"lincc-frameworks/metric-emitter","owner":"lincc-frameworks","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-03T22:34:43.000Z","size":29,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2023-11-03T23:26:56.375Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/lincc-frameworks.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}},"created_at":"2023-06-20T23:26:04.000Z","updated_at":"2023-06-20T23:27:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"4812029f-4efb-4bfe-a4f0-10ed1ccf6edc","html_url":"https://github.com/lincc-frameworks/metric-emitter","commit_stats":null,"previous_names":["lincc-frameworks/metric-emitter"],"tags_count":3,"template":null,"template_full_name":null,"purl":"pkg:github/lincc-frameworks/metric-emitter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lincc-frameworks%2Fmetric-emitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lincc-frameworks%2Fmetric-emitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lincc-frameworks%2Fmetric-emitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lincc-frameworks%2Fmetric-emitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lincc-frameworks","download_url":"https://codeload.github.com/lincc-frameworks/metric-emitter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lincc-frameworks%2Fmetric-emitter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28502154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2026-01-17T06:18:15.251Z","updated_at":"2026-01-17T06:18:17.297Z","avatar_url":"https://github.com/lincc-frameworks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lf-metric-emitter\n![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/lincc-frameworks/metric-emitter)\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/lincc-frameworks/metric-emitter/testing-and-coverage.yml)\n\nThis tool encapsulates the code needed to emit metrics to the Sasquatch InfluxDB\nstack. https://sasquatch.lsst.io/index.html\n\nTo utilize this tool, two environment variables must be set:\n1) `BENCHMARK_ENV` should be set to something consistent, for instance, `github-ci`, `epic`, `local-desktop-1`, etc.\n2) `KAFKA_API_URL` should be set to the full url. See the Sasquatch documentation for the specific URL.\n\nYou'll also need to manually create a Kafka topic to receive the metrics that are\nemitted. Again, see the Sasquatch documentation for instructions.\n\nWith the Kafka topic created, and the environmental variables, metrics can be emitted like so:\n\n```\n# result from a timing bench mark\nmy_result = 42.0\n\nemitter = Emitter(namespace='lsst.lf',\n                 name='ssppIncubator.bench',\n                 module='PPApplyColourOffset',\n                 benchmark_type:'runtime',\n                 benchmark_unit:'s')\n\n\nemitter.set_value(my_result)\nemitter.emit()\n```\n\n[![Template](https://img.shields.io/badge/Template-LINCC%20Frameworks%20Python%20Project%20Template-brightgreen)](https://lincc-ppt.readthedocs.io/en/latest/)\n\nThis project was automatically generated using the LINCC-Frameworks [python-project-template](https://github.com/lincc-frameworks/python-project-template).\n\nFor more information about the project template see the [documentation](https://lincc-ppt.readthedocs.io/en/latest/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flincc-frameworks%2Fmetric-emitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flincc-frameworks%2Fmetric-emitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flincc-frameworks%2Fmetric-emitter/lists"}