Skip to content

Add Agent365 span exporter (Phase 6, Task 2) - #9

Merged
Hector Hernandez (hectorhdzg) merged 2 commits into
microsoft:mainfrom
JacksonWeber:a365-exporter
Apr 9, 2026
Merged

Hector Hernandez (hectorhdzg) merged 2 commits into
microsoft:mainfrom
JacksonWeber:a365-exporter

Conversation

@JacksonWeber

Copy link
Copy Markdown
Contributor

Migrate the Agent365 exporter from microsoft/Agent365-nodejs into the distro under src/_a365/exporter/. Implements SpanExporter from @opentelemetry/sdk-trace-base.

Key behaviors preserved from source:

  • Span partitioning by (tenantId, agentId) identity tuples
  • OTLP-like JSON payload construction (resourceSpans/scopeSpans/spans)
  • Dual endpoint styles: /observability/ and /observabilityService/ (S2S)
  • Token resolution via tokenResolver callback
  • Retry with exponential backoff on 408/429/5xx
  • HTTP request timeout via AbortSignal.timeout
  • Span truncation (250KB limit) with 2-phase shrinking: Phase 1: blobs, tool JSON, text/reasoning by size priority Phase 2: overlimit sentinel fallback for remaining strings

Adaptations:

  • Replaced agents-a365-runtime config with distro A365Configuration
  • Replaced internal logger with distro Logger singleton
  • Uses native fetch (Node 18+)
  • Per-request token context deferred to Task 5

25 new tests, 55 total A365 tests passing.

Migrate the Agent365 exporter from microsoft/Agent365-nodejs into the
distro under src/_a365/exporter/. Implements SpanExporter from
@opentelemetry/sdk-trace-base.

Key behaviors preserved from source:
- Span partitioning by (tenantId, agentId) identity tuples
- OTLP-like JSON payload construction (resourceSpans/scopeSpans/spans)
- Dual endpoint styles: /observability/ and /observabilityService/ (S2S)
- Token resolution via tokenResolver callback
- Retry with exponential backoff on 408/429/5xx
- HTTP request timeout via AbortSignal.timeout
- Span truncation (250KB limit) with 2-phase shrinking:
  Phase 1: blobs, tool JSON, text/reasoning by size priority
  Phase 2: overlimit sentinel fallback for remaining strings

Adaptations:
- Replaced agents-a365-runtime config with distro A365Configuration
- Replaced internal logger with distro Logger singleton
- Uses native fetch (Node 18+)
- Per-request token context deferred to Task 5

25 new tests, 55 total A365 tests passing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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.

lets merge and we can update if needed

@hectorhdzg
Hector Hernandez (hectorhdzg) merged commit 6ac007e into microsoft:main Apr 9, 2026
5 checks passed
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