{"id":26164705,"url":"https://github.com/optum/telemetry-logger","last_synced_at":"2025-04-14T15:22:11.134Z","repository":{"id":47824693,"uuid":"379732672","full_name":"Optum/telemetry-logger","owner":"Optum","description":"A general logging gem used by the other Telemetry gems","archived":false,"fork":false,"pushed_at":"2021-08-12T19:16:16.000Z","size":36,"stargazers_count":2,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-14T15:22:06.154Z","etag":null,"topics":["logger","logging","ruby","telemetry"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Optum.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2021-06-23T21:25:11.000Z","updated_at":"2022-07-22T03:41:11.000Z","dependencies_parsed_at":"2022-08-21T03:50:32.667Z","dependency_job_id":null,"html_url":"https://github.com/Optum/telemetry-logger","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Ftelemetry-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Ftelemetry-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Ftelemetry-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Ftelemetry-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Optum","download_url":"https://codeload.github.com/Optum/telemetry-logger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248904634,"owners_count":21180836,"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":["logger","logging","ruby","telemetry"],"created_at":"2025-03-11T15:39:48.448Z","updated_at":"2025-04-14T15:22:11.099Z","avatar_url":"https://github.com/Optum.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telemetry::Logger\nA generic gem to handle logging for all other telemetry gems\n\n#### Setting up the logger\n```ruby\nTelemetry::Logger.setup(level: 'warn', color: false, log_file: './telemetry.log')\n\nopts = {\n  include_pid: false,\n  level: 'info',\n  log_file: nil,\n  color: true,\n  application: 'telemetry',\n  app_version: Telemetry::Logger::VERSION\n}\n```\n\n#### Example Logging\n```ruby\nTelemetry::Logger.setup(level: 'info')\nTelemetry::Logger.info 'test info'\n\nTelemetry::Logger.debug 'test debug'\nTelemetry::Logger.warn 'test warn'\nTelemetry::Logger.error 'test error'\nTelemetry::Logger.fatal 'test fatal'\nTelemetry::Logger.unknown 'test unknown'\n```\n\n#### Example Exception Tracking\nInstead of repeating the same error method all over the place for exceptions, you can use the `exception` method to \nsave on complexity and automatically report exceptions to supported APMs\n\n```ruby\nTelemetry::Logger.setup(level: 'info')\nTelemetry::Logger.exception(StandardError.new('test error'), level: 'warn')\nTelemetry::Logger.exception(StandardError.new('test error'), level: 'fatal')\nTelemetry::Logger.exception(StandardError.new('test error'), handled: true)\nTelemetry::Logger.exception(StandardError.new('test error'), backtrace: true)\n\n# options for exception method\nopts = {\n  level: 'error', # sets the log level\n  handled: true, # tells the apms if we handled this exception\n  backtrace: true, # should we log the backtrace?\n  backtrace_limit: 20, # how many lines should we limit the backtrace to?\n  raise: false, # should we reraise this exception instead of swallowing it?\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptum%2Ftelemetry-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foptum%2Ftelemetry-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptum%2Ftelemetry-logger/lists"}