Skip to content

fix(AIC-3596): point the missing-OTel warning and docs at @launchdarkly/ai-otel - #144

Merged
jeffdupont merged 1 commit into
mainfrom
jdupont/aic-3596-otel-install-hint
Oct 21, 2026
Merged

jeffdupont merged 1 commit into
mainfrom
jdupont/aic-3596-otel-install-hint

Conversation

@jeffdupont

@jeffdupont jeffdupont commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Fixes AIC-3596.

Why

A plain npm install @launchdarkly/ai-server leaves telemetry off, because the 7 OpenTelemetry SDK packages are optional peers. When they're missing, initClient() logs a warning, but the warning told users to install all 7 packages by hand, and so did the client README. We already ship @launchdarkly/ai-otel for this: it brings all 7 in one install, and the root README and the ai-node README already recommend it. This PR makes the warning and the remaining docs say the same thing.

The peers stay optional on purpose, and ai-node still does not depend on ai-otel. Edge runtimes such as Vercel and Cloudflare can't load @opentelemetry/sdk-trace-node, so they rely on these packages being absent and on the warn-and-continue path. TESTING.md ("OpenTelemetry SDK packages not installed — graceful degradation") only requires that the warning include the install command, and it still does, so the spec doesn't change.

Fix

  • packages/client/src/lifecycle.ts: the missing-OTel console.warn now recommends npm install @launchdarkly/ai-otel, and still gives the 7-package command for anyone who wants to install them one by one.
  • packages/client/README.md: the "With telemetry" install block now uses npm install @launchdarkly/ai-server @launchdarkly/ai-otel.
  • README.md (Telemetry → Optional peer dependencies): now mentions ai-otel and the command the warning prints.
  • Every package's agents.md already recommended ai-otel, so none of them changed.

Testing

  • packages/client/src/__tests__/lifecycle.test.ts: the missing-peer test now checks for npm install @launchdarkly/ai-otel instead of just npm install. Before the fix it failed (Received had no @launchdarkly/ai-otel). After the fix it passes.
  • yarn build, yarn typecheck, yarn code:check, and yarn test all pass: 2330 tests across the workspace runs.

Related: launchdarkly/python-ai-sdk#186

🤖 Generated with Claude Code


Note

Overview
Aligns missing-OpenTelemetry guidance with the existing @launchdarkly/ai-otel meta-package instead of listing seven OTel peers by default.

When optional OTel SDK packages are absent, initClient() still warns once and continues with no-op spans; the console.warn now leads with npm install @launchdarkly/ai-otel and keeps the individual-package install line as a fallback. Root README.md and packages/client/README.md use the same one-step install for the “with telemetry” path. lifecycle.test.ts asserts the updated warning text.

No change to telemetry behavior, peer dependency model, or graceful degradation when OTel is not installed.

Reviewed by Cursor Bugbot for commit 4b62db4. Bugbot is set up for automated code reviews on this repo. Configure here.

…ly/ai-otel

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jeffdupont added a commit to launchdarkly/python-ai-sdk that referenced this pull request Oct 21, 2026
Fixes [AIC-3596](https://launchdarkly.atlassian.net/browse/AIC-3596).

## Why

When the OpenTelemetry packages are missing, `init_client()` logs a
warning telling users to run `pip install opentelemetry-sdk`. That isn't
enough. Telemetry also needs `opentelemetry-exporter-otlp-proto-http`,
so someone who follows the hint gets the same warning again. The READMEs
already give the right command, `pip install
"launchdarkly-ai-server[otel]"`, which installs both packages. This PR
makes the warning match. The JS SDK is getting the same fix: its warning
will point at `@launchdarkly/ai-otel`.

## Fix

- `packages/client/src/launchdarkly_ai_server/lifecycle.py`: the warning
now says ``Run `pip install "launchdarkly-ai-server[otel]"` to enable
telemetry.``
- `packages/client/tests/test_lifecycle.py`: `test_emits_warning_once`
used to replace `_setup_telemetry` with a stub that logged its own text,
so it never checked the real message. It now forces the real import to
fail (`sys.modules["opentelemetry.sdk.trace"] = None`) and checks that
exactly one warning appears and that it contains the `[otel]` install
command.

## Testing

- Before the fix, the new test failed: `assert 'pip install
"launchdarkly-ai-server[otel]"' in 'OpenTelemetry packages not
installed. Run `pip install opentelemetry-sdk` to enable telemetry.'`
- `make test`: 2544 passed, 14 skipped. `make typecheck`: no issues in
75 source files. `make lint`: all checks passed.

Related: launchdarkly/js-ai-sdk#144

🤖 Generated with [Claude Code](https://claude.com/claude-code)


[AIC-3596]:
https://launchdarkly.atlassian.net/browse/AIC-3596?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Overview**
> When OpenTelemetry isn’t installed, **`init_client`** now tells users
to run ``pip install "launchdarkly-ai-server[otel]"`` instead of only
``opentelemetry-sdk``, so the hint matches the extra that pulls in the
OTLP exporter as well.
> 
> **`test_emits_warning_once`** no longer stubs **`_setup_telemetry`**
with fake log text; it forces the real OTel import to fail and asserts a
single warning that includes the **`[otel]`** install command.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
3c06259. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@jeffdupont
jeffdupont merged commit 9b5f32e into main Oct 21, 2026
11 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 21, 2026
jeffdupont pushed a commit that referenced this pull request Oct 26, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>@launchdarkly/ai-claude-agents: 0.5.0</summary>

##
[0.5.0](https://github.com/launchdarkly/js-ai-sdk/compare/@launchdarkly/ai-claude-agents-0.4.0...@launchdarkly/ai-claude-agents-0.5.0)
(2026-10-26)


### ⚠ BREAKING CHANGES

* forward the same model.parameters keys as the Python SDK
([#118](#118))
* **claude-agents:** accept trusted cwd and settingSources options, and
load no host settings by default
([#135](#135))
* **client:** the client no longer loads .env. Add import
'dotenv/config' to your entrypoint (and install dotenv) if you relied on
it.

### Features

* **AIC-3623:** evals from code
([#143](#143))
([dc74b48](dc74b48))
* **claude-agents:** accept trusted cwd and settingSources options, and
load no host settings by default
([#135](#135))
([6acd53d](6acd53d))


### Bug Fixes

* **AIC-3571:** visit every child before its parent in reverseTraverse
([#147](#147))
([a17a2ce](a17a2ce))
* **AIC-3577:** send object tool results to the model as JSON
([#146](#146))
([be41d87](be41d87))
* **claude-agents:** fail the run when the CLI reports an API error as
success ([#138](#138))
([4637958](4637958))
* **client:** stop loading dotenv from library code
([#69](#69))
([fea34f3](fea34f3))
* forward the same model.parameters keys as the Python SDK
([#118](#118))
([f7883ce](f7883ce))
* give native graph spans their LaunchDarkly identity
([#101](#101))
([4d97cfa](4d97cfa))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/ai-server bumped from ^0.4.0 to ^0.5.0
</details>

<details><summary>@launchdarkly/ai-claude-messages: 0.5.0</summary>

##
[0.5.0](https://github.com/launchdarkly/js-ai-sdk/compare/@launchdarkly/ai-claude-messages-0.4.0...@launchdarkly/ai-claude-messages-0.5.0)
(2026-10-26)


### ⚠ BREAKING CHANGES

* forward the same model.parameters keys as the Python SDK
([#118](#118))
* **client:** the client no longer loads .env. Add import
'dotenv/config' to your entrypoint (and install dotenv) if you relied on
it.

### Features

* **AIC-3623:** evals from code
([#143](#143))
([dc74b48](dc74b48))


### Bug Fixes

* **AIC-3577:** send object tool results to the model as JSON
([#146](#146))
([be41d87](be41d87))
* **client:** stop loading dotenv from library code
([#69](#69))
([fea34f3](fea34f3))
* forward the same model.parameters keys as the Python SDK
([#118](#118))
([f7883ce](f7883ce))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/ai-server bumped from ^0.4.0 to ^0.5.0
</details>

<details><summary>@launchdarkly/ai-langchain-agents: 0.5.0</summary>

##
[0.5.0](https://github.com/launchdarkly/js-ai-sdk/compare/@launchdarkly/ai-langchain-agents-0.4.0...@launchdarkly/ai-langchain-agents-0.5.0)
(2026-10-26)


### ⚠ BREAKING CHANGES

* forward the same model.parameters keys as the Python SDK
([#118](#118))
* **client:** the client no longer loads .env. Add import
'dotenv/config' to your entrypoint (and install dotenv) if you relied on
it.

### Features

* **AIC-3623:** evals from code
([#143](#143))
([dc74b48](dc74b48))


### Bug Fixes

* **AIC-3577:** send object tool results to the model as JSON
([#146](#146))
([be41d87](be41d87))
* **client:** stop loading dotenv from library code
([#69](#69))
([fea34f3](fea34f3))
* forward the same model.parameters keys as the Python SDK
([#118](#118))
([f7883ce](f7883ce))
* give native graph spans their LaunchDarkly identity
([#101](#101))
([4d97cfa](4d97cfa))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/ai-server bumped from ^0.4.0 to ^0.5.0
</details>

<details><summary>@launchdarkly/ai-langchain-messages: 0.5.0</summary>

##
[0.5.0](https://github.com/launchdarkly/js-ai-sdk/compare/@launchdarkly/ai-langchain-messages-0.4.0...@launchdarkly/ai-langchain-messages-0.5.0)
(2026-10-26)


### ⚠ BREAKING CHANGES

* forward the same model.parameters keys as the Python SDK
([#118](#118))
* **client:** the client no longer loads .env. Add import
'dotenv/config' to your entrypoint (and install dotenv) if you relied on
it.

### Features

* **AIC-3623:** evals from code
([#143](#143))
([dc74b48](dc74b48))


### Bug Fixes

* **AIC-3577:** send object tool results to the model as JSON
([#146](#146))
([be41d87](be41d87))
* **client:** stop loading dotenv from library code
([#69](#69))
([fea34f3](fea34f3))
* forward the same model.parameters keys as the Python SDK
([#118](#118))
([f7883ce](f7883ce))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/ai-server bumped from ^0.4.0 to ^0.5.0
</details>

<details><summary>@launchdarkly/ai-litellm-agents: 0.2.0</summary>

##
[0.2.0](https://github.com/launchdarkly/js-ai-sdk/compare/@launchdarkly/ai-litellm-agents-0.1.0...@launchdarkly/ai-litellm-agents-0.2.0)
(2026-10-26)


### ⚠ BREAKING CHANGES

* forward the same model.parameters keys as the Python SDK
([#118](#118))

### Features

* add LiteLLM messages and agents integrations
([#75](#75))
([127f156](127f156))


### Bug Fixes

* forward the same model.parameters keys as the Python SDK
([#118](#118))
([f7883ce](f7883ce))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/ai-server bumped from ^0.4.0 to ^0.5.0
</details>

<details><summary>@launchdarkly/ai-litellm-messages: 0.2.0</summary>

##
[0.2.0](https://github.com/launchdarkly/js-ai-sdk/compare/@launchdarkly/ai-litellm-messages-0.1.0...@launchdarkly/ai-litellm-messages-0.2.0)
(2026-10-26)


### ⚠ BREAKING CHANGES

* forward the same model.parameters keys as the Python SDK
([#118](#118))

### Features

* add LiteLLM messages and agents integrations
([#75](#75))
([127f156](127f156))


### Bug Fixes

* forward the same model.parameters keys as the Python SDK
([#118](#118))
([f7883ce](f7883ce))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/ai-server bumped from ^0.4.0 to ^0.5.0
</details>

<details><summary>@launchdarkly/ai-node: 0.4.0</summary>

##
[0.4.0](https://github.com/launchdarkly/js-ai-sdk/compare/@launchdarkly/ai-node-0.3.0...@launchdarkly/ai-node-0.4.0)
(2026-10-26)


### ⚠ BREAKING CHANGES

* **skills:** promote Agent Skills to core
([#159](#159))
* **client:** the client no longer loads .env. Add import
'dotenv/config' to your entrypoint (and install dotenv) if you relied on
it.

### Features

* **skills:** promote Agent Skills to core
([#159](#159))
([c7135cd](c7135cd))


### Bug Fixes

* **client:** stop loading dotenv from library code
([#69](#69))
([fea34f3](fea34f3))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/ai-server bumped from ^0.4.0 to ^0.5.0
</details>

<details><summary>@launchdarkly/ai-openai-agents: 0.5.0</summary>

##
[0.5.0](https://github.com/launchdarkly/js-ai-sdk/compare/@launchdarkly/ai-openai-agents-0.4.0...@launchdarkly/ai-openai-agents-0.5.0)
(2026-10-26)


### ⚠ BREAKING CHANGES

* forward the same model.parameters keys as the Python SDK
([#118](#118))
* **client:** the client no longer loads .env. Add import
'dotenv/config' to your entrypoint (and install dotenv) if you relied on
it.

### Features

* **AIC-3623:** evals from code
([#143](#143))
([dc74b48](dc74b48))


### Bug Fixes

* **AIC-3571:** visit every child before its parent in reverseTraverse
([#147](#147))
([a17a2ce](a17a2ce))
* **AIC-3577:** send object tool results to the model as JSON
([#146](#146))
([be41d87](be41d87))
* **AIC-3586:** propagate tool handler errors instead of sending them to
the model ([#139](#139))
([1f31e85](1f31e85))
* **client:** stop loading dotenv from library code
([#69](#69))
([fea34f3](fea34f3))
* forward the same model.parameters keys as the Python SDK
([#118](#118))
([f7883ce](f7883ce))
* give native graph spans their LaunchDarkly identity
([#101](#101))
([4d97cfa](4d97cfa))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/ai-server bumped from ^0.4.0 to ^0.5.0
</details>

<details><summary>@launchdarkly/ai-openai-messages: 0.5.0</summary>

##
[0.5.0](https://github.com/launchdarkly/js-ai-sdk/compare/@launchdarkly/ai-openai-messages-0.4.0...@launchdarkly/ai-openai-messages-0.5.0)
(2026-10-26)


### ⚠ BREAKING CHANGES

* forward the same model.parameters keys as the Python SDK
([#118](#118))
* **client:** the client no longer loads .env. Add import
'dotenv/config' to your entrypoint (and install dotenv) if you relied on
it.

### Features

* **AIC-3623:** evals from code
([#143](#143))
([dc74b48](dc74b48))


### Bug Fixes

* **AIC-3577:** send object tool results to the model as JSON
([#146](#146))
([be41d87](be41d87))
* **client:** stop loading dotenv from library code
([#69](#69))
([fea34f3](fea34f3))
* forward the same model.parameters keys as the Python SDK
([#118](#118))
([f7883ce](f7883ce))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/ai-server bumped from ^0.4.0 to ^0.5.0
</details>

<details><summary>@launchdarkly/ai-otel: 0.3.0</summary>

##
[0.3.0](https://github.com/launchdarkly/js-ai-sdk/compare/@launchdarkly/ai-otel-0.2.0...@launchdarkly/ai-otel-0.3.0)
(2026-10-26)


### ⚠ BREAKING CHANGES

* **client:** the client no longer loads .env. Add import
'dotenv/config' to your entrypoint (and install dotenv) if you relied on
it.

### Bug Fixes

* **client:** stop loading dotenv from library code
([#69](#69))
([fea34f3](fea34f3))
</details>

<details><summary>@launchdarkly/ai-server: 0.5.0</summary>

##
[0.5.0](https://github.com/launchdarkly/js-ai-sdk/compare/@launchdarkly/ai-server-0.4.0...@launchdarkly/ai-server-0.5.0)
(2026-10-26)


### ⚠ BREAKING CHANGES

* **skills:** promote Agent Skills to core
([#159](#159))
* forward the same model.parameters keys as the Python SDK
([#118](#118))
* **client:** the client no longer loads .env. Add import
'dotenv/config' to your entrypoint (and install dotenv) if you relied on
it.

### Experimental

* **evaluations:** hash eventId and contentHash as RFC 8785 canonical
JSON, the same in every SDK
([c971649](c971649))
* **evaluations:** Set JSON as standard for output to pass to judge
([#152](#152))
([330da44](330da44))


### Features

* **AIC-3534:** add a TypeSafe Jev judge handler
([#122](#122))
([0c1d6b7](0c1d6b7))
* **AIC-3623:** evals from code
([#143](#143))
([dc74b48](dc74b48))
* **skills:** promote Agent Skills to core
([#159](#159))
([c7135cd](c7135cd))


### Bug Fixes

* **AIC-3541:** accept a node-server-sdk client in initClient() without
a cast ([#128](#128))
([5819449](5819449))
* **AIC-3570:** re-resolve graph flags on every invoke and stream
([#145](#145))
([ce4f72e](ce4f72e))
* **AIC-3571:** visit every child before its parent in reverseTraverse
([#147](#147))
([a17a2ce](a17a2ce))
* **AIC-3576:** record deferred judge scores under the evaluated config
([#148](#148))
([d9fbee6](d9fbee6))
* **AIC-3577:** send object tool results to the model as JSON
([#146](#146))
([be41d87](be41d87))
* **AIC-3596:** point the missing-OTel warning and docs at
@launchdarkly/ai-otel
([#144](#144))
([9b5f32e](9b5f32e))
* **client:** show a judge an output of 0, false, {} or []
([c971649](c971649))
* **client:** stop loading dotenv from library code
([#69](#69))
([fea34f3](fea34f3))
* forward the same model.parameters keys as the Python SDK
([#118](#118))
([f7883ce](f7883ce))
* give native graph spans their LaunchDarkly identity
([#101](#101))
([4d97cfa](4d97cfa))
* **judges:** a judge config's outputFormat must not reach the provider
([#56](#56))
([8c6f4d2](8c6f4d2))
* **skills:** Correct the HTTP 403 advice now that server-side FDv2 is
available to every account
([#141](#141))
([5b7b732](5b7b732))
* **skills:** default FDv2SkillStore endpoints from LD_BASE_URI and
LD_STREAM_URI
([#134](#134))
([05f77d9](05f77d9))
</details>

<details><summary>@launchdarkly/ai-typesafe: 0.2.0</summary>

##
[0.2.0](https://github.com/launchdarkly/js-ai-sdk/compare/@launchdarkly/ai-typesafe-0.1.0...@launchdarkly/ai-typesafe-0.2.0)
(2026-10-26)


### ⚠ BREAKING CHANGES

* forward the same model.parameters keys as the Python SDK
([#118](#118))

### Features

* **AIC-3534:** add a TypeSafe Jev judge handler
([#122](#122))
([0c1d6b7](0c1d6b7))
* **AIC-3623:** evals from code
([#143](#143))
([dc74b48](dc74b48))


### Bug Fixes

* forward the same model.parameters keys as the Python SDK
([#118](#118))
([f7883ce](f7883ce))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/ai-server bumped from ^0.4.0 to ^0.5.0
</details>

<details><summary>@launchdarkly/ai-vercel-agents: 0.3.0</summary>

##
[0.3.0](https://github.com/launchdarkly/js-ai-sdk/compare/@launchdarkly/ai-vercel-agents-0.2.0...@launchdarkly/ai-vercel-agents-0.3.0)
(2026-10-26)


### ⚠ BREAKING CHANGES

* forward the same model.parameters keys as the Python SDK
([#118](#118))

### Features

* **AIC-3623:** evals from code
([#143](#143))
([dc74b48](dc74b48))


### Bug Fixes

* forward the same model.parameters keys as the Python SDK
([#118](#118))
([f7883ce](f7883ce))
* give native graph spans their LaunchDarkly identity
([#101](#101))
([4d97cfa](4d97cfa))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/ai-server bumped from ^0.4.0 to ^0.5.0
</details>

<details><summary>@launchdarkly/ai-vercel-messages: 0.3.0</summary>

##
[0.3.0](https://github.com/launchdarkly/js-ai-sdk/compare/@launchdarkly/ai-vercel-messages-0.2.0...@launchdarkly/ai-vercel-messages-0.3.0)
(2026-10-26)


### ⚠ BREAKING CHANGES

* forward the same model.parameters keys as the Python SDK
([#118](#118))

### Features

* **AIC-3623:** evals from code
([#143](#143))
([dc74b48](dc74b48))


### Bug Fixes

* forward the same model.parameters keys as the Python SDK
([#118](#118))
([f7883ce](f7883ce))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/ai-server bumped from ^0.4.0 to ^0.5.0
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Overview**
> This is a **Release Please** cut that bumps published versions across
the monorepo and records what ships in each package—there is no
application source in the diff beyond `LD_AI_PACKAGE_VERSION` strings
and dependency pins.
> 
> **@launchdarkly/ai-server** goes to **0.5.0**; provider packages move
to **0.5.0** (or **0.4.0** / **0.3.0** / **0.2.0** where applicable),
`.release-please-manifest.json` is updated, and every adapter’s
`package.json` now depends on **`@launchdarkly/ai-server` ^0.5.0**. New
**CHANGELOG** sections document the release notes already merged on
`main`.
> 
> Reviewers should treat this as publishing **breaking** behavior called
out in those changelogs: libraries no longer auto-load **`.env`** (apps
need `import 'dotenv/config'` if they relied on it),
**`model.parameters`** forwarding is aligned with the Python SDK,
**Agent Skills** are promoted from experimental to core, plus
features/fixes such as **evals from code**, TypeSafe judge handler, and
**claude-agents** defaulting to no host settings unless `cwd` /
`settingSources` are passed.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
8c6546c. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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