Skip to content

Exclude hostDetector from default OTel resource detectors#244

Merged
fpfp100 merged 4 commits intomainfrom
fix/disable-default-resource-detectors
May 1, 2026
Merged

Exclude hostDetector from default OTel resource detectors#244
fpfp100 merged 4 commits intomainfrom
fix/disable-default-resource-detectors

Conversation

@fpfp100
Copy link
Copy Markdown
Contributor

@fpfp100 fpfp100 commented Apr 30, 2026

Summary

  • Excludes hostDetector from the NodeSDK resource detectors in ObservabilityBuilder
  • Prevents host.name and host.arch from leaking into exported telemetry
  • Keeps envDetector, processDetector, and serviceInstanceIdDetector

Test plan

  • Build passes
  • All 1249 unit tests pass
  • Verify spans no longer contain host.name/host.arch attributes

🤖 Generated with Claude Code

The NodeSDK default resource detectors auto-attach host.name and host.arch
to every span, leaking machine details into exported telemetry. Explicitly
list only envDetector, processDetector, and serviceInstanceIdDetector to
exclude hostDetector.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 30, 2026 22:41
@fpfp100 fpfp100 requested a review from a team as a code owner April 30, 2026 22:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the ObservabilityBuilder’s OpenTelemetry NodeSDK initialization to exclude host-based resource detection so host.* attributes aren’t automatically attached to exported telemetry.

Changes:

  • Adds explicit resourceDetectors configuration to NodeSDK (env/process/serviceInstanceId only)
  • Updates @opentelemetry/resources imports to include the selected detectors

Comment thread packages/agents-a365-observability/src/ObservabilityBuilder.ts
Comment thread packages/agents-a365-observability/src/ObservabilityBuilder.ts Outdated
jsl517 and others added 2 commits April 30, 2026 15:58
… detectors

Prevents host.name, host.arch, and service.instance.id from leaking into
exported telemetry. Keeps envDetector and processDetector.

Adds unit test that verifies actual resource attributes on exported spans.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 30, 2026 23:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

Comment thread packages/agents-a365-observability/src/ObservabilityBuilder.ts
Comment thread tests/observability/core/observabilityManager.test.ts Outdated
Comment thread tests/observability/core/observabilityManager.test.ts Outdated
Comment thread tests/observability/core/observabilityManager.test.ts Outdated
Comment thread tests/observability/core/observabilityManager.test.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 30, 2026 23:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread tests/observability/core/observabilityManager.test.ts
Comment thread tests/observability/core/observabilityManager.test.ts
Comment thread tests/observability/core/observabilityManager.test.ts
@fpfp100 fpfp100 merged commit 4d678c7 into main May 1, 2026
11 checks passed
@fpfp100 fpfp100 deleted the fix/disable-default-resource-detectors branch May 1, 2026 00:18
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.

6 participants