Repository navigation
feat(fi-core): send span exports to FI_TRACES_URL when set - #710
Merged
Merged
Conversation
Self-hosted Docker installs serve the platform API and the trace collector on different ports, but exports and API calls both read FI_BASE_URL, so one shell could not reach both. FI_TRACES_URL now names the trace destination for HTTP exports in Python (register, HTTPSpanExporter, the default exporter, Endpoints, the Temporal helper) and TypeScript fi-core. Unset or blank keeps FI_BASE_URL; custom eval API calls always use FI_BASE_URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The published-core compatibility checks import this otel.py next to a released fi_instrumentation package whose settings has no get_env_traces_endpoint. Fall back to the same rule locally there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Self-hosted Docker installs serve the platform API and the trace collector on different ports (often
:8100and:4318). Span exports and platform API calls both readFI_BASE_URL, so a user can't point an app's tracing at the collector and keep CLI/API calls on the API in the same environment. A real-user run against a self-hosted stack hit exactly this:FI_BASE_URLset to the API gave export 404s;FI_BASE_URLset to the collector brokefagi.Change
FI_TRACES_URL(a base URL, likeFI_BASE_URL) names where HTTP span exports go.Python (
fi-instrumentation-otel): newsettings.get_env_traces_endpoint()returnsFI_TRACES_URL, elseFI_BASE_URL, else the default. It is used by:register()/TracerProvider;HTTPSpanExporterwith no endpoint;Endpoints.FUTURE_AGI;check_custom_eval_config_existsandget_custom_eval_templatekeepFI_BASE_URL.TypeScript (
@traceai/fi-core):constructFullEndpointusesFI_TRACES_URLbeforeFI_BASE_URL/FI_COLLECTOR_ENDPOINT. An explicitendpointstill wins, and platform API calls keepFI_BASE_URL.Unchanged: gRPC (
FI_GRPC_URL); the zero-codeautobootstrap, which can follow once this ships.Unset or blank
FI_TRACES_URLkeeps today's behaviour exactly.Changelog entries are under the pending Python 1.4.0 and fi-core 1.3.0 sections.
Tests
Both suites ran in a temporary E2B sandbox.
Python (
tests/test_traces_url.py):HTTPSpanExporter()and the default exporter export only to the collector's/tracer/v1/traces; the API sees nothing.FI_BASE_URL.""and" "fall back toFI_BASE_URL.dev. In the core suite, the failing set is identical with and without the change: 34 framework/auto tests that need packages not installed in the sandbox. No new failures.TypeScript (
src/__tests__/tracesUrl.test.ts):dev. The full fi-core suite passes (72 suites, 2396 tests).AI use: Claude Code (Opus 5.5) wrote the change and tests; GPT reviewers had mapped the endpoint contract across the SDK, CLI and backend.
🤖 Generated with Claude Code