respan-instrumentation-writer
Respan instrumentation plugin for the Writer Python SDK.
This package patches Writer client resource methods and emits spans using the Respan/Traceloop GenAI attribute shape used across this repository.
Install
pip install respan-instrumentation-writer
Quickstart
import os
from respan import Respan
from respan_instrumentation_writer import WriterInstrumentor
from writerai import Writer
respan = Respan(
api_key=os.environ["RESPAN_API_KEY"],
instrumentations=[WriterInstrumentor()],
)
client = Writer(api_key=os.environ["WRITER_API_KEY"])
completion = client.chat.chat(
model="palmyra-x5",
messages=[{"role": "user", "content": "Write one line about tracing."}],
max_tokens=64,
)
print(completion.choices[0].message.content)
client.close()
respan.shutdown()
Notes
- The instrumentor patches both
WriterandAsyncWriterresources. chat.chat(), streamed chat, text completions, Knowledge Graph questions, application content generation, vision, translation, and direct Writer tool calls are traced.- Writer-specific SDK field names stay local to this package; emitted spans use canonical GenAI/LLM and Respan-owned attribute constants.
- Streamed chat, completion, graph, and application calls carry
llm.is_streaming=trueand finalize on completion, early close, or error. - Close
Writer/AsyncWriterbefore callingrespan.shutdown()in an outerfinallyblock.
Metadata
Release files for respan-instrumentation-writer 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| respan_instrumentation_writer-0.1.1.tar.gz | 14.2 kB | Without provenance | Details for respan_instrumentation_writer-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| respan_instrumentation_writer-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for respan_instrumentation_writer-0.1.1-py3-none-any.whl |
Total release size: 30.8 kB
Release files / respan_instrumentation_writer-0.1.1.tar.gz
| Download URL | respan_instrumentation_writer-0.1.1.tar.gz |
|---|---|
| Size | 14.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0918a96bf0e56f8dd6fa1274fee581b31cc5e68cbfd2caedd0cbdbb70a38a1b
|
|
BLAKE2b-256 checksum How to use checksums |
01a1e1f312191f830e93d52541c4d24a1f0a4eef1795ea27266033180fb83c20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / respan_instrumentation_writer-0.1.1-py3-none-any.whl
| Download URL | respan_instrumentation_writer-0.1.1-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd9ccdac3f0a02fc102508b332562cebd04f927458fbb24c1d96fb6d32092668
|
|
BLAKE2b-256 checksum How to use checksums |
1432047b9d9bd3dd1f39200c0d7577f2deb62e9e83cb6d75d736a61c7ab46857
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for respan-instrumentation-writer 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.