Add telemetry for /extensionList/ URL#10423
Merged
timja merged 5 commits intojenkinsci:masterfrom Apr 5, 2025
Merged
Conversation
timja
approved these changes
Apr 4, 2025
NotMyFault
approved these changes
Apr 4, 2025
Member
|
/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! |
krisstern
approved these changes
Apr 4, 2025
14 tasks
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)
14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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@Extensionannotated 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 newRootActionhandles this, while reporting accesses to telemetry.Additionally, two uses in core existed for
/extensionList/…URLs:Functions#generateConsoleAnnotationScriptAndStylesheet(theConsoleAnnotatorFactorypart)MemoryUsageMonitorActionas shown on/systemInfoThese were migrated to new
RootActions, whoseurlNameis 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:
linenumbersbut that seems unrelated. Lots of calls to the new/hudson.console.ConsoleAnnotatorFactory, just one to/extensionList/hudson.console.ConsoleAnnotatorFactory/hudson.plugins.timestamper.annotator.TimestampAnnotatorFactory3/usersettings, as expected.ExtensionList.lookupSingleton(jenkins.telemetry.impl.HttpExtensionList).createContent()shows output that would be sent to the telemetry endpoint.ExtensionList.lookupSingleton(jenkins.telemetry.Telemetry.TelemetryReporter).doRun()submits data to the Uplink service.Generated output format, excerpt:
Proposed changelog entries
/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
@Restrictedor have@since TODOJavadocs, as appropriate.@Deprecated(since = "TODO")or@Deprecated(forRemoval = true, since = "TODO"), if applicable.evalto ease future introduction of Content Security Policy (CSP) directives (see documentation).Desired reviewers
@mention
Before the changes are marked as
ready-for-merge:Maintainer checklist
upgrade-guide-neededlabel is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidateto be considered (see query).