@bluefly/openstandardagents 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +1 -1
- package/.github/AGENTS.md +245 -0
- package/.github/agents/github-issue-triage.ossa.yaml +99 -0
- package/.github/agents/github-pr-triage.ossa.yaml +137 -0
- package/.github/workflows/issue-sync-to-gitlab.yml +138 -0
- package/.github/workflows/pr-triage-to-gitlab.yml +164 -0
- package/.version.json +1 -1
- package/.wiki-config.json +1 -1
- package/CHANGELOG.md +33 -0
- package/CONTRIBUTING.md +102 -3
- package/README.md +17 -10
- package/dist/services/release-automation/schemas/release.schema.js +1 -1
- package/dist/services/release-automation/webhook.service.js +3 -3
- package/dist/services/release-automation/webhook.service.js.map +1 -1
- package/dist/services/runtime/claude/claude-adapter.d.ts +1 -1
- package/dist/services/runtime/claude/claude-adapter.d.ts.map +1 -1
- package/dist/services/runtime/claude/claude-adapter.js +1 -1
- package/dist/services/runtime/claude/claude-adapter.js.map +1 -1
- package/dist/spec/v0.2.9/a2a-protocol.md +1337 -0
- package/dist/spec/v0.2.9/agent.md +1946 -0
- package/dist/spec/v0.2.9/capabilities/index.yaml +25 -0
- package/dist/spec/v0.2.9/capabilities/memory.yaml +251 -0
- package/dist/spec/v0.2.9/capability-schema.md +576 -0
- package/dist/spec/v0.2.9/compliance-profiles.md +533 -0
- package/dist/spec/v0.2.9/conformance-testing.md +1527 -0
- package/dist/spec/v0.2.9/gitlab-duo-integration.md +621 -0
- package/dist/spec/v0.2.9/ossa-0.2.9.schema.json +3699 -0
- package/dist/spec/v0.2.9/runtime-semantics.md +464 -0
- package/dist/spec/v0.2.9/security-model.md +1245 -0
- package/dist/spec/v0.2.9/semantic-conventions.md +347 -0
- package/dist/spec/v0.2.9/types.ts +522 -0
- package/dist/types/policy.d.ts +377 -0
- package/dist/types/policy.d.ts.map +1 -0
- package/dist/types/policy.js +84 -0
- package/dist/types/policy.js.map +1 -0
- package/dist/utils/version.js +1 -1
- package/docs/specs/policy-dsl.md +925 -0
- package/examples/adk-integration/code-review-workflow.yml +1 -1
- package/examples/adk-integration/customer-support.yml +1 -1
- package/examples/adk-integration/data-pipeline.yml +1 -1
- package/examples/advanced/reasoning-agent.yaml +136 -0
- package/examples/advanced/workflows/hybrid-model-strategy.yaml +1 -1
- package/examples/agent-manifests/critics/critic-agent.yaml +1 -1
- package/examples/agent-manifests/governors/governor-agent.yaml +1 -1
- package/examples/agent-manifests/integrators/integrator-agent.yaml +1 -1
- package/examples/agent-manifests/judges/judge-agent.yaml +1 -1
- package/examples/agent-manifests/monitors/monitor-agent.yaml +1 -1
- package/examples/agent-manifests/orchestrators/orchestrator-agent.yaml +1 -1
- package/examples/agent-manifests/sample-compliant-agent.yaml +1 -1
- package/examples/agent-manifests/workers/worker-agent.yaml +1 -1
- package/examples/agents-md/code-agent.ossa.json +100 -0
- package/examples/agents-md/monorepo-agent.ossa.yaml +180 -0
- package/examples/anthropic/claude-assistant.ossa.json +1 -1
- package/examples/autogen/multi-agent.ossa.json +1 -1
- package/examples/claude-code/code-reviewer.ossa.yaml +1 -1
- package/examples/claude-code/ossa-validator.ossa.yaml +2 -2
- package/examples/common_npm/agent-router.ossa.yaml +1 -1
- package/examples/common_npm/agent-router.v0.2.2.ossa.yaml +1 -1
- package/examples/crewai/research-team.ossa.json +1 -1
- package/examples/cursor/code-review-agent.ossa.json +1 -1
- package/examples/drupal/gitlab-ml-recommender.ossa.yaml +1 -1
- package/examples/drupal/gitlab-ml-recommender.v0.2.2.ossa.yaml +1 -1
- package/examples/extensions/agents-md-v1.yml +175 -0
- package/examples/extensions/drupal-v1.yml +1 -1
- package/examples/extensions/kagent-v1.yml +1 -1
- package/examples/getting-started/hello-world-complete.ossa.yaml +1 -1
- package/examples/integration-patterns/agent-to-agent-orchestration.ossa.yaml +4 -4
- package/examples/kagent/compliance-validator.ossa.yaml +1 -1
- package/examples/kagent/cost-optimizer.ossa.yaml +1 -1
- package/examples/kagent/documentation-agent.ossa.yaml +1 -1
- package/examples/kagent/k8s-troubleshooter-v1.ossa.yaml +1 -1
- package/examples/kagent/k8s-troubleshooter-v1.v0.2.2.ossa.yaml +1 -1
- package/examples/kagent/k8s-troubleshooter.ossa.yaml +1 -1
- package/examples/kagent/security-scanner.ossa.yaml +1 -1
- package/examples/langchain/chain-agent.ossa.json +1 -1
- package/examples/langflow/workflow-agent.ossa.json +1 -1
- package/examples/langgraph/state-machine-agent.ossa.json +1 -1
- package/examples/llamaindex/rag-agent.ossa.json +1 -1
- package/examples/migration-guides/from-langchain-to-ossa.yaml +4 -4
- package/examples/multi-agent/conditional-router.ossa.yaml +1 -1
- package/examples/multi-agent/parallel-execution.ossa.yaml +1 -1
- package/examples/multi-agent/sequential-pipeline.ossa.yaml +1 -1
- package/examples/openai/basic-agent.ossa.yaml +1 -1
- package/examples/openai/multi-tool-agent.ossa.json +1 -1
- package/examples/openai/swarm-agent.ossa.json +1 -1
- package/examples/production/document-analyzer-openai.yml +1 -1
- package/examples/quickstart/support-agent.ossa.yaml +1 -1
- package/examples/templates/ossa-compliance.yaml +1 -1
- package/examples/vercel/edge-agent.ossa.json +1 -1
- package/llms.txt +1 -1
- package/package.json +5 -3
- package/scripts/README.md +25 -0
- package/scripts/compliance-audit.ts +796 -0
- package/scripts/generate-agents-catalog.ts +2 -1
- package/scripts/generate-api-docs.ts +2 -1
- package/scripts/generate-examples-docs.ts +2 -1
- package/scripts/generate-llms-ctx.sh +2 -2
- package/spec/v0.2.9/a2a-protocol.md +1337 -0
- package/spec/v0.2.9/agent.md +1946 -0
- package/spec/v0.2.9/capabilities/index.yaml +25 -0
- package/spec/v0.2.9/capabilities/memory.yaml +251 -0
- package/spec/v0.2.9/capability-schema.md +576 -0
- package/spec/v0.2.9/compliance-profiles.md +533 -0
- package/spec/v0.2.9/conformance-testing.md +1527 -0
- package/spec/v0.2.9/gitlab-duo-integration.md +621 -0
- package/spec/v0.2.9/ossa-0.2.9.schema.json +3699 -0
- package/spec/v0.2.9/runtime-semantics.md +464 -0
- package/spec/v0.2.9/security-model.md +1245 -0
- package/spec/v0.2.9/semantic-conventions.md +347 -0
- package/spec/v0.2.9/types.ts +522 -0
- package/test-results/junit.xml +184 -146
- package/.github/workflows/pr-comment.yml +0 -33
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
# OSSA OpenTelemetry Semantic Conventions
|
|
2
|
+
|
|
3
|
+
**Version**: 0.2.9
|
|
4
|
+
**Status**: Draft
|
|
5
|
+
**Last Updated**: 2025-12-04
|
|
6
|
+
|
|
7
|
+
This document defines the semantic conventions for OpenTelemetry instrumentation of OSSA-compliant agents. These conventions ensure consistent observability across all agent implementations.
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
OSSA semantic conventions extend the [OpenTelemetry GenAI Semantic Conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/) with agent-specific attributes for multi-instance debugging, session tracking, and capability tracing.
|
|
12
|
+
|
|
13
|
+
## Namespace Hierarchy
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
gen_ai.* # Standard GenAI conventions (OTel GenAI SIG)
|
|
17
|
+
ossa.* # OSSA-specific extensions
|
|
18
|
+
ossa.agent.* # Agent identity attributes
|
|
19
|
+
ossa.session.* # Session/conversation tracking
|
|
20
|
+
ossa.interaction.* # Per-turn tracking
|
|
21
|
+
ossa.capability.* # Tool/capability invocation
|
|
22
|
+
ossa.state.* # State management
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Required Attributes
|
|
26
|
+
|
|
27
|
+
### Agent Identity (from spec.identity)
|
|
28
|
+
|
|
29
|
+
| Attribute | Type | Description | Example |
|
|
30
|
+
|-----------|------|-------------|---------|
|
|
31
|
+
| `ossa.agent.id` | string | Agent definition ID from manifest | `review-agent` |
|
|
32
|
+
| `ossa.agent.name` | string | Human-readable agent name | `Code Review Agent` |
|
|
33
|
+
| `ossa.agent.version` | string | Agent manifest version (semver) | `1.2.0` |
|
|
34
|
+
| `ossa.instance.id` | string | Runtime instance UUID | `550e8400-e29b-41d4-a716-446655440000` |
|
|
35
|
+
|
|
36
|
+
### Session & Interaction Tracking
|
|
37
|
+
|
|
38
|
+
| Attribute | Type | Description | Example |
|
|
39
|
+
|-----------|------|-------------|---------|
|
|
40
|
+
| `ossa.session.id` | string | Conversation/workflow session ID | `uuid-v4` |
|
|
41
|
+
| `ossa.interaction.id` | string | Per-turn interaction ID | `uuid-v4` |
|
|
42
|
+
| `ossa.turn.number` | int | Turn number within session | `3` |
|
|
43
|
+
|
|
44
|
+
## GenAI Standard Attributes
|
|
45
|
+
|
|
46
|
+
OSSA agents MUST emit standard GenAI attributes:
|
|
47
|
+
|
|
48
|
+
### Request Attributes
|
|
49
|
+
|
|
50
|
+
| Attribute | Type | Description | Example |
|
|
51
|
+
|-----------|------|-------------|---------|
|
|
52
|
+
| `gen_ai.system` | string | AI system identifier | `ossa` |
|
|
53
|
+
| `gen_ai.request.model` | string | Model identifier | `claude-sonnet-4-20250514` |
|
|
54
|
+
| `gen_ai.request.max_tokens` | int | Max tokens requested | `4096` |
|
|
55
|
+
| `gen_ai.request.temperature` | float | Sampling temperature | `0.7` |
|
|
56
|
+
| `gen_ai.request.top_p` | float | Top-p sampling | `0.9` |
|
|
57
|
+
|
|
58
|
+
### Response Attributes
|
|
59
|
+
|
|
60
|
+
| Attribute | Type | Description | Example |
|
|
61
|
+
|-----------|------|-------------|---------|
|
|
62
|
+
| `gen_ai.response.id` | string | Provider response ID | `chatcmpl-abc123` |
|
|
63
|
+
| `gen_ai.response.model` | string | Actual model used | `claude-sonnet-4-20250514` |
|
|
64
|
+
| `gen_ai.response.finish_reason` | string | Completion reason | `stop`, `length`, `tool_use` |
|
|
65
|
+
| `gen_ai.usage.input_tokens` | int | Input token count | `1523` |
|
|
66
|
+
| `gen_ai.usage.output_tokens` | int | Output token count | `892` |
|
|
67
|
+
| `gen_ai.usage.total_tokens` | int | Total tokens | `2415` |
|
|
68
|
+
|
|
69
|
+
## OSSA Extension Attributes
|
|
70
|
+
|
|
71
|
+
### Capability/Tool Tracking
|
|
72
|
+
|
|
73
|
+
| Attribute | Type | Description | Example |
|
|
74
|
+
|-----------|------|-------------|---------|
|
|
75
|
+
| `ossa.capability.name` | string | Capability being invoked | `code_review` |
|
|
76
|
+
| `ossa.capability.version` | string | Capability version | `2.1` |
|
|
77
|
+
| `ossa.tool.name` | string | Tool name | `gitlab-api` |
|
|
78
|
+
| `ossa.tool.type` | string | Tool transport type | `mcp`, `http`, `function` |
|
|
79
|
+
| `ossa.tool.source` | string | Tool source URI | `mcp://gitlab/api` |
|
|
80
|
+
|
|
81
|
+
### State Management
|
|
82
|
+
|
|
83
|
+
| Attribute | Type | Description | Example |
|
|
84
|
+
|-----------|------|-------------|---------|
|
|
85
|
+
| `ossa.state.mode` | string | State persistence mode | `session`, `persistent`, `none` |
|
|
86
|
+
| `ossa.state.storage_type` | string | Storage backend type | `redis`, `postgres`, `vector-db` |
|
|
87
|
+
| `ossa.state.ttl_seconds` | int | State TTL | `3600` |
|
|
88
|
+
|
|
89
|
+
### Reasoning (from spec.reasoning)
|
|
90
|
+
|
|
91
|
+
| Attribute | Type | Description | Example |
|
|
92
|
+
|-----------|------|-------------|---------|
|
|
93
|
+
| `ossa.reasoning.strategy` | string | Reasoning strategy | `react`, `cot`, `tree_of_thought` |
|
|
94
|
+
| `ossa.reasoning.step` | int | Current reasoning step | `3` |
|
|
95
|
+
| `ossa.reasoning.max_steps` | int | Maximum steps allowed | `10` |
|
|
96
|
+
| `ossa.reasoning.depth` | int | Tree depth (for ToT) | `2` |
|
|
97
|
+
|
|
98
|
+
### Multi-Agent Collaboration
|
|
99
|
+
|
|
100
|
+
| Attribute | Type | Description | Example |
|
|
101
|
+
|-----------|------|-------------|---------|
|
|
102
|
+
| `ossa.delegation.target` | string | Target agent ID | `specialist-agent` |
|
|
103
|
+
| `ossa.delegation.type` | string | Delegation pattern | `handoff`, `parallel`, `supervisor` |
|
|
104
|
+
| `ossa.parent.agent.id` | string | Parent agent (if delegated) | `orchestrator` |
|
|
105
|
+
| `ossa.parent.interaction.id` | string | Parent interaction ID | `uuid-v4` |
|
|
106
|
+
|
|
107
|
+
## Span Naming Conventions
|
|
108
|
+
|
|
109
|
+
### Span Names
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
ossa.agent.invoke # Agent invocation
|
|
113
|
+
ossa.agent.turn # Single turn (prompt → response)
|
|
114
|
+
ossa.tool.call # Tool/capability invocation
|
|
115
|
+
ossa.reasoning.step # Individual reasoning step
|
|
116
|
+
ossa.delegation.handoff # Agent-to-agent handoff
|
|
117
|
+
ossa.state.load # State retrieval
|
|
118
|
+
ossa.state.save # State persistence
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Span Hierarchy
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
ossa.agent.invoke (root)
|
|
125
|
+
├── ossa.agent.turn
|
|
126
|
+
│ ├── gen_ai.chat # LLM call
|
|
127
|
+
│ ├── ossa.tool.call # Tool execution
|
|
128
|
+
│ │ └── http.request # External call
|
|
129
|
+
│ └── ossa.reasoning.step
|
|
130
|
+
│ └── gen_ai.chat # Reasoning LLM call
|
|
131
|
+
└── ossa.state.save # Persist state
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Span Links (Multi-Agent)
|
|
135
|
+
|
|
136
|
+
For agent-to-agent communication, use span links instead of parent-child:
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
// Agent handoff creates a link, not a child span
|
|
140
|
+
span.addLink({
|
|
141
|
+
context: parentAgentSpanContext,
|
|
142
|
+
attributes: {
|
|
143
|
+
'ossa.link.type': 'delegation',
|
|
144
|
+
'ossa.link.source_agent': 'orchestrator',
|
|
145
|
+
'ossa.link.target_agent': 'specialist'
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## W3C Baggage Propagation
|
|
151
|
+
|
|
152
|
+
OSSA agents SHOULD propagate context via W3C Baggage:
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
baggage: ossa.session.id=abc123,ossa.workflow.id=workflow-456,ossa.tenant.id=customer-789
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Standard Baggage Keys
|
|
159
|
+
|
|
160
|
+
| Key | Description |
|
|
161
|
+
|-----|-------------|
|
|
162
|
+
| `ossa.session.id` | Session identifier |
|
|
163
|
+
| `ossa.workflow.id` | Workflow identifier |
|
|
164
|
+
| `ossa.tenant.id` | Multi-tenant isolation |
|
|
165
|
+
| `ossa.environment` | Environment (dev/staging/prod) |
|
|
166
|
+
|
|
167
|
+
## Metrics
|
|
168
|
+
|
|
169
|
+
### Required Metrics
|
|
170
|
+
|
|
171
|
+
| Metric | Type | Unit | Description |
|
|
172
|
+
|--------|------|------|-------------|
|
|
173
|
+
| `ossa.agent.invocations` | Counter | 1 | Total agent invocations |
|
|
174
|
+
| `ossa.agent.turns` | Counter | 1 | Total turns processed |
|
|
175
|
+
| `ossa.agent.errors` | Counter | 1 | Total errors |
|
|
176
|
+
| `ossa.agent.latency` | Histogram | ms | Turn latency |
|
|
177
|
+
| `ossa.tokens.input` | Counter | 1 | Input tokens consumed |
|
|
178
|
+
| `ossa.tokens.output` | Counter | 1 | Output tokens generated |
|
|
179
|
+
| `ossa.tool.calls` | Counter | 1 | Tool invocations |
|
|
180
|
+
| `ossa.tool.errors` | Counter | 1 | Tool failures |
|
|
181
|
+
|
|
182
|
+
### Metric Attributes
|
|
183
|
+
|
|
184
|
+
All metrics SHOULD include:
|
|
185
|
+
- `ossa.agent.id`
|
|
186
|
+
- `ossa.agent.version`
|
|
187
|
+
- `gen_ai.request.model`
|
|
188
|
+
|
|
189
|
+
### Cardinality Control
|
|
190
|
+
|
|
191
|
+
To prevent metric explosion:
|
|
192
|
+
- Do NOT use `ossa.instance.id` as metric attribute
|
|
193
|
+
- Do NOT use `ossa.session.id` as metric attribute
|
|
194
|
+
- Do NOT use `ossa.interaction.id` as metric attribute
|
|
195
|
+
|
|
196
|
+
Use these only in traces and logs.
|
|
197
|
+
|
|
198
|
+
## Example: Instrumented Agent Turn
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
import { trace, metrics, context, propagation } from '@opentelemetry/api';
|
|
202
|
+
|
|
203
|
+
const tracer = trace.getTracer('ossa-agent', '0.2.9');
|
|
204
|
+
const meter = metrics.getMeter('ossa-agent', '0.2.9');
|
|
205
|
+
|
|
206
|
+
// Metrics
|
|
207
|
+
const invocationCounter = meter.createCounter('ossa.agent.invocations');
|
|
208
|
+
const latencyHistogram = meter.createHistogram('ossa.agent.latency');
|
|
209
|
+
|
|
210
|
+
async function processAgentTurn(input: string, agentManifest: OSSAManifest) {
|
|
211
|
+
const startTime = Date.now();
|
|
212
|
+
|
|
213
|
+
return tracer.startActiveSpan('ossa.agent.turn', async (span) => {
|
|
214
|
+
// Set identity attributes
|
|
215
|
+
span.setAttributes({
|
|
216
|
+
'gen_ai.system': 'ossa',
|
|
217
|
+
'ossa.agent.id': agentManifest.metadata.name,
|
|
218
|
+
'ossa.agent.version': agentManifest.metadata.version,
|
|
219
|
+
'ossa.instance.id': runtime.instanceId,
|
|
220
|
+
'ossa.session.id': session.id,
|
|
221
|
+
'ossa.interaction.id': generateUUID(),
|
|
222
|
+
'ossa.turn.number': session.turnCount,
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
// Extract baggage for multi-agent context
|
|
226
|
+
const baggage = propagation.getBaggage(context.active());
|
|
227
|
+
if (baggage) {
|
|
228
|
+
const workflowId = baggage.getEntry('ossa.workflow.id');
|
|
229
|
+
if (workflowId) {
|
|
230
|
+
span.setAttribute('ossa.workflow.id', workflowId.value);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
try {
|
|
235
|
+
// LLM call span
|
|
236
|
+
const response = await tracer.startActiveSpan('gen_ai.chat', async (llmSpan) => {
|
|
237
|
+
llmSpan.setAttributes({
|
|
238
|
+
'gen_ai.request.model': agentManifest.spec.llm.model,
|
|
239
|
+
'gen_ai.request.max_tokens': agentManifest.spec.llm.parameters?.max_tokens,
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
const result = await llmProvider.chat(input);
|
|
243
|
+
|
|
244
|
+
llmSpan.setAttributes({
|
|
245
|
+
'gen_ai.response.finish_reason': result.finish_reason,
|
|
246
|
+
'gen_ai.usage.input_tokens': result.usage.input_tokens,
|
|
247
|
+
'gen_ai.usage.output_tokens': result.usage.output_tokens,
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
llmSpan.end();
|
|
251
|
+
return result;
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
// Record metrics
|
|
255
|
+
invocationCounter.add(1, {
|
|
256
|
+
'ossa.agent.id': agentManifest.metadata.name,
|
|
257
|
+
'gen_ai.request.model': agentManifest.spec.llm.model,
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
latencyHistogram.record(Date.now() - startTime, {
|
|
261
|
+
'ossa.agent.id': agentManifest.metadata.name,
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
span.setStatus({ code: SpanStatusCode.OK });
|
|
265
|
+
return response;
|
|
266
|
+
|
|
267
|
+
} catch (error) {
|
|
268
|
+
span.setStatus({ code: SpanStatusCode.ERROR, message: error.message });
|
|
269
|
+
span.recordException(error);
|
|
270
|
+
throw error;
|
|
271
|
+
} finally {
|
|
272
|
+
span.end();
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
## TypeScript Types
|
|
279
|
+
|
|
280
|
+
```typescript
|
|
281
|
+
// Semantic convention attribute names
|
|
282
|
+
export const OSSAAttributes = {
|
|
283
|
+
// Agent Identity
|
|
284
|
+
AGENT_ID: 'ossa.agent.id',
|
|
285
|
+
AGENT_NAME: 'ossa.agent.name',
|
|
286
|
+
AGENT_VERSION: 'ossa.agent.version',
|
|
287
|
+
INSTANCE_ID: 'ossa.instance.id',
|
|
288
|
+
|
|
289
|
+
// Session & Interaction
|
|
290
|
+
SESSION_ID: 'ossa.session.id',
|
|
291
|
+
INTERACTION_ID: 'ossa.interaction.id',
|
|
292
|
+
TURN_NUMBER: 'ossa.turn.number',
|
|
293
|
+
|
|
294
|
+
// Capability
|
|
295
|
+
CAPABILITY_NAME: 'ossa.capability.name',
|
|
296
|
+
CAPABILITY_VERSION: 'ossa.capability.version',
|
|
297
|
+
TOOL_NAME: 'ossa.tool.name',
|
|
298
|
+
TOOL_TYPE: 'ossa.tool.type',
|
|
299
|
+
|
|
300
|
+
// Reasoning
|
|
301
|
+
REASONING_STRATEGY: 'ossa.reasoning.strategy',
|
|
302
|
+
REASONING_STEP: 'ossa.reasoning.step',
|
|
303
|
+
REASONING_MAX_STEPS: 'ossa.reasoning.max_steps',
|
|
304
|
+
|
|
305
|
+
// State
|
|
306
|
+
STATE_MODE: 'ossa.state.mode',
|
|
307
|
+
STATE_STORAGE_TYPE: 'ossa.state.storage_type',
|
|
308
|
+
|
|
309
|
+
// Delegation
|
|
310
|
+
DELEGATION_TARGET: 'ossa.delegation.target',
|
|
311
|
+
DELEGATION_TYPE: 'ossa.delegation.type',
|
|
312
|
+
PARENT_AGENT_ID: 'ossa.parent.agent.id',
|
|
313
|
+
} as const;
|
|
314
|
+
|
|
315
|
+
export type OSSAAttributeKey = typeof OSSAAttributes[keyof typeof OSSAAttributes];
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
## Integration with Observability Platforms
|
|
319
|
+
|
|
320
|
+
### GitLab Ultimate
|
|
321
|
+
|
|
322
|
+
```yaml
|
|
323
|
+
# gitlab-ci.yml observability config
|
|
324
|
+
variables:
|
|
325
|
+
OTEL_EXPORTER_OTLP_ENDPOINT: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/observability/v1/traces"
|
|
326
|
+
OTEL_EXPORTER_OTLP_HEADERS: "PRIVATE-TOKEN=${CI_JOB_TOKEN}"
|
|
327
|
+
OTEL_SERVICE_NAME: "ossa-agents"
|
|
328
|
+
OTEL_RESOURCE_ATTRIBUTES: "deployment.environment=${CI_ENVIRONMENT_NAME}"
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### SigNoz / Jaeger
|
|
332
|
+
|
|
333
|
+
```typescript
|
|
334
|
+
// Configure OTLP exporter
|
|
335
|
+
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
|
|
336
|
+
|
|
337
|
+
const exporter = new OTLPTraceExporter({
|
|
338
|
+
url: process.env.OTEL_EXPORTER_OTLP_ENDPOINT || 'http://localhost:4318/v1/traces',
|
|
339
|
+
});
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
## References
|
|
343
|
+
|
|
344
|
+
- [OpenTelemetry GenAI Semantic Conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/)
|
|
345
|
+
- [W3C Trace Context](https://www.w3.org/TR/trace-context/)
|
|
346
|
+
- [W3C Baggage](https://www.w3.org/TR/baggage/)
|
|
347
|
+
- [OSSA Specification v0.2.9](./ossa-0.2.9.schema.json)
|