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()functionsetup_monocle_telemetry(workflow_name="your-app-name")
- Import the Monocle package
- (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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
952c5aa7c0a253f0eac71e0f2de1c6e92d28ef97ece99742835b65f5e7b22595
|
|
| MD5 |
826c44392be54b3bce701e7836f5c5e4
|
|
| BLAKE2b-256 |
6f33cb0c0fb2abe31938331d1b18776ef3a3e2bef97a5d4606b826519d8f92b8
|
File details
Details for the file monocle_apptrace-0.8.0-py3-none-any.whl.
File metadata
- Download URL: monocle_apptrace-0.8.0-py3-none-any.whl
- Upload date:
- Size: 264.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
621d98cddce6cf70c24ec1188be264bbd8da55fb1fc7f49e6b252db9ad9a2fbd
|
|
| MD5 |
2e3ec2e4138bf95c375a231e6a7a4cb0
|
|
| BLAKE2b-256 |
93cae0d048ab4c6f3eb217ba263da4e8ae56f7afa6b8fb8885b750f469e38957
|