Skip to main content

package with monocle genAI tracing

Project description

Monocle Apptrace

Monocle helps developers and platform engineers building or managing GenAI apps monitor these in prod by making it easy to instrument their code to capture traces that are compliant with open-source cloud-native observability ecosystem.

Monocle is a community-driven OSS framework for tracing GenAI app code governed as a Linux Foundation AI & Data project.

Use Monocle

  • Get the Monocle package
    pip install monocle_apptrace 
  • Instrument your app code
    • Import the Monocle package
         from monocle_apptrace.instrumentor import setup_monocle_telemetry
      
    • Setup instrumentation in your main() function
         setup_monocle_telemetry(workflow_name="your-app-name")
      
  • (Optionally) Modify config to alter where traces are sent

See Monocle user guide for more details.

Claude Code Instrumentation

# 1. Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh

# 2. Install package
uv tool install monocle_apptrace

# 3. Register hooks — prompts for Okahu API key (leave blank for local-only)
monocle-apptrace claude-setup

Start a new Claude Code session — traces flow automatically.

See Hook Setup Guide for complete instructions.

Codex CLI Instrumentation

# 1. Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh

# 2. Install package
uv tool install monocle_apptrace

# 3. Register hooks — prompts for Okahu API key (leave blank for local-only)
monocle-apptrace codex-setup

Start a new Codex session — traces flow automatically.

See Hook Setup Guide for complete instructions.

GitHub Copilot Instrumentation

# 1. Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh

# 2. Install package
uv tool install monocle_apptrace

# 3. Register hooks — prompts for Okahu API key (leave blank for local-only)
monocle-apptrace copilot-setup

Captures traces from both Copilot CLI and VS Code Copilot Chat. Start a session — traces flow automatically.

See Hook Setup Guide for complete instructions.

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

monocle_apptrace-0.8.4.tar.gz (216.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

monocle_apptrace-0.8.4-py3-none-any.whl (328.0 kB view details)

Uploaded Python 3

File details

Details for the file monocle_apptrace-0.8.4.tar.gz.

File metadata

  • Download URL: monocle_apptrace-0.8.4.tar.gz
  • Upload date:
  • Size: 216.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for monocle_apptrace-0.8.4.tar.gz
Algorithm Hash digest
SHA256 ee79e0eb8e79b55be4f3beefb2e4cf1e5316915af4501fd27a21b12b314230e5
MD5 550b5ded77dcb011d830950acccc61f4
BLAKE2b-256 b81a82f4021712e1c127d09795ceb1f9a6444c0f37f9bfd52531d8eac7c84671

See more details on using hashes here.

File details

Details for the file monocle_apptrace-0.8.4-py3-none-any.whl.

File metadata

File hashes

Hashes for monocle_apptrace-0.8.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1e38630b140a21f483f75cb664f320198a5298da9d18f4e8946ee9119b93a376
MD5 662bbccbfd29080a22a25773b12774f9
BLAKE2b-256 8c192493a2bc192266e829f6fe2ed3e8aa6ab172e696ac3bef456d882607de0e

See more details on using hashes here.

Supported by

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