FireweaveRemoteAdapter (web: FireweaveRemoteWebAdapter). It speaks POST /v1/flags/evaluate and POST /v1/capture. Node, Python, and Web also call POST /v1/targets/register.
Auth on the wire is Authorization: Bearer <FireWeave project key>. Current key prefix in the spec: project-api-key_…. Never send PostHog phc_ / phs_ / phx_ keys on this path.
Environment variables
Exact names from the remote adapters:Deno:
readEnv() treats a denied --allow-env as absence, not a throw. Pass apiUrl / apiKey explicitly and you do not need --allow-env. You still need --allow-net to reach fw-server.FIREWEAVE_POSTHOG_KEY, FIREWEAVE_POSTHOG_HOST, FW_POSTHOG_HOST, or FW_SECRET_KEY as SDK configuration. Those appear in examples only.
Per-language setup
- Node
- Python
- Go
- Java
- Web
FireweaveRemoteAdapterOptions: apiUrl, apiKey, allowedHosts, requestTimeoutMs (default 3000), shutdownTimeoutMs (default 10000), optional injected fetch.HTTPS and host allowlists
https is required off-loopback. Plain http is allowed on loopback only (localhost, 127.0.0.1, ::1) for the test stub.
Default allowlists differ by language:
Self-hosted or custom hosts need an explicit
allowedHosts / allowed_hosts entry. A literal * (Java: ALLOW_ANY_HOST) opts out of host pinning; https is still required off-loopback.
A host that fails the allowlist or scheme check is Configuration (PROVIDER_FATAL on init). Error messages do not echo the host or the key.
Credentials
- Store
FW_PROJECT_API_KEYin your secret manager or environment. Do not commit it. - Error messages and logs redact keys, bearer tokens, and
FW_PROJECT_API_KEYvalues. - Do not put an
attest:writeproject key in a browser bundle.
x-api-key. Shipped adapters document and send Bearer. Do not assume every language sends x-api-key as well.
Timeouts
Verified defaults in the remote adapters and runtime config:Reliability (verified only)
- Batching: exposures and signals queue in-process and POST to
/v1/captureas{ events: [...] }onflush. Web evaluation prefetches one batch/v1/flags/evaluateper context. Node 2.1 remote evaluation is a per-call fw-server round trip (no in-process definition cache). - Retries:
registerTarget/register_target/ Webidentifyretry once when the error taxonomy marks the failure retryable (network / timeout / backend). Auth and invalid-payload failures are not retried. Evaluate and capture are not retried byFireweaveRemoteAdapterin Node, Python, Go, or Java. - Flush on failure: Node and Python remote flush catch transport errors, re-queue the batch, and do not throw.
sendExposuredefault: false in every language. See Exposures.
Signal and release delivery to fw-server vs in-process record is a known compatibility skew (Go / Java adapter sink vs some Node/Python paths). Do not claim “signals always reach the server.” Check
capabilities.get().runtime.features for the attached adapter.What this page does not claim
- Container or serverless runtimes as a supported class (not evidenced in the SDK).
- Automatic retries on evaluate or capture.
- Java reading
FW_API_URL/FW_PROJECT_API_KEYfrom the environment. - Web environment-variable configuration.
- Issued
fw_public_…keys or a live customer host URL.
Next
Initialize, ready, shutdown
Lifecycle states and Java close vs flush
Errors
What a default-valued decision means