{"id":14969747,"url":"https://github.com/endlesscodegroup/inspector","last_synced_at":"2026-02-06T14:32:05.666Z","repository":{"id":47571815,"uuid":"232115705","full_name":"EndlessCodeGroup/Inspector","owner":"EndlessCodeGroup","description":"Catch and report all exceptions","archived":false,"fork":false,"pushed_at":"2021-08-30T08:39:16.000Z","size":1362,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-01-01T11:10:16.936Z","etag":null,"topics":["bukkit","crash-reporting","error-reporting","plugin","sentry","spigot"],"latest_commit_sha":null,"homepage":"https://gitlab.com/endlesscodegroup/inspector","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EndlessCodeGroup.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-01-06T14:16:39.000Z","updated_at":"2023-04-28T02:59:44.000Z","dependencies_parsed_at":"2022-07-25T05:02:00.200Z","dependency_job_id":null,"html_url":"https://github.com/EndlessCodeGroup/Inspector","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EndlessCodeGroup%2FInspector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EndlessCodeGroup%2FInspector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EndlessCodeGroup%2FInspector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EndlessCodeGroup%2FInspector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EndlessCodeGroup","download_url":"https://codeload.github.com/EndlessCodeGroup/Inspector/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239985691,"owners_count":19729512,"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":["bukkit","crash-reporting","error-reporting","plugin","sentry","spigot"],"created_at":"2024-09-24T13:42:18.639Z","updated_at":"2026-02-06T14:32:05.604Z","avatar_url":"https://github.com/EndlessCodeGroup.png","language":"Kotlin","readme":"# Inspector\n\n[![Version](https://img.shields.io/maven-central/v/ru.endlesscode.inspector/inspector-api?style=flat-square)][mavenCentral] [![License](https://img.shields.io/github/license/EndlessCodeGroup/Inspector?style=flat-square)][license]\n\n![Inspector Example](https://gitlab.com/endlesscodegroup/inspector/raw/develop/images/example.png)\n\nInspector helps developers to track all exceptions and crashes of theirs plugins.\nIt automatically sends reports to a developer with all needed information about an environment.\n\nIt sends not sensitive data:\n\n- Plugin name and version\n- Version of Inspector\n- Exception stacktrace\n- Unique ID of server (it can't be used to determine who sent a report, it used only to determine that \"two reports sent from same server\")\n\nAlso, it sends some sensitive data that can be disabled from sending:\n\n- Server core and version\n- List of plugins with versions\n\n\u003e NOTE: Inspector filters all tracked exceptions from console to not bother server owners.\n\u003e All plugin-related logs will be saved to log file in the plugin folder.\n\n### Navigation\n\n- [samples](samples): Samples of usage Inspector\n- [inspector-sentry-reporter](inspector-sentry-reporter): Report exceptions to [Sentry](https://sentry.io/) *(recommended reporter)*\n- [inspector-discord-reporter](inspector-discord-reporter): Send reports to Discord channel\n\n## For server owners\n\nThis is not a plugin and can't be installed with copying to `plugins` directory.\n\nYou can disable sending of information about server core and installed plugins in the `inspector.yml` that stored in a directory of each plugin that uses Inspector.\nAlso, you can configure it globally in `plugins/Inspector/config.yml`.\n\n### Config example\n\n```yaml\nReporter:\n  enabled: true\n  # Here you can choose what you want to send\n  data:\n    core: true    # Info about server core\n    plugins: true # Plugins list\n```\n\n## For plugin developers\n\nTo add Inspector to the plugin you must:\n\n- Add Inspector as a dependency to the project\n- Modify main plugin class\n- Change main class in `plugin.yml` to new\n\nAlso, for more coverage, you should:\n\n- Change all usages of `BukkitRunnable` to `TrackedBukkitRunnable`\n- Wrap `CommandExecutor` with `TrackedCommandExecutor`\n\n### Add Inspector to the project\n\n```groovy\nplugins {\n    // Add shadow plugin to shade inspector\n    // See: http://imperceptiblethoughts.com/shadow/\n    id 'com.github.johnrengelman.shadow' version '7.0.0'\n}\n\n// Inspector is published at Maven Central\nrepositories {\n    mavenCentral()\n}\n\nshadowJar {\n    // Exclude dependencies bundled into Spigot from resulting JAR\n    dependencies {\n        exclude(dependency(\"com.google.code.gson:gson:.*\"))\n        exclude(dependency(\"org.jetbrains:annotations:.*\"))\n    }\n\n    // Remove some extra files from resulting JAR\n    exclude(\"DebugProbesKt.bin\")\n    exclude(\"META-INF/proguard/**\") // If you don't use proguard\n    exclude(\"META-INF/native-image/**\")\n\n    // To avoid possible conflicts we should relocate embedded dependencies to own unique package\n    // Here we use manual relocating, but easiest (and slower) variant is use automatically relocating.\n    // Read more: https://imperceptiblethoughts.com/shadow/configuration/relocation/#automatically-relocating-dependencies\n    def shadowPackage = \"shadow.[PLACE_HERE_YOUR_PLUGIN_PACKAGE]\"\n    relocate \"ru.endlesscode.inspector\", \"${shadowPackage}.inspector\"\n    relocate \"kotlinx\", \"${shadowPackage}.kotlinx\"\n    relocate \"kotlin\", \"${shadowPackage}.kotlin\"\n\n    // If you use inspector-sentry-reporter:\n    relocate \"io.sentry\", \"${shadowPackage}.sentry\"\n\n    // If you use inspector-discord-reporter:\n    relocate \"com.github.kittinunf\", \"${shadowPackage}.kittinunf\"\n\n    // Enable shadowJar minimization to reduce plugin size.\n    // Read more: https://imperceptiblethoughts.com/shadow/configuration/minimizing/\n    minimize()\n}\n\n// Automatically run shadowJar making on assemble\ntasks.assemble.dependsOn tasks.shadowJar\n\n// Here you can change preferred version of inspector\next.inspectorVerson = \"0.12.1\"\n\n// Add Inspector as dependency\n// 'inspector-bukkit' - implementation of Inspector for Bukkit.\n// 'inspector-sentry-reporter' - reporter that we want to use (read above about available reporters)\ndependencies {\n    implementation \"ru.endlesscode.inspector:inspector-bukkit:$inspectorVerson\"\n    implementation \"ru.endlesscode.inspector:inspector-sentry-reporter:$inspectorVerson\"\n    implementation \"ru.endlesscode.inspector:sentry-bukkit:$inspectorVerson\" // If you want SentryBukkitIntegration\n}\n```\n\n### Main plugin class modifications\n\nFirst, your current main plugin class should extend `PluginLifecycle` instead of `JavaPlugin`.  \nFor example, this code:\n\n```java\npublic class MyPlugin extends JavaPlugin {\n    // ...\n    // onEnable, onDisable, etc.\n    // ...\n}\n```\n\nmust become:\n\n```java\npublic class MyPlugin extends PluginLifecycle {\n    // ...\n    // onEnable, onDisable, etc.\n    // ... \n}\n```\n\nIf you're doing anything that requires access to plugin's methods in a constructor, you will get `UninitializedPropertyAccessException`.\nTo avoid this problem, override method `init()` and do the work within:\n\n```java\npublic class MyPlugin extends PluginLifecycle {\n    @Override\n    public void init() {\n        // do some work, using plugin's methods\n    }\n}\n```\n\nNext, you must create the new class extending `TrackedPlugin` that will be used as main plugin class and link it with the lifecycle.\nAlso, you must override method `createReporter()`.\nThe created reporter will be used for reporting errors.  \nExample:\n\n```java\npublic class MyTrackedPlugin extends TrackedPlugin {\n\n    public MyTrackedPlugin() {\n        super(MyPlugin.class); // Pass here lifecycle class\n    }\n\n    @Override\n    public Reporter createReporter() {\n        String dsn = \"[YOUR_DSN_HERE]\";\n\n        // Note that you should add needed reporter as dependency first.\n        return new SentryReporter.Builder()\n                .setDsn(dsn)\n                // If you want more detailed reports, add this, but you also should\n                // add `sentry-bukkit` dependency before\n                .addIntegration(new SentryBukkitIntegration(this))\n                .focusOn(this) // Reporter will be focused on this plugin\n                .build();\n    }\n}\n```\n\n[license]: LICENSE\n[mavenCentral]: https://search.maven.org/search?q=g:ru.endlesscode.inspector\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendlesscodegroup%2Finspector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fendlesscodegroup%2Finspector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendlesscodegroup%2Finspector/lists"}