Skip to content

Internal - Remove Host Name from Settings URL#542

Merged
cleverchuk merged 1 commit into
mainfrom
cc/NH-143711
Jul 21, 2026
Merged

Internal - Remove Host Name from Settings URL#542
cleverchuk merged 1 commit into
mainfrom
cc/NH-143711

Conversation

@cleverchuk

Copy link
Copy Markdown
Contributor

Summary

The agent's getSettings HTTP call previously appended the hostname as a path segment (/v1/settings/{service}/{hostname}). This change removes the hostname from that URL, making the endpoint /v1/settings/{service}.

What changed

Settings URL path simplified

The HttpSettingsReader no longer looks up the host name from ResourceArbiter to embed it in the settings URL. The HOST_NAME attribute was being read from the resolved OTel resource and appended as a trailing path segment, tying settings fetches to host identity at the URL level. Removing it decouples settings retrieval from host identity.

HostIdResourceUtil no longer emits HOST_NAME

The same attribute was being injected into the resource identity map built by HostIdResourceUtil. That line is removed, so the host name is no longer part of the identity attributes contributed by this utility.

Rationale

The collector's /v1/settings endpoint does not require the hostname in the path as of current specification.

Test services data

  1. e-1712644058766987264
  2. e-1712643928659124224
  3. e-1742334541200846848
  4. e-1777406072376840192

Copilot AI review requested due to automatic review settings July 20, 2026 21:35
@cleverchuk
cleverchuk requested review from a team as code owners July 20, 2026 21:35

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 agent’s settings-fetch behavior to remove the host name from the /v1/settings URL path, aligning the client with the collector endpoint contract (/v1/settings/{service}) and decoupling settings retrieval from host identity.

Changes:

  • Simplified HttpSettingsReader settings URL construction to omit the hostname segment.
  • Removed HOST_NAME emission from HostIdResourceUtil identity attributes.
  • Updated HttpSettingsReaderTest expectations and removed now-unneeded resource/hostname mocking.

Reviewed changes

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

File Description
custom/src/main/java/com/solarwinds/opentelemetry/extensions/config/HttpSettingsReader.java Removes hostname from the settings URL path and updates related debug logging.
custom/src/main/java/com/solarwinds/opentelemetry/extensions/config/HostIdResourceUtil.java Stops adding host.name to the generated resource attributes.
custom/src/test/java/com/solarwinds/opentelemetry/extensions/config/HttpSettingsReaderTest.java Updates URL assertions to match the new endpoint shape and simplifies test setup accordingly.

@jerrytfleung jerrytfleung left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM.

@cleverchuk
cleverchuk merged commit e1e0f05 into main Jul 21, 2026
18 checks passed
@cleverchuk
cleverchuk deleted the cc/NH-143711 branch July 21, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants