Data collector to unleash LLM power
Project description
CaptureFlow Tracer
Overview
The CaptureFlow Tracer is a Python package crafted for in-depth tracing of function calls within Python applications. Its primary function is to capture and relay execution data to the CaptureFlow server-side system for decision making.
Performance Considerations
The current implementation of the Tracer module utilizes the sys.settrace
module (Python Doc), leading to two outcomes:
- Detailed Logging: Captures verbose logs with debugger-level insight into method calls, variable states, and more.
- Performance Impact: The logging method significantly affects application performance.
Building and Testing Locally
To begin, ensure you have Python 3.8+, venv
, and the requirements-dev.txt
installed.
Explore the clientside/examples
directory for sample applications suitable for testing. For local package building with source code, each folder contains an ./install_package.sh
script. After building, run a local server and cURL some endpoints to simulate a real-life workflow.
If the environment variable CAPTUREFLOW_DEV_SERVER
is set to "true"
, trace JSON objects will be dumped locally for further inspection. Additionally, running the serverside
Docker container allows you to observe trace data ingestion in real-time.
For an example of the data structure captured by the tracer, you can check sample_trace_with_exception.json.
Roadmap for Optimization
We need to balancing trace detail with performance, planning enhancements for the Tracer's efficiency:
Short-Term Objectives
- Selective Tracing: Implement a "verbosity" parameter for targeted tracing, focusing on relevant trace events. For example, we need to "sample" a representative subset of requests instead of capturing all of them.
- Framework Integration and Middleware Enhancements:
- Research if it's feasible to develop middleware/patching for popular frameworks to ship data of similar detalization.
- Explore integration with tracing standards like OpenTelemetry for better application monitoring.
Long-Term Objectives
- Performance vs. Data Utility for CodeGen: Focus on collecting essential data for high-quality server-side improvements. We're pinpointing the specific data subset required to minimize performance disruption while maximizing optimization quality.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file captureflow_agent-0.0.7.tar.gz
.
File metadata
- Download URL: captureflow_agent-0.0.7.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f497f0194fa9c8db292fc8a1315382d6c80d6f37adcfcbbcaa70053b31a38e07 |
|
MD5 | 23faf37dbd328b44cb089c114e7e7b15 |
|
BLAKE2b-256 | 34758a41e1cb958a79e5a96bb8cb03145c6c68584903331be88977cafd62ea1c |
File details
Details for the file captureflow_agent-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: captureflow_agent-0.0.7-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b4d77e916d08bd86a704e44249105c552a71d3faa4190e3f115f897fc954e6e |
|
MD5 | 11293d8d1ef21f3d556148ecbe8fa227 |
|
BLAKE2b-256 | e1ead337162d1b389cf05d93bcca4dcbf4ddf3145edc6cdc18f76a86631c192d |