agent-observability-trace-cli 0.1.2__tar.gz
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.
- agent_observability_trace_cli-0.1.2/.github/CODEOWNERS +4 -0
- agent_observability_trace_cli-0.1.2/.github/ISSUE_TEMPLATE/bug_report.yml +56 -0
- agent_observability_trace_cli-0.1.2/.github/ISSUE_TEMPLATE/feature_request.yml +33 -0
- agent_observability_trace_cli-0.1.2/.github/dependabot.yml +18 -0
- agent_observability_trace_cli-0.1.2/.github/pull_request_template.md +24 -0
- agent_observability_trace_cli-0.1.2/.github/workflows/benchmark.yml +42 -0
- agent_observability_trace_cli-0.1.2/.github/workflows/ci.yml +83 -0
- agent_observability_trace_cli-0.1.2/.github/workflows/publish-pypi.yml +22 -0
- agent_observability_trace_cli-0.1.2/.github/workflows/release.yml +66 -0
- agent_observability_trace_cli-0.1.2/.github/workflows/scorecard.yml +34 -0
- agent_observability_trace_cli-0.1.2/.gitignore +64 -0
- agent_observability_trace_cli-0.1.2/.pre-commit-config.yaml +34 -0
- agent_observability_trace_cli-0.1.2/CHANGELOG.md +38 -0
- agent_observability_trace_cli-0.1.2/CONTRIBUTING.md +151 -0
- agent_observability_trace_cli-0.1.2/LICENSE +198 -0
- agent_observability_trace_cli-0.1.2/PKG-INFO +336 -0
- agent_observability_trace_cli-0.1.2/README.md +245 -0
- agent_observability_trace_cli-0.1.2/SECURITY.md +29 -0
- agent_observability_trace_cli-0.1.2/benchmarks/README.md +105 -0
- agent_observability_trace_cli-0.1.2/benchmarks/__init__.py +0 -0
- agent_observability_trace_cli-0.1.2/benchmarks/results/baseline.json +30 -0
- agent_observability_trace_cli-0.1.2/benchmarks/test_fidelity.py +228 -0
- agent_observability_trace_cli-0.1.2/benchmarks/test_ingestion.py +201 -0
- agent_observability_trace_cli-0.1.2/benchmarks/test_overhead.py +180 -0
- agent_observability_trace_cli-0.1.2/benchmarks/test_replay_vs_live.py +281 -0
- agent_observability_trace_cli-0.1.2/demos/record_replay_demo.py +133 -0
- agent_observability_trace_cli-0.1.2/docker/grafana/datasources/tempo.yaml +18 -0
- agent_observability_trace_cli-0.1.2/docker/tempo.yaml +17 -0
- agent_observability_trace_cli-0.1.2/docker-compose.yml +62 -0
- agent_observability_trace_cli-0.1.2/docs/assets/dev-to-demos/demo-1-record-replay.gif +0 -0
- agent_observability_trace_cli-0.1.2/docs/assets/dev-to-demos/demo-2-inspect.gif +0 -0
- agent_observability_trace_cli-0.1.2/docs/assets/dev-to-demos/demo-3-agent-native-json.gif +0 -0
- agent_observability_trace_cli-0.1.2/docs/concepts.md +249 -0
- agent_observability_trace_cli-0.1.2/docs/getting-started.md +353 -0
- agent_observability_trace_cli-0.1.2/docs/integrations/langgraph.md +499 -0
- agent_observability_trace_cli-0.1.2/docs/integrations/openai-agents.md +187 -0
- agent_observability_trace_cli-0.1.2/examples/01-basic-trace/README.md +60 -0
- agent_observability_trace_cli-0.1.2/examples/01-basic-trace/example.py +107 -0
- agent_observability_trace_cli-0.1.2/examples/02-langgraph-failure-replay/README.md +119 -0
- agent_observability_trace_cli-0.1.2/examples/02-langgraph-failure-replay/example.py +296 -0
- agent_observability_trace_cli-0.1.2/examples/03-ci-pipeline/README.md +120 -0
- agent_observability_trace_cli-0.1.2/examples/03-ci-pipeline/example.py +209 -0
- agent_observability_trace_cli-0.1.2/examples/03-ci-pipeline/test_with_fixture.py +87 -0
- agent_observability_trace_cli-0.1.2/examples/04-agno-agent-team/README.md +65 -0
- agent_observability_trace_cli-0.1.2/examples/04-agno-agent-team/example.py +269 -0
- agent_observability_trace_cli-0.1.2/examples/04-autogen-agent-observability/README.md +69 -0
- agent_observability_trace_cli-0.1.2/examples/04-autogen-agent-observability/example.py +145 -0
- agent_observability_trace_cli-0.1.2/examples/04-bedrock-record-replay/README.md +70 -0
- agent_observability_trace_cli-0.1.2/examples/04-bedrock-record-replay/example.py +142 -0
- agent_observability_trace_cli-0.1.2/examples/04-crewai-research-crew/README.md +62 -0
- agent_observability_trace_cli-0.1.2/examples/04-crewai-research-crew/example.py +190 -0
- agent_observability_trace_cli-0.1.2/examples/04-google-genai-thinking-config/README.md +46 -0
- agent_observability_trace_cli-0.1.2/examples/04-google-genai-thinking-config/example.py +187 -0
- agent_observability_trace_cli-0.1.2/examples/04-grpc-record-replay/README.md +68 -0
- agent_observability_trace_cli-0.1.2/examples/04-grpc-record-replay/echo.proto +23 -0
- agent_observability_trace_cli-0.1.2/examples/04-grpc-record-replay/echo_pb2.py +40 -0
- agent_observability_trace_cli-0.1.2/examples/04-grpc-record-replay/echo_pb2_grpc.py +186 -0
- agent_observability_trace_cli-0.1.2/examples/04-grpc-record-replay/example.py +91 -0
- agent_observability_trace_cli-0.1.2/examples/04-haystack-pipeline/README.md +69 -0
- agent_observability_trace_cli-0.1.2/examples/04-haystack-pipeline/example.py +156 -0
- agent_observability_trace_cli-0.1.2/examples/04-llama-index-agent-trace/README.md +68 -0
- agent_observability_trace_cli-0.1.2/examples/04-llama-index-agent-trace/example.py +105 -0
- agent_observability_trace_cli-0.1.2/examples/04-mcp-stdio-capture/README.md +98 -0
- agent_observability_trace_cli-0.1.2/examples/04-mcp-stdio-capture/example.py +82 -0
- agent_observability_trace_cli-0.1.2/examples/04-mcp-stdio-capture/mcp_server.py +29 -0
- agent_observability_trace_cli-0.1.2/examples/04-openai-agents-basic/README.md +121 -0
- agent_observability_trace_cli-0.1.2/examples/04-openai-agents-basic/example.py +224 -0
- agent_observability_trace_cli-0.1.2/examples/04-pydantic-ai-retry-diagnosis/README.md +100 -0
- agent_observability_trace_cli-0.1.2/examples/04-pydantic-ai-retry-diagnosis/example.py +138 -0
- agent_observability_trace_cli-0.1.2/examples/04-realtime-websocket-interceptor/README.md +90 -0
- agent_observability_trace_cli-0.1.2/examples/04-realtime-websocket-interceptor/example.py +108 -0
- agent_observability_trace_cli-0.1.2/examples/05-parallel-command-parent-routing/README.md +90 -0
- agent_observability_trace_cli-0.1.2/examples/05-parallel-command-parent-routing/example.py +215 -0
- agent_observability_trace_cli-0.1.2/examples/06-langgraph-handoff-parallel-tools/README.md +110 -0
- agent_observability_trace_cli-0.1.2/examples/06-langgraph-handoff-parallel-tools/example.py +245 -0
- agent_observability_trace_cli-0.1.2/examples/07-langgraph-invoke-vs-stream-timing/README.md +79 -0
- agent_observability_trace_cli-0.1.2/examples/07-langgraph-invoke-vs-stream-timing/example.py +150 -0
- agent_observability_trace_cli-0.1.2/examples/08-langgraph-react-agent-tool-arg-injection/README.md +95 -0
- agent_observability_trace_cli-0.1.2/examples/08-langgraph-react-agent-tool-arg-injection/example.py +219 -0
- agent_observability_trace_cli-0.1.2/examples/09-langgraph-dev-cli/README.md +154 -0
- agent_observability_trace_cli-0.1.2/examples/09-langgraph-dev-cli/graph.py +125 -0
- agent_observability_trace_cli-0.1.2/examples/09-langgraph-dev-cli/langgraph.json +7 -0
- agent_observability_trace_cli-0.1.2/examples/09-langgraph-dev-cli/simulate_dev_server.py +146 -0
- agent_observability_trace_cli-0.1.2/examples/10-langgraph-checkpointer-interrupt-resume/README.md +70 -0
- agent_observability_trace_cli-0.1.2/examples/10-langgraph-checkpointer-interrupt-resume/example.py +310 -0
- agent_observability_trace_cli-0.1.2/examples/11-langgraph-react-agent-non-openai-finish-reason/README.md +35 -0
- agent_observability_trace_cli-0.1.2/examples/11-langgraph-react-agent-non-openai-finish-reason/example.py +142 -0
- agent_observability_trace_cli-0.1.2/examples/12-langgraph-structured-response-tool-conflict/README.md +33 -0
- agent_observability_trace_cli-0.1.2/examples/12-langgraph-structured-response-tool-conflict/example.py +169 -0
- agent_observability_trace_cli-0.1.2/examples/13-langgraph-streaming-token-usage/README.md +31 -0
- agent_observability_trace_cli-0.1.2/examples/13-langgraph-streaming-token-usage/example.py +124 -0
- agent_observability_trace_cli-0.1.2/examples/14-openai-responses-api-tool-call/README.md +40 -0
- agent_observability_trace_cli-0.1.2/examples/14-openai-responses-api-tool-call/example.py +125 -0
- agent_observability_trace_cli-0.1.2/examples/15-langgraph-tool-execution-error/README.md +29 -0
- agent_observability_trace_cli-0.1.2/examples/15-langgraph-tool-execution-error/example.py +116 -0
- agent_observability_trace_cli-0.1.2/examples/16-openai-sdk-plain-embeddings/README.md +34 -0
- agent_observability_trace_cli-0.1.2/examples/16-openai-sdk-plain-embeddings/example.py +144 -0
- agent_observability_trace_cli-0.1.2/examples/17-langgraph-toolnode-custom-provider/README.md +41 -0
- agent_observability_trace_cli-0.1.2/examples/17-langgraph-toolnode-custom-provider/example.py +152 -0
- agent_observability_trace_cli-0.1.2/examples/18-langgraph-anthropic-empty-content/README.md +36 -0
- agent_observability_trace_cli-0.1.2/examples/18-langgraph-anthropic-empty-content/example.py +180 -0
- agent_observability_trace_cli-0.1.2/pyproject.toml +165 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/__init__.py +1182 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/_cli.py +1377 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/_inspect.py +2020 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/_replay/__init__.py +1 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/_replay/engine.py +268 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/_replay/fixture.py +868 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/core/__init__.py +1 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/core/clock.py +91 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/core/exceptions.py +51 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/core/span.py +271 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/core/trace.py +92 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/exporters/__init__.py +1 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/exporters/file.py +80 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/exporters/otlp.py +199 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/exporters/remote_fixture.py +307 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/exporters/stdout.py +258 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/integrations/__init__.py +69 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/integrations/agno.py +489 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/integrations/autogen.py +581 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/integrations/crewai.py +486 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/integrations/google_genai.py +731 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/integrations/haystack.py +254 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/integrations/langchain_core.py +361 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/integrations/langgraph.py +2093 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/integrations/langgraph_checkpoint.py +763 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/integrations/langgraph_state_diff.py +345 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/integrations/langgraph_stream_debug.py +202 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/integrations/llama_index.py +472 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/integrations/mcp.py +281 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/integrations/openai_agents.py +811 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/integrations/pydantic_ai.py +504 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/integrations/streaming.py +218 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/interceptor/__init__.py +64 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/interceptor/aiohttp_hook.py +152 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/interceptor/botocore_hook.py +223 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/interceptor/grpc_hook.py +651 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/interceptor/httpx_hook.py +866 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/interceptor/logging_hook.py +137 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/interceptor/requests_patch.py +184 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/interceptor/sse.py +176 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/interceptor/stdio_hook.py +245 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/interceptor/warnings_hook.py +132 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/interceptor/websocket_hook.py +323 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/plugins/__init__.py +35 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/plugins/base.py +111 -0
- agent_observability_trace_cli-0.1.2/src/agent_trace/py.typed +0 -0
- agent_observability_trace_cli-0.1.2/tests/__init__.py +0 -0
- agent_observability_trace_cli-0.1.2/tests/conftest.py +181 -0
- agent_observability_trace_cli-0.1.2/tests/integration/__init__.py +0 -0
- agent_observability_trace_cli-0.1.2/tests/integration/_mcp_stdio_server.py +23 -0
- agent_observability_trace_cli-0.1.2/tests/integration/test_agno.py +312 -0
- agent_observability_trace_cli-0.1.2/tests/integration/test_autogen.py +396 -0
- agent_observability_trace_cli-0.1.2/tests/integration/test_crewai.py +268 -0
- agent_observability_trace_cli-0.1.2/tests/integration/test_google_genai.py +209 -0
- agent_observability_trace_cli-0.1.2/tests/integration/test_groq_integration.py +190 -0
- agent_observability_trace_cli-0.1.2/tests/integration/test_haystack.py +233 -0
- agent_observability_trace_cli-0.1.2/tests/integration/test_langchain_core.py +288 -0
- agent_observability_trace_cli-0.1.2/tests/integration/test_langgraph.py +2152 -0
- agent_observability_trace_cli-0.1.2/tests/integration/test_langgraph_checkpoint.py +369 -0
- agent_observability_trace_cli-0.1.2/tests/integration/test_langgraph_state_diff.py +249 -0
- agent_observability_trace_cli-0.1.2/tests/integration/test_langgraph_stream_debug.py +158 -0
- agent_observability_trace_cli-0.1.2/tests/integration/test_llama_index.py +332 -0
- agent_observability_trace_cli-0.1.2/tests/integration/test_mcp.py +153 -0
- agent_observability_trace_cli-0.1.2/tests/integration/test_openai_agents.py +251 -0
- agent_observability_trace_cli-0.1.2/tests/integration/test_pydantic_ai.py +318 -0
- agent_observability_trace_cli-0.1.2/tests/unit/__init__.py +0 -0
- agent_observability_trace_cli-0.1.2/tests/unit/grpc_fixtures/echo.proto +23 -0
- agent_observability_trace_cli-0.1.2/tests/unit/grpc_fixtures/echo_pb2.py +40 -0
- agent_observability_trace_cli-0.1.2/tests/unit/grpc_fixtures/echo_pb2_grpc.py +186 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_aiohttp_hook.py +266 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_botocore_hook.py +515 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_cli.py +1506 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_clock.py +227 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_exporters.py +630 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_fixture.py +1039 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_grpc_hook.py +641 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_httpx_hook.py +1138 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_inspect.py +1765 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_integrations_agno.py +466 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_integrations_autogen.py +523 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_integrations_crewai.py +595 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_integrations_google_genai.py +693 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_integrations_haystack.py +337 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_integrations_langchain_core.py +261 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_integrations_langgraph.py +2111 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_integrations_llama_index.py +280 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_integrations_mcp.py +303 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_integrations_openai_agents.py +896 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_langgraph_state_diff.py +97 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_langgraph_stream_debug.py +117 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_logging_hook.py +94 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_plugins.py +291 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_remote_fixture.py +277 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_replay_engine.py +401 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_requests_patch.py +405 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_span.py +554 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_sse.py +209 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_stdio_hook.py +260 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_streaming.py +204 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_trace.py +205 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_tracer.py +1177 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_warnings_hook.py +110 -0
- agent_observability_trace_cli-0.1.2/tests/unit/test_websocket_hook.py +463 -0
- agent_observability_trace_cli-0.1.2/uv.lock +7400 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: File a bug report
|
|
3
|
+
labels: ["bug", "triage"]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
Thanks for reporting a bug. Please fill in as much detail as possible.
|
|
9
|
+
|
|
10
|
+
- type: input
|
|
11
|
+
id: version
|
|
12
|
+
attributes:
|
|
13
|
+
label: agent-trace version
|
|
14
|
+
placeholder: "0.1.0"
|
|
15
|
+
validations:
|
|
16
|
+
required: true
|
|
17
|
+
|
|
18
|
+
- type: textarea
|
|
19
|
+
id: description
|
|
20
|
+
attributes:
|
|
21
|
+
label: What happened?
|
|
22
|
+
description: A clear description of the bug.
|
|
23
|
+
validations:
|
|
24
|
+
required: true
|
|
25
|
+
|
|
26
|
+
- type: textarea
|
|
27
|
+
id: repro
|
|
28
|
+
attributes:
|
|
29
|
+
label: Minimal reproduction
|
|
30
|
+
description: Smallest code snippet that reproduces the bug.
|
|
31
|
+
render: python
|
|
32
|
+
validations:
|
|
33
|
+
required: true
|
|
34
|
+
|
|
35
|
+
- type: textarea
|
|
36
|
+
id: expected
|
|
37
|
+
attributes:
|
|
38
|
+
label: Expected behavior
|
|
39
|
+
validations:
|
|
40
|
+
required: true
|
|
41
|
+
|
|
42
|
+
- type: input
|
|
43
|
+
id: python
|
|
44
|
+
attributes:
|
|
45
|
+
label: Python version
|
|
46
|
+
placeholder: "3.12.0"
|
|
47
|
+
validations:
|
|
48
|
+
required: true
|
|
49
|
+
|
|
50
|
+
- type: input
|
|
51
|
+
id: os
|
|
52
|
+
attributes:
|
|
53
|
+
label: OS
|
|
54
|
+
placeholder: "macOS 15.0 / Ubuntu 24.04"
|
|
55
|
+
validations:
|
|
56
|
+
required: true
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Suggest a new feature or improvement
|
|
3
|
+
labels: ["enhancement"]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: problem
|
|
7
|
+
attributes:
|
|
8
|
+
label: What problem does this solve?
|
|
9
|
+
description: Describe the pain point. Link to a GitHub Discussion if one exists.
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: solution
|
|
15
|
+
attributes:
|
|
16
|
+
label: Proposed solution
|
|
17
|
+
description: What would the API look like? Code example preferred.
|
|
18
|
+
validations:
|
|
19
|
+
required: false
|
|
20
|
+
|
|
21
|
+
- type: dropdown
|
|
22
|
+
id: integration
|
|
23
|
+
attributes:
|
|
24
|
+
label: Related integration (if any)
|
|
25
|
+
options:
|
|
26
|
+
- Not integration-specific
|
|
27
|
+
- LangGraph
|
|
28
|
+
- OpenAI Agents SDK
|
|
29
|
+
- CrewAI
|
|
30
|
+
- AutoGen
|
|
31
|
+
- Other
|
|
32
|
+
validations:
|
|
33
|
+
required: false
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: pip
|
|
4
|
+
directory: /
|
|
5
|
+
schedule:
|
|
6
|
+
interval: weekly
|
|
7
|
+
day: monday
|
|
8
|
+
groups:
|
|
9
|
+
patch-updates:
|
|
10
|
+
update-types: [patch]
|
|
11
|
+
ignore:
|
|
12
|
+
- dependency-name: "*"
|
|
13
|
+
update-types: [version-update:semver-major]
|
|
14
|
+
|
|
15
|
+
- package-ecosystem: github-actions
|
|
16
|
+
directory: /
|
|
17
|
+
schedule:
|
|
18
|
+
interval: monthly
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
<!-- What does this PR do? One paragraph. -->
|
|
4
|
+
|
|
5
|
+
## Changes
|
|
6
|
+
|
|
7
|
+
-
|
|
8
|
+
|
|
9
|
+
## Testing
|
|
10
|
+
|
|
11
|
+
- [ ] Unit tests added or updated for all behavior changes
|
|
12
|
+
- [ ] `uv run pytest tests/unit/ -q` passes locally
|
|
13
|
+
- [ ] `uv run mypy src/ --strict` passes with zero errors
|
|
14
|
+
- [ ] `uv run ruff check src/ tests/` passes
|
|
15
|
+
|
|
16
|
+
## Checklist
|
|
17
|
+
|
|
18
|
+
- [ ] CHANGELOG.md updated (for any user-facing change)
|
|
19
|
+
- [ ] No unrelated refactors in this PR
|
|
20
|
+
- [ ] If this is AI-assisted: I have read and validated every line of generated code
|
|
21
|
+
|
|
22
|
+
## Benchmark impact (if touching performance-sensitive code)
|
|
23
|
+
|
|
24
|
+
<!-- Run: uv run pytest benchmarks/ --benchmark-compare and paste the diff -->
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Benchmark
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
benchmark:
|
|
9
|
+
name: Performance benchmarks
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write # required by auto-push to the gh-pages branch below
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
16
|
+
|
|
17
|
+
- name: Install uv
|
|
18
|
+
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.12"
|
|
21
|
+
enable-cache: true
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: uv sync --extra dev
|
|
25
|
+
|
|
26
|
+
- name: Run benchmarks
|
|
27
|
+
run: uv run pytest benchmarks/ --benchmark-json=output.json -v
|
|
28
|
+
env:
|
|
29
|
+
AGENT_TRACE_NETWORK_GUARD: "1"
|
|
30
|
+
|
|
31
|
+
- name: Store benchmark results
|
|
32
|
+
uses: benchmark-action/github-action-benchmark@52576c92bccf6ac60c8223ec7eb2565637cae9ba # v1
|
|
33
|
+
with:
|
|
34
|
+
tool: pytest
|
|
35
|
+
output-file-path: output.json
|
|
36
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
37
|
+
auto-push: true
|
|
38
|
+
alert-threshold: "120%"
|
|
39
|
+
comment-on-alert: true
|
|
40
|
+
fail-on-alert: true
|
|
41
|
+
gh-pages-branch: gh-pages
|
|
42
|
+
benchmark-data-dir-path: dev/bench
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
quality:
|
|
18
|
+
name: quality (${{ matrix.python-version }})
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
security-events: write
|
|
23
|
+
strategy:
|
|
24
|
+
fail-fast: false
|
|
25
|
+
matrix:
|
|
26
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
27
|
+
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
30
|
+
|
|
31
|
+
- name: Install uv
|
|
32
|
+
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4
|
|
33
|
+
with:
|
|
34
|
+
python-version: ${{ matrix.python-version }}
|
|
35
|
+
enable-cache: true
|
|
36
|
+
|
|
37
|
+
- name: Install dependencies
|
|
38
|
+
run: uv sync --extra dev
|
|
39
|
+
|
|
40
|
+
- name: Lint (ruff)
|
|
41
|
+
run: uv run ruff check src/ tests/ benchmarks/
|
|
42
|
+
|
|
43
|
+
- name: Format check (ruff)
|
|
44
|
+
run: uv run ruff format --check src/ tests/ benchmarks/
|
|
45
|
+
|
|
46
|
+
- name: Type check (mypy)
|
|
47
|
+
run: uv run mypy src/ --strict
|
|
48
|
+
|
|
49
|
+
- name: Unit tests (overall ≥ 80%)
|
|
50
|
+
run: uv run pytest tests/unit/ --cov=src/ --cov-report=xml --cov-fail-under=80 -v
|
|
51
|
+
env:
|
|
52
|
+
AGENT_TRACE_NETWORK_GUARD: "1"
|
|
53
|
+
|
|
54
|
+
- name: Coverage gate — replay/ and interceptor/ each ≥ 90%
|
|
55
|
+
run: |
|
|
56
|
+
uv run pytest tests/unit/ \
|
|
57
|
+
--cov=src/agent_trace/_replay \
|
|
58
|
+
--cov=src/agent_trace/interceptor \
|
|
59
|
+
--cov-fail-under=90 \
|
|
60
|
+
-q --no-header
|
|
61
|
+
env:
|
|
62
|
+
AGENT_TRACE_NETWORK_GUARD: "1"
|
|
63
|
+
|
|
64
|
+
- name: Upload coverage
|
|
65
|
+
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4
|
|
66
|
+
if: matrix.python-version == '3.12'
|
|
67
|
+
with:
|
|
68
|
+
file: coverage.xml
|
|
69
|
+
fail_ci_if_error: false
|
|
70
|
+
|
|
71
|
+
- name: Security scan (Trivy)
|
|
72
|
+
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
|
|
73
|
+
with:
|
|
74
|
+
scan-type: fs
|
|
75
|
+
format: sarif
|
|
76
|
+
output: trivy-results.sarif
|
|
77
|
+
severity: HIGH,CRITICAL
|
|
78
|
+
|
|
79
|
+
- name: Upload Trivy results
|
|
80
|
+
uses: github/codeql-action/upload-sarif@b7351df727350dca84cb9d725d57dcf5bc82ba26 # v3
|
|
81
|
+
if: always()
|
|
82
|
+
with:
|
|
83
|
+
sarif_file: trivy-results.sarif
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Publish PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
publish:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
id-token: write
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
15
|
+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.x"
|
|
18
|
+
- run: pip install build
|
|
19
|
+
- run: python -m build
|
|
20
|
+
- uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
|
|
21
|
+
with:
|
|
22
|
+
packages-dir: dist
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release:
|
|
10
|
+
name: Build and publish to PyPI
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
id-token: write # required for sigstore OIDC signing (does NOT cover the PyPI publish step below — see note)
|
|
14
|
+
contents: write # required to create GitHub releases and upload assets
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
18
|
+
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.12"
|
|
23
|
+
|
|
24
|
+
- name: Build
|
|
25
|
+
run: uv build
|
|
26
|
+
|
|
27
|
+
# Publishes with a long-lived PyPI API token (secrets.PYPI_TOKEN), NOT PyPI
|
|
28
|
+
# Trusted Publishing — id-token: write above is only consumed by the sigstore
|
|
29
|
+
# signing step further down. To remove the static-token risk entirely, register
|
|
30
|
+
# this workflow as a trusted publisher at
|
|
31
|
+
# https://pypi.org/manage/project/agent-trace/settings/publishing/
|
|
32
|
+
# (repo: RudrenduPaul/agent-observability, workflow: release.yml, environment: none),
|
|
33
|
+
# then replace this step with `pypa/gh-action-pypi-publish` and drop PYPI_TOKEN —
|
|
34
|
+
# that's a one-time manual step on pypi.org this workflow file can't perform for you.
|
|
35
|
+
- name: Publish to PyPI
|
|
36
|
+
run: uv publish
|
|
37
|
+
env:
|
|
38
|
+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
|
39
|
+
|
|
40
|
+
# SBOM — CycloneDX JSON (machine-readable) + XML (toolchain-compatible)
|
|
41
|
+
# cyclonedx-py 4.x CLI: `cyclonedx-py environment` generates from the
|
|
42
|
+
# active Python environment; outputs CycloneDX 1.6 by default.
|
|
43
|
+
- name: Generate SBOM (JSON + XML)
|
|
44
|
+
run: |
|
|
45
|
+
pip install cyclonedx-bom==4.5.0
|
|
46
|
+
cyclonedx-py environment --format JSON --output-file sbom.json
|
|
47
|
+
cyclonedx-py environment --format XML --output-file sbom.xml
|
|
48
|
+
|
|
49
|
+
# SLSA Level 2 — sign dist artifacts with Sigstore via GitHub OIDC.
|
|
50
|
+
# Produces *.sigstore bundles alongside each dist file.
|
|
51
|
+
- name: Sign release artifacts (sigstore / SLSA Level 2)
|
|
52
|
+
uses: sigstore/gh-action-sigstore-python@5b79a39c381910c090341a2c9b0bf022c8b387e1 # v3.4.0
|
|
53
|
+
with:
|
|
54
|
+
inputs: dist/*.whl dist/*.tar.gz
|
|
55
|
+
|
|
56
|
+
# Upload to GitHub release: dist files + sigstore bundles + both SBOM formats
|
|
57
|
+
- name: Create GitHub release
|
|
58
|
+
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
|
|
59
|
+
with:
|
|
60
|
+
files: |
|
|
61
|
+
dist/*.whl
|
|
62
|
+
dist/*.tar.gz
|
|
63
|
+
dist/*.sigstore
|
|
64
|
+
sbom.json
|
|
65
|
+
sbom.xml
|
|
66
|
+
generate_release_notes: true
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: OpenSSF Scorecard
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
schedule:
|
|
7
|
+
- cron: "30 1 * * 6"
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
analysis:
|
|
11
|
+
name: Scorecard analysis
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
permissions:
|
|
14
|
+
security-events: write
|
|
15
|
+
id-token: write
|
|
16
|
+
contents: read
|
|
17
|
+
actions: read
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
21
|
+
with:
|
|
22
|
+
persist-credentials: false
|
|
23
|
+
|
|
24
|
+
- name: Run analysis
|
|
25
|
+
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
|
|
26
|
+
with:
|
|
27
|
+
results_file: results.sarif
|
|
28
|
+
results_format: sarif
|
|
29
|
+
publish_results: true
|
|
30
|
+
|
|
31
|
+
- name: Upload results
|
|
32
|
+
uses: github/codeql-action/upload-sarif@b7351df727350dca84cb9d725d57dcf5bc82ba26 # v3
|
|
33
|
+
with:
|
|
34
|
+
sarif_file: results.sarif
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
*.egg
|
|
7
|
+
*.egg-info/
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
.eggs/
|
|
11
|
+
|
|
12
|
+
# Virtual environments
|
|
13
|
+
.venv/
|
|
14
|
+
venv/
|
|
15
|
+
env/
|
|
16
|
+
|
|
17
|
+
# uv
|
|
18
|
+
.uv/
|
|
19
|
+
|
|
20
|
+
# Testing and coverage
|
|
21
|
+
.pytest_cache/
|
|
22
|
+
.coverage
|
|
23
|
+
.coverage.*
|
|
24
|
+
htmlcov/
|
|
25
|
+
coverage.xml
|
|
26
|
+
*.sarif
|
|
27
|
+
|
|
28
|
+
# Benchmarks output
|
|
29
|
+
.benchmarks/
|
|
30
|
+
benchmarks/results/latest.json
|
|
31
|
+
|
|
32
|
+
# Type checking
|
|
33
|
+
.mypy_cache/
|
|
34
|
+
.dmypy.json
|
|
35
|
+
dmypy.json
|
|
36
|
+
|
|
37
|
+
# IDE
|
|
38
|
+
.vscode/
|
|
39
|
+
.idea/
|
|
40
|
+
*.swp
|
|
41
|
+
*.swo
|
|
42
|
+
*~
|
|
43
|
+
|
|
44
|
+
# OS
|
|
45
|
+
.DS_Store
|
|
46
|
+
Thumbs.db
|
|
47
|
+
|
|
48
|
+
# Secrets and local config
|
|
49
|
+
.env
|
|
50
|
+
.env.*
|
|
51
|
+
*.pem
|
|
52
|
+
*.key
|
|
53
|
+
|
|
54
|
+
# agent-trace runtime data — fixture files contain API keys and prompt content
|
|
55
|
+
.agent-trace/
|
|
56
|
+
*.db
|
|
57
|
+
fixture.db
|
|
58
|
+
|
|
59
|
+
# Docs build
|
|
60
|
+
docs/_build/
|
|
61
|
+
docs/site/
|
|
62
|
+
|
|
63
|
+
# Pre-commit
|
|
64
|
+
.pre-commit-config.yaml.bak
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.5.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff
|
|
6
|
+
args: [--fix]
|
|
7
|
+
- id: ruff-format
|
|
8
|
+
|
|
9
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
10
|
+
rev: v4.6.0
|
|
11
|
+
hooks:
|
|
12
|
+
- id: check-yaml
|
|
13
|
+
- id: check-toml
|
|
14
|
+
- id: check-merge-conflict
|
|
15
|
+
- id: detect-private-key
|
|
16
|
+
- id: no-commit-to-branch
|
|
17
|
+
args: [--branch, main]
|
|
18
|
+
- id: end-of-file-fixer
|
|
19
|
+
- id: trailing-whitespace
|
|
20
|
+
|
|
21
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
22
|
+
rev: v1.10.0
|
|
23
|
+
hooks:
|
|
24
|
+
- id: mypy
|
|
25
|
+
args: [--strict]
|
|
26
|
+
additional_dependencies:
|
|
27
|
+
- httpx>=0.27
|
|
28
|
+
- rich>=13.0
|
|
29
|
+
- types-requests>=2.31
|
|
30
|
+
|
|
31
|
+
- repo: https://github.com/gitleaks/gitleaks
|
|
32
|
+
rev: v8.18.4
|
|
33
|
+
hooks:
|
|
34
|
+
- id: gitleaks
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to agent-trace are documented here.
|
|
4
|
+
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
5
|
+
|
|
6
|
+
## [0.1.2] - 2026-07-16
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
- gRPC transport interception (`pip install agent-trace[grpc]`) for LLM SDKs
|
|
10
|
+
that default to gRPC instead of REST (e.g. Vertex AI's mTLS-authenticated
|
|
11
|
+
path). Records/replays unary-unary and unary-stream gRPC calls the same
|
|
12
|
+
way `RecordingTransport`/`ReplayTransport` do for httpx; wired into
|
|
13
|
+
`Tracer._install_recording_transport`/`_uninstall_recording_transport` and
|
|
14
|
+
the replay engine alongside the existing httpx/requests patches. Covers
|
|
15
|
+
both sync `grpc` and async `grpc.aio` (unary-unary only for aio).
|
|
16
|
+
- HTTP transport interception for `aiohttp.ClientSession` (`pip install agent-trace[aiohttp]`), closing a silent recording gap for LLM traffic routed through aiohttp-based clients (e.g. LiteLLM's default async transport)
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- PyPI distribution renamed to `agent-observability-trace` to match the name actually registered on PyPI (import path is unchanged: `import agent_trace`)
|
|
20
|
+
- `Author` field on PyPI linked to Rudrendu's personal email under Sourav's displayed name; authors are now name-only with GitHub profile links in `project.urls`
|
|
21
|
+
|
|
22
|
+
## [0.1.0] - 2026-06-19
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- Core span and trace data model (`Span`, `Trace`, `SpanStatus`)
|
|
26
|
+
- Clock abstraction (`core/clock.py`) enabling deterministic replay
|
|
27
|
+
- HTTP transport interception for `httpx` and `requests`
|
|
28
|
+
- SQLite-backed fixture store (`replay/fixture.py`) for record/replay
|
|
29
|
+
- Replay engine with `AGENT_TRACE_NETWORK_GUARD` enforcement
|
|
30
|
+
- `@tracer.instrument(record=True)` decorator API
|
|
31
|
+
- `tracer.span()` context manager for manual span creation
|
|
32
|
+
- LangGraph callback handler integration (`pip install agent-trace[langgraph]`)
|
|
33
|
+
- OpenAI Agents SDK hook integration (`pip install agent-trace[openai-agents]`)
|
|
34
|
+
- OTLP exporter for Jaeger/Grafana Tempo (`pip install agent-trace[otlp]`)
|
|
35
|
+
- `stdout` and `file` exporters
|
|
36
|
+
- Three benchmark scripts: overhead, fidelity, ingestion
|
|
37
|
+
- CI pipeline with ruff, mypy --strict, pytest, Trivy, OpenSSF Scorecard
|
|
38
|
+
- Apache 2.0 license
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Contributing to agent-observability
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing. This guide covers everything you need to get started, from setting up a local dev environment to getting your PR merged quickly.
|
|
4
|
+
|
|
5
|
+
## Development Setup
|
|
6
|
+
|
|
7
|
+
### Prerequisites
|
|
8
|
+
|
|
9
|
+
- Python 3.10 or later
|
|
10
|
+
- [uv](https://github.com/astral-sh/uv) (install via `curl -Lf https://astral.sh/uv/install.sh | sh`)
|
|
11
|
+
- Git
|
|
12
|
+
|
|
13
|
+
### First-time setup
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
git clone https://github.com/RudrenduPaul/agent-observability.git
|
|
17
|
+
cd agent-observability
|
|
18
|
+
uv sync --extra dev
|
|
19
|
+
pre-commit install
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Verify your setup
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
uv run pytest tests/unit/ -q
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
All tests should pass before you make any changes. If they don't, open an issue.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Engineering Standards
|
|
33
|
+
|
|
34
|
+
Every PR must pass the full quality gate before it can merge. Run these locally before pushing:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Lint and format
|
|
38
|
+
uv run ruff check src/ tests/ benchmarks/
|
|
39
|
+
uv run ruff format --check src/ tests/ benchmarks/
|
|
40
|
+
|
|
41
|
+
# Type checking — zero errors required
|
|
42
|
+
uv run mypy src/ --strict
|
|
43
|
+
|
|
44
|
+
# Unit tests with coverage gate
|
|
45
|
+
uv run pytest tests/unit/ --cov=src/ --cov-fail-under=80 -v
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Style conventions
|
|
49
|
+
|
|
50
|
+
- **Formatter:** `ruff format` (88-char line length, no manual overrides)
|
|
51
|
+
- **Linter:** `ruff check` with the ruleset in `pyproject.toml` — do not add `# noqa` without a comment explaining why
|
|
52
|
+
- **Types:** All public functions must be fully typed. Internal helpers too, unless the type annotation would be genuinely unreadable
|
|
53
|
+
- **Docstrings:** Public API functions need a one-line summary. Private helpers do not require docstrings
|
|
54
|
+
|
|
55
|
+
### What makes a PR merge quickly
|
|
56
|
+
|
|
57
|
+
1. **One concern per PR.** A PR that fixes a bug and refactors three unrelated modules will be asked to split. Reviewers review the whole diff — keep it small and reviewable.
|
|
58
|
+
2. **Tests for every behavior change.** If you add a feature, add a unit test. If you fix a bug, add a regression test that would have caught it.
|
|
59
|
+
3. **CHANGELOG.md entry.** Every user-facing change goes under `## [Unreleased]`. Internal refactors and CI changes do not need an entry.
|
|
60
|
+
4. **Passing CI before requesting review.** The CI matrix runs on Python 3.10–3.13. Fix failures before pinging for review.
|
|
61
|
+
5. **Clear PR description.** Fill in the PR template. Reviewers should not have to ask "what does this do?" after reading your description.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Integration Tests
|
|
66
|
+
|
|
67
|
+
Integration tests hit real external APIs (OpenAI, Anthropic, etc.) and are never mocked. They are gated behind the `@pytest.mark.integration` marker and excluded from the standard CI run.
|
|
68
|
+
|
|
69
|
+
**Rules:**
|
|
70
|
+
- Integration tests live in `tests/integration/`
|
|
71
|
+
- Every integration test must be decorated with `@pytest.mark.integration`
|
|
72
|
+
- Do not mock API calls in integration tests — that is what unit tests with `respx` are for
|
|
73
|
+
- Integration tests must be self-contained: they must set up and tear down any state they create
|
|
74
|
+
- Secrets are injected via environment variables, never hardcoded
|
|
75
|
+
|
|
76
|
+
**Running integration tests locally:**
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
export OPENAI_API_KEY=sk-...
|
|
80
|
+
uv run pytest tests/integration/ -m integration -v
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**CI policy:** Integration tests do not run in CI by default. They run in a separate scheduled workflow against maintainer-controlled secrets. If your PR requires integration test coverage, mention it in the PR description.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Benchmark PRs
|
|
88
|
+
|
|
89
|
+
If your change touches any of the following, it is a benchmark-sensitive PR and requires a benchmark comparison:
|
|
90
|
+
|
|
91
|
+
- `src/agent_trace/core/` — span/trace data model
|
|
92
|
+
- `src/agent_trace/transport/` — HTTP interceptors
|
|
93
|
+
- `src/agent_trace/replay/` — fixture store or replay engine
|
|
94
|
+
- Any change to serialization or deserialization paths
|
|
95
|
+
|
|
96
|
+
**How to run benchmarks and attach the output:**
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# First run on main to establish baseline
|
|
100
|
+
git checkout main
|
|
101
|
+
uv run pytest benchmarks/ --benchmark-save=baseline
|
|
102
|
+
|
|
103
|
+
# Apply your changes, then compare
|
|
104
|
+
git checkout your-branch
|
|
105
|
+
uv run pytest benchmarks/ --benchmark-compare=baseline --benchmark-compare-fail=mean:10%
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Paste the comparison table into your PR description under "Benchmark impact". PRs that regress mean latency by more than 10% will not merge without a compelling justification.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Response SLAs
|
|
113
|
+
|
|
114
|
+
We aim to respond within these windows on business days (Pacific Time):
|
|
115
|
+
|
|
116
|
+
| Type | Target |
|
|
117
|
+
|------|--------|
|
|
118
|
+
| Bug reports | 24 hours |
|
|
119
|
+
| Feature requests | 72 hours |
|
|
120
|
+
| Pull requests | 72 hours |
|
|
121
|
+
|
|
122
|
+
Response means "acknowledged, triaged, or reviewed" — not necessarily resolved. If your issue or PR is approaching these windows with no response, a single polite ping in the thread is welcome.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## AI-Assisted Contributions
|
|
127
|
+
|
|
128
|
+
AI tools (Copilot, Claude, GPT-4, etc.) are permitted and can speed up boilerplate-heavy work. However:
|
|
129
|
+
|
|
130
|
+
- **You are responsible for every line you submit.** "The AI wrote it" is not a defense for a security issue, incorrect logic, or a type error.
|
|
131
|
+
- Read and understand every generated line before submitting.
|
|
132
|
+
- Indicate in your PR description if the implementation is AI-assisted. This is for the reviewer's awareness, not a negative mark.
|
|
133
|
+
- Do not submit AI-generated tests that only test the happy path. Tests must cover edge cases and failure modes.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Good First Issues
|
|
138
|
+
|
|
139
|
+
Looking for somewhere to start? Filter the issue tracker by these labels:
|
|
140
|
+
|
|
141
|
+
- [`good first issue`](https://github.com/RudrenduPaul/agent-observability/labels/good%20first%20issue) — small, well-scoped tasks with clear acceptance criteria
|
|
142
|
+
- [`docs`](https://github.com/RudrenduPaul/agent-observability/labels/docs) — documentation improvements, typo fixes, example additions
|
|
143
|
+
- [`help wanted`](https://github.com/RudrenduPaul/agent-observability/labels/help%20wanted) — medium-complexity issues where a contributor's perspective would be valuable
|
|
144
|
+
|
|
145
|
+
If you plan to work on an issue, leave a comment so we can assign it and avoid duplication.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## License
|
|
150
|
+
|
|
151
|
+
By contributing, you agree that your contributions will be licensed under the Apache License 2.0. See `LICENSE` for details.
|