You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fcaad91
Browse filesBrowse the repository at this point in the historyBrowse files
feat(langy): trace opencode worker activity into the user's project (tagged "langy") (#4541)
* feat(langy): trace opencode worker activity into the user's project (tagged "langy")
opencode has no native OpenTelemetry export (anomalyco/opencode#12142,
#14246, #14697), so the per-session worker now loads the pinned
@devtheops/opencode-plugin-otel plugin, which emits session/llm/tool
spans over OTLP http/protobuf to LangWatch's existing
/api/otel/v1/traces, authenticated with the project's dedicated Langy
key (resolves its own project — no X-Project-Id).
The plugin tags via OTLP *resource* attributes, but ingestion only
mapped the reserved tag.tags->labels / langwatch.thread.id->thread_id
keys from *span* attributes. So otel.traces.ts now hoists reserved
metadata keys found in resource attributes too (coercing tag.tags to a
string[] for labels), additively and guarded so a malformed resource
attribute can never break ingestion. This is what makes Langy's traces
land labeled "langy" and grouped by conversation.
No new REST endpoints (reuses /api/otel/v1/traces). Spec +
resource-attribute integration tests added.
Closes #4536. Part of epic #4528.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
* fix(tracer): keep telemetry.sdk.* resource attrs as custom metadata
Hoisting reserved keys from resource attributes also swept the standard
telemetry.sdk.* provenance attributes (present on every OTLP trace) into
reservedTraceMetadata, changing customMetadata platform-wide and breaking
otel.traces.test.ts. Exclude the telemetry.sdk.* family so the change
stays scoped to the trace-identity keys Langy needs.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
* fix(langy): align langy-route-auth test with post-#4558 gate removal
PR #4558 dropped the staff + flag gate from the Langy route, so the
non-staff scenario can no longer return 403 with "Langy is not
currently enabled" — the route lets the request through and the
handler 500s in the no-DB test env. The assertion was stale.
Flip the test to anti-regress the removal: pin that NO caller (staff
or not, flag on or off) sees the old gate string and isEnabled is
never consulted. A re-introduction of the gate would fail loudly.
Carries no behavioural change to the OTel work in this PR; this is
unblocking the rebase since the test was already broken on the
current langy/per-session-manager head.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* fix(langy): align ProjectLangyLayout visibility tests with #4558 gate removal
useShowLangy stopped reading isLangwatchStaff and the rollout flag in
#4558 — Langy now shows for any team member regardless. The two tests
flipping gate.staff/flagEnabled and asserting the drawer is null were
asserting the pre-#4558 contract and so failed in test-integration (6).
Flip both to anti-regress the removal: a team member sees Langy even
with the rollout flag off and even when not staff. A re-introduction
of either gate would fail loudly. Same pattern as the route-auth fix
in 3a15bd9.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
0 commit comments