{"record":{"id":"73da569a96aa9a16","repo":"BerriAI/litellm","slug":"wandb-project-id-must-be-set-for-weave-opentelemet","errorCode":null,"errorMessage":"WANDB_PROJECT_ID must be set for Weave OpenTelemetry integration. Format: <entity>/<project_name>","messagePattern":"WANDB_PROJECT_ID must be set for Weave OpenTelemetry integration\\. Format: <entity>/<project_name>","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/weave/weave_otel.py","lineNumber":142,"sourceCode":"        WANDB_API_KEY: Required. W&B API key for authentication.\n        WANDB_PROJECT_ID: Required. Project ID in format <entity>/<project_name>.\n        WANDB_HOST: Optional. Custom Weave host URL. Defaults to cloud endpoint.\n\n    Returns:\n        WeaveOtelConfig: A Pydantic model containing Weave OTEL configuration.\n\n    Raises:\n        ValueError: If required environment variables are missing.\n    \"\"\"\n    api_key: Final = os.getenv(\"WANDB_API_KEY\")\n    project_id: Final = os.getenv(\"WANDB_PROJECT_ID\")\n    host = os.getenv(\"WANDB_HOST\")\n\n    if not api_key:\n        raise ValueError(\"WANDB_API_KEY must be set for Weave OpenTelemetry integration.\")\n\n    if not project_id:\n        raise ValueError(\n            \"WANDB_PROJECT_ID must be set for Weave OpenTelemetry integration. Format: <entity>/<project_name>\"\n        )\n\n    if host:\n        if not host.startswith(\"http\"):\n            host = \"https://\" + host\n        # Self-managed instances use a different path\n        endpoint = host.rstrip(\"/\") + WEAVE_OTEL_ENDPOINT\n        verbose_logger.debug(\"Using Weave OTEL endpoint from host: %s\", endpoint)\n    else:\n        endpoint = WEAVE_BASE_URL + WEAVE_OTEL_ENDPOINT\n        verbose_logger.debug(\"Using Weave cloud endpoint: %s\", endpoint)\n\n    # Weave uses Basic auth with format: api:<WANDB_API_KEY>\n    auth_header: Final = _get_weave_authorization_header(api_key=api_key)\n    otlp_auth_headers: Final = f\"Authorization={auth_header},project_id={project_id}\"\n\n    # Set standard OTEL environment variables","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/integrations/weave/weave_otel.py#L124-L160","documentation":"Configuration guard for Weave OpenTelemetry: WANDB_PROJECT_ID is not set (or malformed). It must be '<entity>/<project_name>' so the exporter knows which W&B project to trace into.","triggerScenarios":"Enabling Weave OpenTelemetry export without WANDB_PROJECT_ID set.","commonSituations":"Only WANDB_API_KEY set; project id omitted or in the wrong format.","solutions":["Set WANDB_PROJECT_ID in the format <entity>/<project_name>."],"exampleFix":"export WANDB_PROJECT_ID=myteam/my_project","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}