Graphsignal Tracer for Python
Project description
Graphsignal: Observability for AI Stack
Graphsignal is an observability platform for AI agents and LLM-powered applications. It helps developers ensure AI applications run as expected and users have the best experience. With Graphsignal, developers can:
- Trace generations, runs, and sessions with full AI context.
- Score any user interactions and application execution.
- See latency breakdowns and distributions.
- Analyze model API costs for deployments, models, or users.
- Get notified about errors and anomalies.
- Monitor API, compute, and GPU utilization.
Learn more at graphsignal.com.
Install
Install Graphsignal library.
pip install --upgrade graphsignal
Configure
Configure Graphsignal tracer by specifying your API key directly or via GRAPHSIGNAL_API_KEY
environment variable.
import graphsignal
graphsignal.configure(api_key='my-api-key', deployment='my-app')
To get an API key, sign up for a free account at graphsignal.com. The key can then be found in your account's Settings / API Keys page.
Alternatively, you can add Graphsignal tracer at command line, when running your module or script. Environment variables GRAPHSIGNAL_API_KEY
and GRAPHSIGNAL_DEPLOYMENT
must be set.
python -m graphsignal <script>
python -m graphsignal -m <module>
Integrate
Graphsignal auto-instruments and traces libraries and frameworks, such as OpenAI and LangChain. Traces, errors, and data, such as prompts and completions, are automatically recorded and available for analysis at app.graphsignal.com.
Refer to the guides below for detailed information on:
See API reference for full documentation.
Some integration examples are available in examples repo.
Analyze
Log in to Graphsignal to monitor and analyze your application and monitor for issues.
Overhead
Graphsignal tracer is very lightweight. The overhead per trace is measured to be less than 100 microseconds.
Security and Privacy
Graphsignal tracer can only open outbound connections to api.graphsignal.com
and send data, no inbound connections or commands are possible.
Payloads, such as prompts and completions, are recorded by default in case of automatic tracing. To disable, set record_payloads=False
in graphsignal.configure
.
Troubleshooting
To enable debug logging, add debug_mode=True
to configure()
. If the debug log doesn't give you any hints on how to fix a problem, please report it to our support team via your account.
In case of connection issues, please make sure outgoing connections to https://api.graphsignal.com
are allowed.
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 graphsignal-0.15.6.tar.gz
.
File metadata
- Download URL: graphsignal-0.15.6.tar.gz
- Upload date:
- Size: 74.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.14 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bfca2aed53c1343b5d9955741d5cfbfe084560f287c3caaa1819202905b21f8 |
|
MD5 | 7f1f9ac3cad78411eebed56d4f597d20 |
|
BLAKE2b-256 | 1c12983d641124d75b8df4ae685ed00ad0105390dc13d3ba43cdc85aafa6bb83 |
File details
Details for the file graphsignal-0.15.6-py3-none-any.whl
.
File metadata
- Download URL: graphsignal-0.15.6-py3-none-any.whl
- Upload date:
- Size: 105.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.14 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2679f7fc8ea78487b1920fbec227a2d2dce2ce0408b896bf0427e19344433594 |
|
MD5 | 7ae97fc7cb98ea571e8cb4cd92735f37 |
|
BLAKE2b-256 | ba7b3aeb7820717687717457a2f474a42bfc0986ae03d2a02d35d22a30ea0dd7 |