diff --git a/packages/client/README.md b/packages/client/README.md index ecabd1ef..ac0ebf49 100644 --- a/packages/client/README.md +++ b/packages/client/README.md @@ -44,6 +44,8 @@ No code changes are required — `init_client()` detects the packages at runtime | `LD_API_BASE_URI` | No | Evaluations management API host override; intentionally separate from `LD_BASE_URI` | | `LD_UI_BASE_URI` | No | LaunchDarkly application host for evaluation-run links (default: `https://app.launchdarkly.com`). Set it for a non-production project, or its runs still link to the production app | +`init_client()` also sets the `launchdarkly.project_id` resource attribute to the resolved SDK key, not the project's ID. + ### Run an evaluation from code (experimental) > **Experimental.** Import Evaluations from Code from `launchdarkly_ai_server.experimental.evaluations`; diff --git a/packages/client/agents.md b/packages/client/agents.md index 3eea9a15..06645f78 100644 --- a/packages/client/agents.md +++ b/packages/client/agents.md @@ -853,6 +853,7 @@ pip install "launchdarkly-ai-python[otel]" **Other env vars / options read by `init_client()`:** - `LD_SERVICE_NAME` / `options["serviceName"]` — sets `service.name` resource attribute (default: `'python-sdk'`) - `LD_ENVIRONMENT` / `options["environment"]` — sets `deployment.environment` resource attribute +- Not configurable: the `launchdarkly.project_id` resource attribute is always set to the resolved SDK key, not the project's ID **Graceful degradation:** if any OTel package is missing, telemetry is silently skipped and a `logger.warning` is emitted. The LD client still initializes and all AI API calls work normally.