{"id":43721378,"url":"https://github.com/prozz/aws-embedded-metrics-golang","last_synced_at":"2026-02-05T08:09:49.798Z","repository":{"id":41381619,"uuid":"270827216","full_name":"prozz/aws-embedded-metrics-golang","owner":"prozz","description":"Go implementation of AWS CloudWatch Embedded Metric Format","archived":false,"fork":false,"pushed_at":"2023-08-10T09:27:17.000Z","size":30,"stargazers_count":56,"open_issues_count":1,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-18T20:26:32.097Z","etag":null,"topics":["aws-cloudwatch","aws-cloudwatch-logs","aws-cloudwatch-metrics","aws-lambda","aws-lambda-golang","golang-package"],"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/prozz.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":"2020-06-08T21:02:53.000Z","updated_at":"2024-06-18T05:33:13.000Z","dependencies_parsed_at":"2024-06-18T20:13:38.860Z","dependency_job_id":"a8c3afc9-a8ca-4da4-a1c9-977131c2edc8","html_url":"https://github.com/prozz/aws-embedded-metrics-golang","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/prozz/aws-embedded-metrics-golang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prozz%2Faws-embedded-metrics-golang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prozz%2Faws-embedded-metrics-golang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prozz%2Faws-embedded-metrics-golang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prozz%2Faws-embedded-metrics-golang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prozz","download_url":"https://codeload.github.com/prozz/aws-embedded-metrics-golang/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prozz%2Faws-embedded-metrics-golang/sbom","scorecard":{"id":747539,"data":{"date":"2025-08-11","repo":{"name":"github.com/prozz/aws-embedded-metrics-golang","commit":"8c92ce90a10fce7c8c597c2f8db57a88f5a35fe9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":2,"reason":"Found 3/15 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/prozz/aws-embedded-metrics-golang/lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/prozz/aws-embedded-metrics-golang/lint.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/prozz/aws-embedded-metrics-golang/lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/prozz/aws-embedded-metrics-golang/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/prozz/aws-embedded-metrics-golang/test.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/lint.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 19 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T19:16:06.251Z","repository_id":41381619,"created_at":"2025-08-22T19:16:06.252Z","updated_at":"2025-08-22T19:16:06.252Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29116452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T05:31:32.482Z","status":"ssl_error","status_checked_at":"2026-02-05T05:31:29.075Z","response_time":65,"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":["aws-cloudwatch","aws-cloudwatch-logs","aws-cloudwatch-metrics","aws-lambda","aws-lambda-golang","golang-package"],"created_at":"2026-02-05T08:09:49.722Z","updated_at":"2026-02-05T08:09:49.793Z","avatar_url":"https://github.com/prozz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-embedded-metrics-golang\n\n![test](https://github.com/prozz/aws-embedded-metrics-golang/workflows/test/badge.svg?branch=master)\n![golangci-lint](https://github.com/prozz/aws-embedded-metrics-golang/workflows/lint/badge.svg?branch=master)\n\nGo implementation of AWS CloudWatch [Embedded Metric Format](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Specification.html)\n\nIt's aim is to simplify reporting metrics to CloudWatch:\n\n- using EMF avoids additional HTTP API calls to CloudWatch as metrics are logged in JSON format to stdout\n- no need for additional dependencies in your services (or mocks in tests) to report metrics from inside your code\n- built in support for default dimensions and properties for Lambda functions\n\nSupports namespaces, setting dimensions and properties as well as different contexts (at least partially).\n\n## Installation\n\n```shell\ngo get github.com/prozz/aws-embedded-metrics-golang\n```\n\n## Usage\n\n```\nemf.New().Namespace(\"mtg\").Metric(\"totalWins\", 1500).Log()\n\nemf.New().Dimension(\"colour\", \"red\").\n    MetricAs(\"gameLength\", 2, emf.Seconds).Log()\n\nemf.New().DimensionSet(\n        emf.NewDimension(\"format\", \"edh\"),\n        emf.NewDimension(\"commander\", \"Muldrotha\")).\n    MetricAs(\"wins\", 1499, emf.Count).Log()\n```\n\nYou may also use the lib together with `defer`.\n\n```\nm := emf.New() // sets up whatever you fancy here\ndefer m.Log()\n\n// any reporting metrics calls\n```\n\nCustomizing the logger:\n```\nemf.New(\n    emf.WithWriter(os.Stderr), // Log to stderr.\n    emf.WithTimestamp(time.Now().Add(-time.Hour)), // Record past metrics.\n    emf.WithoutDimensions(), // Do not include useful Lambda related dimensions.\n    emf.WithLogGroup(\"my-logs\") // Add specific log group.\n)\n```\n\nFunctions for reporting metrics:\n\n```\nfunc Metric(name string, value int)\nfunc Metrics(m map[string]int)\nfunc MetricAs(name string, value int, unit MetricUnit)\nfunc MetricsAs(m map[string]int, unit MetricUnit)\n\nfunc MetricFloat(name string, value float64)\nfunc MetricsFloat(m map[string]float64)\nfunc MetricFloatAs(name string, value float64, unit MetricUnit)\nfunc MetricsFloatAs(m map[string]float64, unit MetricUnit)\n```\n\nFunctions for setting up dimensions:\n\n```\nfunc Dimension(key, value string)\nfunc DimensionSet(dimensions ...Dimension) // use `func NewDimension` for creating one\n```\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\nPlease make sure to update tests.\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprozz%2Faws-embedded-metrics-golang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprozz%2Faws-embedded-metrics-golang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprozz%2Faws-embedded-metrics-golang/lists"}