Skip to content

Move Java Agent search to the index and add a slim list type#683

Merged
jaydeluca merged 5 commits into
open-telemetry:mainfrom
lucacavenaghi97:feat/657-instrumentation-list-entry-type
Jun 12, 2026
Merged

Move Java Agent search to the index and add a slim list type#683
jaydeluca merged 5 commits into
open-telemetry:mainfrom
lucacavenaghi97:feat/657-instrumentation-list-entry-type

Conversation

@lucacavenaghi97

Copy link
Copy Markdown
Member

Java Agent global search now reads index.json (with precomputed search_terms) instead of the list bundle, so it no longer depends on fields the slim bundle drops. Also adds a dedicated InstrumentationListEntry type for the bundle/list path (mirrors the collector IndexComponent) so list and config-builder consumers type-check against the slim shape.

search_terms is populated by a db rebuild. Until then the search source falls back to name/display_name/description, so nothing breaks at merge.

Closes #657

Search now reads index.json (precomputed search_terms) instead of the list
bundle, which drops the telemetry and config fields search needs. Adds
InstrumentationListEntry so the list and config-builder consumers type-check
against the slim bundle shape.
Copilot AI review requested due to automatic review settings June 9, 2026 22:48
@lucacavenaghi97 lucacavenaghi97 requested review from a team as code owners June 9, 2026 22:48
@netlify

netlify Bot commented Jun 9, 2026

Copy link
Copy Markdown

Deploy Preview for otel-ecosystem-explorer ready!

Name Link
🔨 Latest commit bc3f047
🔍 Latest deploy log https://app.netlify.com/projects/otel-ecosystem-explorer/deploys/6a2c27aaa54e2f0008a84c72
😎 Deploy Preview https://deploy-preview-683--otel-ecosystem-explorer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Java Agent data model and search pipeline in ecosystem-explorer so global search uses data/javaagent/index.json (with precomputed search_terms) instead of relying on the per-version list bundle shape, and introduces a dedicated slim list entry type to make bundle-vs-detail shape mismatches compile-time errors.

Changes:

  • Add InstrumentationIndex / InstrumentationIndexEntry for index.json, and switch the Java Agent global search source to load/search from the index instead of the list bundle.
  • Introduce InstrumentationListEntry for the slim list-bundle shape and update list/config-builder consumers + tests to use it.
  • Extend the explorer DB builder to precompute deterministic, sorted/deduped search_terms for index entries, with test coverage.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ecosystem-explorer/src/types/javaagent.ts Adds index/list entry types and updates module typing to use the slim list shape.
ecosystem-explorer/src/test/integration/database-structure.integration.test.ts Adds integration assertions for index.json contract and search source behavior.
ecosystem-explorer/src/lib/search/sources/java-agent.ts Switches Java Agent global search to loadIndex() + uses precomputed search_terms.
ecosystem-explorer/src/lib/search/sources/java-agent.test.ts Updates unit tests for the new index-entry-driven search keywords/facets behavior.
ecosystem-explorer/src/lib/search/search-index.test.ts Updates search orchestration mocks to use loadIndex() instead of list fan-out.
ecosystem-explorer/src/lib/normalize-instrumentation.ts Updates module grouping helpers to operate on InstrumentationListEntry.
ecosystem-explorer/src/lib/normalize-instrumentation.test.ts Adjusts normalization snapshot tests to the slim list entry type.
ecosystem-explorer/src/lib/configurations-aggregate.test.ts Updates configuration aggregation fixtures/types to the slim list entry shape.
ecosystem-explorer/src/lib/api/javaagent-data.ts Adds loadIndex() and makes loadAllInstrumentations() return the slim list shape (bundle or projected fallback).
ecosystem-explorer/src/lib/api/javaagent-data.test.ts Adds tests for loadIndex() and updates expectations for slim list-entry returns.
ecosystem-explorer/src/hooks/use-javaagent-data.ts Updates useInstrumentations() to return InstrumentationListEntry[].
ecosystem-explorer/src/features/java-agent/utils/group-instrumentations.ts Updates grouping utilities to accept slim list entries.
ecosystem-explorer/src/features/java-agent/utils/group-instrumentations.test.ts Updates grouping tests to use InstrumentationListEntry fixtures.
ecosystem-explorer/src/features/java-agent/utils/format.ts Narrows getInstrumentationDisplayName input type for wider reuse with slim entries.
ecosystem-explorer/src/features/java-agent/utils/badge-info.ts Simplifies badges computation to rely on precomputed has_spans/has_metrics in list entries.
ecosystem-explorer/src/features/java-agent/utils/badge-info.test.ts Updates badge tests to use has_spans/has_metrics flags instead of telemetry scanning.
ecosystem-explorer/src/features/java-agent/java-instrumentation-list-page.tsx Removes telemetry scanning in filters; relies on list-entry precomputed flags.
ecosystem-explorer/src/features/java-agent/java-instrumentation-list-page.test.tsx Updates list page tests to the slim list-entry shape and precomputed flags.
ecosystem-explorer/src/features/java-agent/configuration/components/instrumentation-row.test.tsx Updates configuration builder row tests to use slim list entries/modules.
ecosystem-explorer/src/features/java-agent/configuration/components/instrumentation-browser.tsx Updates configuration browser prop typing to accept slim list entries.
ecosystem-explorer/src/features/java-agent/configuration/components/instrumentation-browser.test.tsx Updates configuration browser tests/fixtures to use slim list entries.
ecosystem-explorer/src/features/java-agent/components/sub-instrumentation-item.tsx Updates component prop typing to use InstrumentationListEntry.
ecosystem-explorer/src/features/java-agent/components/instrumentation-group-card.test.tsx Updates group card tests to rely on precomputed flags instead of telemetry blocks.
ecosystem-explorer/src/features/java-agent/components/instrumentation-filter-bar.tsx Updates filter bar typing to accept slim list entries.
ecosystem-explorer/src/features/java-agent/components/instrumentation-card.tsx Updates card prop typing to use InstrumentationListEntry.
ecosystem-explorer/src/features/java-agent/components/instrumentation-card.test.tsx Updates card tests to use has_spans/has_metrics rather than telemetry fixtures.
ecosystem-automation/explorer-db-builder/tests/test_instrumentation_transformer.py Adds unit tests for search-term collection + index entry extraction.
ecosystem-automation/explorer-db-builder/tests/test_database_writer.py Extends index writer tests to validate search_terms presence and determinism.
ecosystem-automation/explorer-db-builder/src/explorer_db_builder/instrumentation_transformer.py Implements deterministic _collect_search_terms() and includes it in index entry generation.

Comment thread ecosystem-explorer/src/types/javaagent.ts Outdated
has_spans, has_metrics and _is_custom are always set by both the bundle
producer and the fan-out projection, so mark them required on
InstrumentationListEntry. This removes undefined handling at consumers and
keeps the library/custom split from silently misclassifying.

add(instrumentation.get("library_link"))
add(instrumentation.get("source_path"))
add(instrumentation.get("minimum_java_version"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we can probably limit this to only distinctive, identifier-like strings like config name/declarative_name, metric name, scope.name, the maven coordinate (range stripped), semantic_conventions, features, and descriptions. We can probably drop the individual attribute names, types etc and everything else

Keep only the high-signal terms worth searching on: scope name, semantic
conventions, features, the maven coordinate with its version range stripped,
config name/declarative_name/description and metric name/description. Drop the
attribute names and types, metric instrument/unit/data_type, span kinds and the
link/path fields, which were just noise in the index.
@jaydeluca jaydeluca added this pull request to the merge queue Jun 12, 2026
Merged via the queue into open-telemetry:main with commit 447a22c Jun 12, 2026
23 checks passed
@lucacavenaghi97 lucacavenaghi97 deleted the feat/657-instrumentation-list-entry-type branch June 12, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use a dedicated type for the javaagent list bundle entries

4 participants