{"id":18458450,"url":"https://github.com/relaycorp/pino-cloud-js","last_synced_at":"2025-04-08T05:34:14.999Z","repository":{"id":36988722,"uuid":"333859751","full_name":"relaycorp/pino-cloud-js","owner":"relaycorp","description":"Pino integration for cloud logging services like Google Stackdriver","archived":false,"fork":false,"pushed_at":"2025-03-31T00:23:36.000Z","size":2015,"stargazers_count":11,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T01:24:02.275Z","etag":null,"topics":["pino","stackdriver"],"latest_commit_sha":null,"homepage":"https://docs.relaycorp.tech/pino-cloud-js/","language":"TypeScript","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/relaycorp.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":"2021-01-28T18:52:23.000Z","updated_at":"2025-03-31T00:23:38.000Z","dependencies_parsed_at":"2023-11-06T02:23:16.264Z","dependency_job_id":"79144a8e-f933-4cf4-8165-73e5ad0894a9","html_url":"https://github.com/relaycorp/pino-cloud-js","commit_stats":{"total_commits":174,"total_committers":4,"mean_commits":43.5,"dds":0.2816091954022989,"last_synced_commit":"33b875b2c8d8dd0c3b3dca861345286a92a5bb39"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relaycorp%2Fpino-cloud-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relaycorp%2Fpino-cloud-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relaycorp%2Fpino-cloud-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relaycorp%2Fpino-cloud-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/relaycorp","download_url":"https://codeload.github.com/relaycorp/pino-cloud-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247785919,"owners_count":20995641,"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":["pino","stackdriver"],"created_at":"2024-11-06T08:18:36.409Z","updated_at":"2025-04-08T05:34:09.986Z","avatar_url":"https://github.com/relaycorp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @relaycorp/pino-cloud\n\nThis library generates [Pino](https://getpino.io) configuration to format log entries in such a way that they can be properly ingested by cloud logging services such as those on Google Cloud Platform (GCP).\n\nAt this point, only GCP's Cloud Logging and Error Reporting services are supported, but we'd welcome any PRs to support additional targets, such as Elastic Search or AWS CloudWatch Logs.\n\n## Install\n\nReleases are automatically pushed to [NPM](https://www.npmjs.com/package/@relaycorp/pino-cloud). For example, to get the latest release, run:\n\n```shell\nnpm install @relaycorp/pino-cloud\n```\n\n## Usage\n\nThis library simply returns a configuration object for Pino, which you augment before passing to Pino. For example:\n\n```typescript\nimport { getPinoOptions } from '@relaycorp/pino-cloud';\n\nconst LOGGER = pino({\n  ...getPinoOptions(process.ENV.LOGGING_TARGET, {\n    name: 'your-app-name',\n    version: '1.0.2',\n  }),\n  level: 'debug',\n});\n```\n\nIf the environment variable `LOGGING_TARGET` is unset, an empty object is returned.\n\n## Targets\n\n### `gcp`\n\n`error` and `fatal` logs are augmented to include Error Reporting fields, like the name and version of your app.\n\nAdditionally, if the log contains an `err` field that is an instance of `Error`, its stack trace will be added to the field `stack_trace` -- Where Error Reporting expects to find it.\n\n## API documentation\n\nThe API documentation can be found on [docs.relaycorp.tech](https://docs.relaycorp.tech/pino-cloud-js/).\n\n## Contributing\n\nWe love contributions! If you haven't contributed to a Relaycorp project before, please take a minute to [read our guidelines](https://github.com/relaycorp/.github/blob/master/CONTRIBUTING.md) first.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelaycorp%2Fpino-cloud-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frelaycorp%2Fpino-cloud-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelaycorp%2Fpino-cloud-js/lists"}