Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

captureflow_agent-0.0.9.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

captureflow_agent-0.0.9-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file captureflow_agent-0.0.9.tar.gz.

File metadata

  • Download URL: captureflow_agent-0.0.9.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for captureflow_agent-0.0.9.tar.gz
Algorithm Hash digest
SHA256 18366ada1e3d00fbe9ec02ccf3c41a33c5f9f3c9cb67eaf0ff59b29bb99ec5d3
MD5 ee80aa509235478e83c32476bd183f7f
BLAKE2b-256 8c1f6237dd7f98cfb6d1f96875232295c14e6d56f0d416079ca14a0df0735d43

See more details on using hashes here.

File details

Details for the file captureflow_agent-0.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for captureflow_agent-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 df4f44fc77a09c94debd929a64415e270a4a0aa5ed9ca6c2930c9af255da8b33
MD5 c1ce5f0e2e02a762735ce6103bfecee0
BLAKE2b-256 8f78e07ed339c2b3711ce7216c438e7c8760704a97c23aa7020c8519fef62c41

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page