Background
Java Agent instrumentation URLs currently embed the version as a path segment:
/java-agent/instrumentation/2.27.0/tomcat-10.0
/java-agent/instrumentation/2.27.0/http-url-connection
/java-agent/instrumentation/2.27.0/akka-actor-2.3
The routes are defined in App.tsx:
/java-agent/instrumentation/:version → JavaInstrumentationListPage
/java-agent/instrumentation/:version/:name → InstrumentationDetailPage
Link generation in instrumentation-card.tsx (line 37):
const detailUrl = `/java-agent/instrumentation/${version}/${instrumentation.name}`;
Version selectors navigate to new URLs:
// list page (java-instrumentation-list-page.tsx:121)
navigate(`/java-agent/instrumentation/${newVersion}`);
// detail page (instrumentation-detail-page.tsx:104)
navigate(`/java-agent/instrumentation/${newVersion}/${name}`);
Objective
Move the version to an optional query parameter so instrumentation URLs are stable and
version-independent by default:
/java-agent/instrumentation/tomcat-10.0 (latest)
/java-agent/instrumentation/tomcat-10.0?version=2.27.0 (specific version)
/java-agent/instrumentation/http-url-connection
/java-agent/instrumentation/akka-actor-2.3
The list page follows the same pattern:
/java-agent/instrumentation (latest)
/java-agent/instrumentation?version=2.27.0 (specific version)
Instrumentation names are already unique identifiers with no need for a distribution
prefix — they are stable across versions (e.g., tomcat-10.0 always refers to the
same instrumentation; only its content hash changes between versions). Moving the
version to a query param means a link to an instrumentation is permanent and shareable
without tying it to a specific release.
Before and after:
| Before |
After |
/java-agent/instrumentation/2.27.0/tomcat-10.0 |
/java-agent/instrumentation/tomcat-10.0 |
/java-agent/instrumentation/2.27.0/http-url-connection |
/java-agent/instrumentation/http-url-connection |
/java-agent/instrumentation/2.26.1/tomcat-10.0 |
/java-agent/instrumentation/tomcat-10.0?version=2.26.1 |
Changes Required
No data or pipeline changes are needed — the storage structure is already keyed by
instrumentation name and version separately. This is a frontend-only change.
App.tsx — remove :version from both instrumentation routes, leaving
/java-agent/instrumentation for the list and /java-agent/instrumentation/:name for
the detail page.
instrumentation-detail-page.tsx — remove version from useParams and read it
from useSearchParams instead (defaulting to latest). Update the version selector to
call setSearchParams rather than navigate.
java-instrumentation-list-page.tsx — same pattern: read version from
useSearchParams and update the version selector to call setSearchParams.
instrumentation-card.tsx — remove version from the detail link path. When a
non-latest version is active, carry it into the link as a query param so context is
preserved when navigating from the list to the detail page:
const detailUrl = version && version !== "latest"
? `/java-agent/instrumentation/${instrumentation.name}?version=${version}`
: `/java-agent/instrumentation/${instrumentation.name}`;
use-javaagent-data.ts — no changes needed; the hook already accepts name and
version as separate parameters.
Background
Java Agent instrumentation URLs currently embed the version as a path segment:
The routes are defined in
App.tsx:Link generation in
instrumentation-card.tsx(line 37):Version selectors navigate to new URLs:
Objective
Move the version to an optional query parameter so instrumentation URLs are stable and
version-independent by default:
The list page follows the same pattern:
Instrumentation names are already unique identifiers with no need for a distribution
prefix — they are stable across versions (e.g.,
tomcat-10.0always refers to thesame instrumentation; only its content hash changes between versions). Moving the
version to a query param means a link to an instrumentation is permanent and shareable
without tying it to a specific release.
Before and after:
/java-agent/instrumentation/2.27.0/tomcat-10.0/java-agent/instrumentation/tomcat-10.0/java-agent/instrumentation/2.27.0/http-url-connection/java-agent/instrumentation/http-url-connection/java-agent/instrumentation/2.26.1/tomcat-10.0/java-agent/instrumentation/tomcat-10.0?version=2.26.1Changes Required
No data or pipeline changes are needed — the storage structure is already keyed by
instrumentation name and version separately. This is a frontend-only change.
App.tsx— remove:versionfrom both instrumentation routes, leaving/java-agent/instrumentationfor the list and/java-agent/instrumentation/:nameforthe detail page.
instrumentation-detail-page.tsx— removeversionfromuseParamsand read itfrom
useSearchParamsinstead (defaulting to latest). Update the version selector tocall
setSearchParamsrather thannavigate.java-instrumentation-list-page.tsx— same pattern: readversionfromuseSearchParamsand update the version selector to callsetSearchParams.instrumentation-card.tsx— remove version from the detail link path. When anon-latest version is active, carry it into the link as a query param so context is
preserved when navigating from the list to the detail page:
use-javaagent-data.ts— no changes needed; the hook already acceptsnameandversionas separate parameters.