Skip to content

docs(map): route Service Discovery via integration_placeholder - #22895

Merged
Ancairon merged 2 commits into
masterfrom
fix/service-discovery-integration-placeholder
Jun 29, 2026
Merged

docs(map): route Service Discovery via integration_placeholder#22895
Ancairon merged 2 commits into
masterfrom
fix/service-discovery-integration-placeholder

Conversation

@Ancairon

@Ancairon Ancairon commented Jun 29, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds service_discovery to the integration_kind enum in docs/.map/map.schema.json
  • Changes the Service Discovery node in docs/.map/map.yaml from a leaf pointing to the external agent-service-discovery README to a category node with src/collectors/SERVICE-DISCOVERY.md as the overview and an integration_placeholder: service_discovery for the 5 discoverer integration pages

Background

The 5 service discovery integration pages (src/go/plugin/go.d/discovery/sdext/discoverer/*/integrations/*.md) have learn_status: Published and learn_rel_path: "Collecting Metrics/Service Discovery". They were publishing to the correct URL by accident — populate_integrations in ingest.py had no dedicated bucket for them, so they fell into the alerting_agent_entries catch-all.

This PR adopts the same pattern as Secrets Management (integration_placeholder: secretstore), which gives Service Discovery a proper, intentional placement rather than relying on path fallthrough.

A companion PR in netdata/learn adds the service_discovery_entries bucket and service_discovery_integrations sentinel replacement to ingest.py.

Test plan

  • docs/.map/map.yaml validates against docs/.map/map.schema.json with integration_kind: service_discovery
  • SERVICE-DISCOVERY.md is the overview (landing page) of the Service Discovery sidebar section on Learn
  • The 5 discoverer pages (Docker, SNMP, Net listeners, HTTP, k8s) appear as children in that section
  • No Docusaurus duplicate-route warning for /docs/collecting-metrics/service-discovery

Summary by cubic

Route Service Discovery docs through an integration_placeholder so the section has a proper landing page and the five discoverer integrations appear as children. Add service_discovery to the integration_kind enum and convert the map entry from an external leaf to a category using src/collectors/SERVICE-DISCOVERY.md as the overview.

Written for commit 7b9ca70. Summary will update on new commits.

Review in cubic

The 5 service discovery integration pages
(src/go/plugin/go.d/discovery/sdext/discoverer/*/integrations/*.md)
have learn_status=Published and learn_rel_path pointing to
"Collecting Metrics/Service Discovery". They were landing in the
correct URL by accident -- ingest.py had no dedicated bucket for them
so they fell into the alerting_agent_entries catch-all.

Follow the Secrets Management pattern:
- map.schema.json: add service_discovery to the integration_kind enum.
- map.yaml: change Service Discovery from a leaf node (pointing to the
  external agent-service-discovery README) to a category node with
  SERVICE-DISCOVERY.md as the overview and an integration_placeholder
  for the 5 discoverer pages.

A companion change to netdata/learn adds the service_discovery bucket
and service_discovery_integrations sentinel replacement to ingest.py.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.
Architecture diagram
sequenceDiagram
    participant Schema as map.schema.json
    participant Map as map.yaml
    participant Placeholder as integration_placeholder
    participant Ingest as ingest.py
    participant Learn as Docusaurus (learn)

    Note over Schema,Learn: Service Discovery documentation routing flow

    Schema->>Schema: Defines integration_kind enum (includes service_discovery)
    Map->>Placeholder: NEW: Creates Service Discovery category node
    Placeholder->>Placeholder: integration_kind: service_discovery
    Placeholder->>Ingest: Passes placeholder for service_discovery entries

    Ingest->>Ingest: Reads service_discovery_entries bucket
    Ingest->>Ingest: Performs sentinel replacement for service_discovery_integrations

    alt Discoverer pages found (5 integrations)
        Ingest->>Learn: Inserts discoverer pages as children under Service Discovery
        Learn->>Learn: Builds sidebar: Collecting Metrics > Service Discovery
        Learn->>Learn: Resolves duplicate-route check for /docs/collecting-metrics/service-discovery
    else No discoverer pages found
        Ingest->>Learn: Leaves Service Discovery section empty (no children)
    end

    Note over Map,Learn: Category configured in sidebar with single child placeholder

    Map->>Learn: Provides SERVICE-DISCOVERY.md as overview/landing page
    Learn->>Learn: Renders Service Discovery as expandable category node
    Learn-->>Map: Validation: map.yaml conforms to schema (integration_kind: service_discovery)
Loading

Re-trigger cubic

ilyam8
ilyam8 previously approved these changes Jun 29, 2026
@Ancairon
Ancairon enabled auto-merge (squash) June 29, 2026 10:02
@Ancairon
Ancairon merged commit 6b0c00e into master Jun 29, 2026
150 of 156 checks passed
@Ancairon
Ancairon deleted the fix/service-discovery-integration-placeholder branch June 29, 2026 11:19
@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants