Skip to content

Add telemetry for /extensionList/ URL#10423

Merged
timja merged 5 commits intojenkinsci:masterfrom
daniel-beck:extensionList-telemetry
Apr 5, 2025
Merged

Add telemetry for /extensionList/ URL#10423
timja merged 5 commits intojenkinsci:masterfrom
daniel-beck:extensionList-telemetry

Conversation

@daniel-beck
Copy link
Copy Markdown
Member

@daniel-beck daniel-beck commented Mar 19, 2025

This adds a telemetry trial collecting information about the URLs accessed below /extensionList/. This is a fairly annoying endpoint, as it allows HTTP access to all sorts of @Extension annotated objects in a variety of ways, even if we might not want that.

We do that by no longer having Jenkins#getExtensionList(String) be @StaplerDispatchable, instead a new RootAction handles this, while reporting accesses to telemetry.

Additionally, two uses in core existed for /extensionList/… URLs:

  • Functions#generateConsoleAnnotationScriptAndStylesheet (the ConsoleAnnotatorFactory part)
  • MemoryUsageMonitorAction as shown on /systemInfo

These were migrated to new RootActions, whose urlName is a class name. TBD if that's nice or confusing, feedback welcome. Also, these might be temporary if the change turns out to be too complex to implement (so no adapting plugins to this change yet!).

Testing done

Manual test:

Generated output format, excerpt:

Result: {"components":{"ace-editor":"1.1","ansicolor":"1.0.6", … ,"workflow-support":"946.v2a_79d8a_4b_e14"},"dispatches":{"hudson.console.ConsoleAnnotatorFactory/hudson.plugins.timestamper.annotator.TimestampAnnotatorFactory3":5}}

Proposed changelog entries

  • Add telemetry to determine whether a specific URL (/extensionList/) is in use by plugins or can safely be removed in future releases of Jenkins.

Proposed changelog category

/label rfe

Proposed upgrade guidelines

N/A

Submitter checklist

  • The Jira issue, if it exists, is well-described.
  • The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see examples). Fill in the Proposed upgrade guidelines section only if there are breaking changes or changes that may require extra steps from users during upgrade.
  • There is automated testing or an explanation as to why this change has no tests.
  • New public classes, fields, and methods are annotated with @Restricted or have @since TODO Javadocs, as appropriate.
  • New deprecations are annotated with @Deprecated(since = "TODO") or @Deprecated(forRemoval = true, since = "TODO"), if applicable.
  • New or substantially changed JavaScript is not defined inline and does not call eval to ease future introduction of Content Security Policy (CSP) directives (see documentation).
  • For dependency updates, there are links to external changelogs and, if possible, full differentials.
  • For new APIs and extension points, there is a link to at least one consumer.

Desired reviewers

@mention

Before the changes are marked as ready-for-merge:

Maintainer checklist

  • There are at least two (2) approvals for the pull request and no outstanding requests for change.
  • Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
  • Changelog entries in the pull request title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood.
  • Proper changelog labels are set so that the changelog can be generated automatically.
  • If the change needs additional upgrade steps from users, the upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).
  • If it would make sense to backport the change to LTS, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

@comment-ops-bot comment-ops-bot bot added the rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Mar 19, 2025
@daniel-beck daniel-beck marked this pull request as ready for review April 3, 2025 12:33
@timja
Copy link
Copy Markdown
Member

timja commented Apr 4, 2025

/label ready-for-merge


This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback.

Thanks!

@comment-ops-bot comment-ops-bot bot added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Apr 4, 2025
@daniel-beck daniel-beck added the squash-merge-me Unclean or useless commit history, should be merged only with squash-merge label Apr 4, 2025
Copy link
Copy Markdown

@A1exKH A1exKH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@timja timja merged commit 7a1a0b8 into jenkinsci:master Apr 5, 2025
19 checks passed
@daniel-beck daniel-beck deleted the extensionList-telemetry branch April 11, 2025 23:00
krisstern pushed a commit to krisstern/jenkins that referenced this pull request May 13, 2025
* Add telemetry for /extensionList/ URL

* Fix URL

* Add plugin information, only collect class names

---------

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
(cherry picked from commit 7a1a0b8)
@daniel-beck daniel-beck mentioned this pull request Jun 17, 2025
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted squash-merge-me Unclean or useless commit history, should be merged only with squash-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants