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 package
pip install monocle_apptrace

# 2. Register hooks into ~/.claude/settings.json
python -m monocle_apptrace claude-setup

# 3. Set environment variables in ~/.zshrc (or ~/.bashrc)
export MONOCLE_EXPORTER="okahu,file"
export OKAHU_API_KEY="your-api-key"
export MONOCLE_WORKFLOW_NAME="claude-cli"

Start a new Claude Code session — traces flow automatically.

See Claude 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.0.tar.gz (169.8 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.0-py3-none-any.whl (264.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: monocle_apptrace-0.8.0.tar.gz
  • Upload date:
  • Size: 169.8 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.0.tar.gz
Algorithm Hash digest
SHA256 952c5aa7c0a253f0eac71e0f2de1c6e92d28ef97ece99742835b65f5e7b22595
MD5 826c44392be54b3bce701e7836f5c5e4
BLAKE2b-256 6f33cb0c0fb2abe31938331d1b18776ef3a3e2bef97a5d4606b826519d8f92b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for monocle_apptrace-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 621d98cddce6cf70c24ec1188be264bbd8da55fb1fc7f49e6b252db9ad9a2fbd
MD5 2e3ec2e4138bf95c375a231e6a7a4cb0
BLAKE2b-256 93cae0d048ab4c6f3eb217ba263da4e8ae56f7afa6b8fb8885b750f469e38957

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