Class Telemetry

    • Constructor Detail

      • Telemetry

        public Telemetry()
    • Method Detail

      • getId

        @NonNull
        public String getId()
        ID of this collector, typically an alphanumeric string (and punctuation). Good IDs are globally unique and human readable (i.e. no UUIDs). For a periodically updated list of all public implementations, see the developer documentation.
        Returns:
        ID of the collector, never null or empty
      • getDisplayName

        @NonNull
        public abstract String getDisplayName()
        User friendly display name for this telemetry collector, ideally localized.
        Returns:
        display name, never null or empty
      • getStart

        @NonNull
        public abstract LocalDate getStart()
        Start date for the collection. Will be checked in Jenkins to not collect outside the defined time span. This does not have to be precise enough for time zones to be a consideration.
        Returns:
        collection start date
      • getEnd

        @NonNull
        public abstract LocalDate getEnd()
        End date for the collection. Will be checked in Jenkins to not collect outside the defined time span. This does not have to be precise enough for time zones to be a consideration.
        Returns:
        collection end date
      • createContent

        @CheckForNull
        public abstract net.sf.json.JSONObject createContent()
        Returns the content to be sent to the telemetry service. This method is called periodically, once per content submission.
        Returns:
        The JSON payload, or null if no content should be submitted.
      • isDisabled

        public static boolean isDisabled()
        Returns:
        whether to collect telemetry
        Since:
        2.147
      • isActivePeriod

        public boolean isActivePeriod()
        Returns true iff we're in the time period during which this is supposed to collect data.
        Returns:
        true iff we're in the time period during which this is supposed to collect data
        Since:
        2.202
      • buildComponentInformation

        protected final Map<String,​String> buildComponentInformation()
        Produces a list of Jenkins core and plugin version numbers to include in telemetry implementations for which this would be relevant.
        Returns:
        a map in a format suitable for a value of createContent()
        Since:
        2.325