{"id":21878972,"url":"https://github.com/nitro/newrelic-logrus","last_synced_at":"2025-04-15T03:06:56.143Z","repository":{"id":26040888,"uuid":"102114761","full_name":"Nitro/newrelic-logrus","owner":"Nitro","description":"Logrus logging hook to report errors via New Relic Go agent","archived":false,"fork":false,"pushed_at":"2022-05-18T15:12:21.000Z","size":2,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-20T16:59:57.043Z","etag":null,"topics":[],"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/Nitro.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-09-01T13:18:45.000Z","updated_at":"2022-08-14T20:33:04.000Z","dependencies_parsed_at":"2022-07-24T17:47:09.997Z","dependency_job_id":null,"html_url":"https://github.com/Nitro/newrelic-logrus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nitro%2Fnewrelic-logrus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nitro%2Fnewrelic-logrus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nitro%2Fnewrelic-logrus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nitro%2Fnewrelic-logrus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nitro","download_url":"https://codeload.github.com/Nitro/newrelic-logrus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226881023,"owners_count":17696894,"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":[],"created_at":"2024-11-28T08:14:17.303Z","updated_at":"2024-11-28T08:14:17.923Z","avatar_url":"https://github.com/Nitro.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"New Relic Logrus Hook\n=====================\n\nThis is a simple logrus hook that lets existing logrus applications hook into\nNew Relic error reporting using the New Relic Go Agent.\n\nNew Relic relies on having errors associated witha transaction. But logrus\ndoesn't know which transaction its being called from. So currently this hook\nplugin just creates a new transaction called `errorTxn` and reports logged\nerrors under that transaction. They show up just like any other reported\nerrors. If any fields are supplied to the log line via `WithFields`, they are\nreported as custom attributes on the `errorTxn` and will be visible in New\nRelic.\n\nUsage\n-----\n\nYou can install this like any other logrus hook. Assuming that `application`\nis your `newrelic.Application` from the Go agent, you can \"hook\" it up like\nthis:\n\n```\nlog.AddHook(\n\tnewrelic_logrus.NewNewRelicLogrusHook(\n\t\tapplication,\n\t\t[]log.Level{log.ErrorLevel, log.FatalLevel},\n\t),\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitro%2Fnewrelic-logrus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitro%2Fnewrelic-logrus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitro%2Fnewrelic-logrus/lists"}