comet-ml/opik-skills / skills/opik
opik
VerifiedReference for the Opik SDK — tracing, span types, framework integrations, threads, and the prompt library (Python, TypeScript, REST). Use for "what span types exist", "how do I flush", "track_openai", "add OpikTracer", "version a prompt". To instrument a repo end to end, use the `opik-instrument` skill.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.3 KB |
| references/agent-patterns.md | markdown | 17.1 KB |
| references/best-practices.md | markdown | 4.8 KB |
| references/evaluation-datasets.md | markdown | 16.9 KB |
| references/evaluation-test-suites.md | markdown | 16.8 KB |
| references/integrations.md | markdown | 15.1 KB |
| references/observability.md | markdown | 2.3 KB |
| references/production.md | markdown | 11.4 KB |
| references/tracing-python.md | markdown | 23.0 KB |
| references/tracing-rest-api.md | markdown | 9.3 KB |
| references/tracing-typescript.md | markdown | 10.5 KB |
references/observability.md
View on GitHub# LLM Observability Core Concepts
Keep this mental model in mind when integrating Opik into an agent or LLM app.
## Trace Boundaries
A trace should represent one complete interaction or workflow run.
Good defaults:
- one user message -> one agent response
- one API request -> one API response
- one workflow execution -> one trace
Avoid:
- one trace across multiple chat turns
- unrelated work in the same trace
- overly granular traces when spans are enough
## Spans
Spans are the steps inside a trace. Use them to break the run into meaningful operations.
Valid span types:
- `general`: orchestration or custom logic
- `llm`: model calls
- `tool`: tools, retrieval, external calls
- `guardrail`: validation or safety checks
Integration rule:
- use descriptive names
- set the right span type
- end spans when the operation completes
## Threads
Use `thread_id` to group multiple traces into one conversation or multi-step workflow.
Use threads for:
- chat agents
- support conversations
- workflows that continue across multiple user interactions
Do not use one trace for multiple turns. Use one trace per turn and share the same `thread_id`.
For concrete usage, see `SKILL.md` and `references/tracing-python.md`.
## Metadata and Tags
Use metadata and tags to make traces filterable and comparable later.
Good metadata examples:
- user or session identifiers
- environment
- experiment or rollout variant
- model version
- business context
Good tag examples:
- `production`
- `customer-support`
- `rag`
- `needs-review`
## Feedback Scores
Feedback scores are useful when you want to attach quality signals to traces.
Common sources:
- user feedback
- human review
- automated evaluation
- heuristics or post-processing
For concrete trace update patterns, see `references/tracing-python.md`.
## Distributed Tracing
If one request crosses service boundaries, propagate trace headers so downstream work stays connected to the same overall trace.
For concrete propagation examples with `get_distributed_trace_headers()` and `distributed_headers`, see `references/tracing-python.md`.
## Sensitive Data
Be careful about what you log.
- do not log secrets or credentials
- avoid raw PII unless you explicitly need it
- prefer anonymization or selective logging for sensitive data
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |