Repository navigation
feat(observability): add Tencent Cloud CLS (AgentObs) integration via Langfuse SDK - #3165
Merged
Merged
Conversation
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.
Summary
Add Tencent Cloud CLS (AgentObs) observability integration to Octop via the native Langfuse SDK OTLP/HTTP export path:
CreateAgentApplication/DescribeAgentApplications): Use the customer's Tencent CloudSecretId/SecretKey(encrypted at rest viaSecretRepo) to auto-create or idempotently reuse a CLS AgentObs application in the target region and extract its traceTopicId.TopicIdsupport: Users can list & pick an existing CLS application from their account or paste an existing traceTopicIddirectly (also supports push-only sub-accounts with onlycls:pushLogpermission).OTLPSpanExportertohttps://{region}.cls.tencentcs.com/v1/traces(or internalcls.tencentyun.com) withAuthorization: Basic base64("{SecretId}:{SecretKey}")andtopic_idheader.AccessType="Langfuse"(default): preserves native Langfuse OTLP attributes, with an optional content-masking toggle (mask_content) to strip prompts/responses.AccessType="Agent": maps spans to redacted OpenTelemetrygen_ai.*monitoring attributes.OCTOP_AGENTOBS_ENABLEDenv-var fallback when neither CLS nor Langfuse is enabled in Dashboard settings.ClsObservabilitySettingsStoreintoAgentManagerwith hot reload (set_langfuse) and adds permission-gated endpoints under/api/admin/observability/cls*.Target branch
develop(feature / fix — default)main(release/*orhotfix/*only)Type of change
Test plan
pytest -q tests/unit/test_cls_observability.py tests/unit/test_langfuse_settings.py tests/unit/test_langfuse_env_names.py tests/unit/api/test_acl_gate_coverage.py(22 passed)ruff check,ruff format --check,mypyon modified observability modulesprettier,eslint,tsc --noEmit -p dashboard/tsconfig.app.json, andvite buildtests/unit/test_cls_observability.py)Checklist
.env.example,CHANGELOG.md,openapi_meta.py)