{"id":28420711,"url":"https://github.com/redhat-developer/intellij-redhat-telemetry","last_synced_at":"2025-09-01T12:05:54.509Z","repository":{"id":38191339,"uuid":"335241700","full_name":"redhat-developer/intellij-redhat-telemetry","owner":"redhat-developer","description":"IntelliJ Red Hat telemetry plugin","archived":false,"fork":false,"pushed_at":"2025-04-14T20:53:29.000Z","size":626,"stargazers_count":11,"open_issues_count":10,"forks_count":6,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-06-26T17:50:38.888Z","etag":null,"topics":["hacktoberfest","java","jetbrains-plugin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redhat-developer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null}},"created_at":"2021-02-02T09:54:11.000Z","updated_at":"2025-06-10T01:10:11.000Z","dependencies_parsed_at":"2023-12-26T20:57:51.967Z","dependency_job_id":"3bfc2ab5-47d0-40e3-b770-7029a1cb3011","html_url":"https://github.com/redhat-developer/intellij-redhat-telemetry","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/redhat-developer/intellij-redhat-telemetry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fintellij-redhat-telemetry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fintellij-redhat-telemetry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fintellij-redhat-telemetry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fintellij-redhat-telemetry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redhat-developer","download_url":"https://codeload.github.com/redhat-developer/intellij-redhat-telemetry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fintellij-redhat-telemetry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273121844,"owners_count":25049530,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["hacktoberfest","java","jetbrains-plugin"],"created_at":"2025-06-05T03:49:20.228Z","updated_at":"2025-09-01T12:05:54.445Z","avatar_url":"https://github.com/redhat-developer.png","language":"Java","readme":"# Red Hat Telemetry\n[plugin-repo]: https://plugins.jetbrains.com/plugin/16209-telemetry-by-red-hat\n[plugin-version-svg]: https://img.shields.io/jetbrains/plugin/v/16209-telemetry-by-red-hat.svg\n[plugin-downloads-svg]: https://img.shields.io/jetbrains/plugin/d/16209-telemetry-by-red-hat.svg\n\n[![Build status](https://github.com/redhat-developer/intellij-redhat-telemetry/workflows/Java%20CI%20with%20Gradle/badge.svg)](https://github.com/redhat-developer/intellij-redhat-telemetry/actions?query=workflow%3A%22Java+CI+with+Gradle%22)\n[![JetBrains plugins][plugin-version-svg]][plugin-repo]\n[![JetBrains plugins][plugin-downloads-svg]][plugin-repo]\n\nThis library provides Telemetry APIs specifically meant to be used by IDEA plugins developed by Red Hat.\n## Telemetry reporting\nWith your approval, plugins published by Red Hat collect anonymous \n[usage data](https://github.com/redhat-developer/intellij-redhat-telemetry/blob/master/USAGE_DATA.md) \nand send it to Red Hat servers to help improve our products and services. Read our \n[privacy statement](https://developers.redhat.com/article/tool-data-collection) to learn more about it.\n\nThe first time one of Red Hat plugins is engaging in telemetry collection runs, you will be asked to opt-in Red Hat's \ntelemetry collection program:\n\n![Opt-in request](images/optin-request.png)\n\nWhether you accept or deny the request, this pop up will not show again. \nIf you choose Later, you'll get asked once you restart your IDE.\n\nYou can also opt-in later, by enabling it in the preferences at Tools \u003e Red Hat Telemetry.\n![Opt-in preferences](images/optin-preferences.png)\n\nThis will enable all telemetry events from Red Hat plugins going forward.\n\n## How to disable telemetry reporting?\nIf you want to stop sending usage data to Red Hat, you can disable it in the preferences at Tools \u003e Red Hat Telemetry.\nThis will silence all telemetry events from Red Hat plugins going forward.\n\n## How to use from a IDEA plugin extension?\n\n### Dependency\nStart by adding `com.redhat.devtools.intellij.telemetry` to the plugins section of your build.gradle, so that the dependency can be automatically downloaded and installed, when installing your extension from the Marketplace.\n```groovy\nplugins \"com.redhat.devtools.intellij.telemetry:0.0.1.9\"\n```\n\n### [Optional] Add custom segment keys in src/main/resources/segment.properties\nBy default, extensions will send their data to https://app.segment.com/redhat-devtools/sources/intellij/. \nIn development mode, the data is sent to https://app.segment.com/redhat-devtools/sources/intellij_test/.\nYou can specify custom segment keys to connect and push usage data to https://segment.com/\n```properties\n\"writeKey\": \"your-segment-key-goes-here\",\n\"debugWriteKey\": \"your-segment-key-goes-here-for-dev-mode\",\n```\n\n### Create a Telemetry singleton\nYou then need to create a singleton that allows you to get hold of the telemetry service.\nLazy initialisation allows late construction when things are needed.\n\n```java\npublic class TelemetryService {\n\n    private static final TelemetryService INSTANCE = new TelemetryService();\n\n    private final Lazy\u003cTelemetryMessageBuilder\u003e builder = new Lazy\u003c\u003e(() -\u003e new TelemetryMessageBuilder(TelemetryService.class.getClassLoader()));\n\n    public static TelemetryMessageBuilder instance() {\n        return INSTANCE.builder.get();\n    }\n}\n```\n### Send a message\n\nTo report an event you first need to get a hold on telemetry singleton and start by telling it what action you're about to build.\nGood practice suggests prefixing your action by a group name that you separate with a \"-\". \nColons (\":\") cannot be used due to limitations in wooopra which won't automatically create a schema for your message in that case. \n```java\nActionMessage telemetry = TelemetryService.instance().action(\"smurfs-find the magic cauldron\");\n```\nYou can then chain properties with their values to the point where you can send the message.\n```java\ntelemetry\n    .property(\"kindness\", \"smurfette\")\n    .property(\"magic\", \"papa smurf\")\n    .send();\n```\n\n### Send special properties\nThe telemetry plugin tracks the startup and shutdown of your plugin automatically.\nThere's no need for you to send those messages, it's all done for you behind the scene.\n\nSuccess may be used to indicate particular outcomes.\n```java\ntelemetry.success(\"found the magic cauldron\");\n```\nErrors are passed along similarly. Error and success are both mutually exclusive.\n```java\ntelemetry.error(\"Gargamel was there\");\n```\nA duration may be provided to indicate how long an operation took. You start by signaling when the action started. \n```java\ntelemetry.started();\n```\nOnce the action is finished you provide the end time to the message.\n```java\ntelemetry.finished(LocalDateTime.now());\n```\nNot providing it won't harm, it'll be done automatically for you.\n\n### Retrieve the anonymous User Id\nEach message sends an anonymous user id along with the other payloads. \nThis type 4 UUID is automatically created and stored in a file at `~/.redhat/anonymousId` \nTo retrieve it you can query the class `UserId`.\n```java\nString userId = UserId.INSTANCE.get();\n```\n\n### Add a link to telemetry preferences\nTelemetry provides a label that you can add to your plugin preferences panel. \n```java\nJPanel preferences = FormBuilder.createFormBuilder()\n        .addComponent(TelemetryPreferencesUtils.createTelemetryComponent(\"Tekton Pipelines\", this::getPanel), 1)\n        .addComponentFillVertically(new JPanel(), 0)\n        .getPanel();\n```\nIt provides a link that the user can click to get to the telemetry preferences.\n\n![Consumer-preferences panel](images/consumer-preferences.png)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-developer%2Fintellij-redhat-telemetry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredhat-developer%2Fintellij-redhat-telemetry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-developer%2Fintellij-redhat-telemetry/lists"}