{"id":27349633,"url":"https://github.com/ixpantia/googleerrorreportingr","last_synced_at":"2025-04-12T19:26:57.389Z","repository":{"id":37024617,"uuid":"504684451","full_name":"ixpantia/googleErrorReportingR","owner":"ixpantia","description":"R wrapper for the Google Cloud Platform Error Reporting API","archived":false,"fork":false,"pushed_at":"2024-10-28T22:13:10.000Z","size":498,"stargazers_count":7,"open_issues_count":8,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T15:41:22.658Z","etag":null,"topics":["gcp","gcp-error-reporting","googlecloudplatform","hacktoberfest"],"latest_commit_sha":null,"homepage":"https://ixpantia.github.io/googleErrorReportingR","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ixpantia.png","metadata":{"files":{"readme":"README.Rmd","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":"2022-06-17T22:10:35.000Z","updated_at":"2025-03-24T02:22:20.000Z","dependencies_parsed_at":"2025-04-01T15:47:24.602Z","dependency_job_id":null,"html_url":"https://github.com/ixpantia/googleErrorReportingR","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixpantia%2FgoogleErrorReportingR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixpantia%2FgoogleErrorReportingR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixpantia%2FgoogleErrorReportingR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixpantia%2FgoogleErrorReportingR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ixpantia","download_url":"https://codeload.github.com/ixpantia/googleErrorReportingR/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248620370,"owners_count":21134627,"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":["gcp","gcp-error-reporting","googlecloudplatform","hacktoberfest"],"created_at":"2025-04-12T19:26:51.533Z","updated_at":"2025-04-12T19:26:57.383Z","avatar_url":"https://github.com/ixpantia.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\neditor_options: \n  chunk_output_type: console\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/\",\n  out.width = \"100%\"\n)\nlibrary(jsonlite)\nlibrary(lubridate)\n```\n\n\n\u003c!-- badges: start --\u003e\n# \u003ca\u003e\u003cimg src=\"https://storage.googleapis.com/ixplorer/googleErrorReportingR.svg\" align=\"right\" width=\"30%\"\u003e\u003c/a\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/googleErrorReportingR)](https://cran.r-project.org/package=googleErrorReportingR)\n\u003c!-- badges: end --\u003e\n\n# googleErrorReportingR\nThis is an R wrapper for the Google Cloud Platform Error Reporting API. It uses\nthe Error Reporting API as defined in the [projects.events.report](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.events/report)\nmethod.\n\n\n## Installation\n\nYou can install the development version of googleErrorReportingR from\n[GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"ixpantia/googleErrorReportingR\")\n```\n\n## Usage\nBefore you start, please set up a file called `.Renviron` that contains the\nfollowing line.\n\n```\nPROJECT_ID=\u003cyour gcp project id\u003e\nERROR_REPORTING_API_KEY=\u003cyour api key\u003e\n```\n\nIf you are running a session, then restart your R session so that the\nenvironmental variables are read.\n\nYou can pass on the `project_id` and `api_key` to the function call directly,\nbut since we typically use this many time in one code-base we default to the\nvalues in the environmental variables so that instead of:\n\n```{r, eval= FALSE}\nreport_error(message, project_id, api_key)\n```\n\nWe can call\n\n```{r, eval= FALSE}\nreport_error(message)\n```\n\nand put the effort in defining the error message at each location in the code\nthat we want to monitor.\n\nthe following is a basic example of usage:\n\n```{r example}\nlibrary(googleErrorReportingR)\n\nmessage \u003c- format_error_message()\n\nmessage$serviceContext$service \u003c- \"A demo service\"\nmessage$serviceContext$version \u003c- \"v0.3.4\"\n\ngoogleErrorReportingR::report_error(message)\n```\n\nIf your project-id and api_key are set up correctly the message above will\nappear in the Google Error Reporting UI as follows:\n\n![Screenshot of the message as listed in the Google Error Reporting UI](man/figures/google_error_reporting_ui.png)\n\n## Adding details\nNote that the message we are sending, once we convert the list to the json body\nas required by the API, contains all the information elements that we can add to\nthe message.\n\n```{r}\ntoJSON(message, auto_unbox = TRUE, pretty = TRUE )\n```\n\nPlease read the vignette for further details on how to configure each and\neveryone of them.\n\n## Roadmap\nWe are working on the next version of `googleErrorReportingR` to include the use\nof the `list` endpoint.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fixpantia%2Fgoogleerrorreportingr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fixpantia%2Fgoogleerrorreportingr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fixpantia%2Fgoogleerrorreportingr/lists"}