Respan Helicone instrumentation
Trace calls made through Helicone's Python manual logger with Respan. This
package instruments the published helicone-helpers HeliconeManualLogger
surface without replacing or bypassing Helicone's own logging behavior.
The instrumentation covers:
HeliconeManualLogger.log_request()and directsend_log()callsHeliconeLogBuilder, including streamed chunks and error logs- OpenAI-, Anthropic-, and custom-model request/response payloads
- Helicone
_type=tool,_type=vector_db, and_type=datacustom logs - sync manual logging and the builder's async
send_log()lifecycle
Install
pip install respan-ai respan-instrumentation-helicone "helicone-helpers~=1.2.1"
Usage
import os
from helicone_helpers import HeliconeManualLogger
from respan import Respan, workflow
from respan_instrumentation_helicone import HeliconeInstrumentor
respan = Respan(
api_key=os.environ["RESPAN_API_KEY"],
instrumentations=[HeliconeInstrumentor()],
)
helicone = HeliconeManualLogger(api_key=os.environ["HELICONE_API_KEY"])
@workflow(name="helicone_manual_log")
def run(prompt: str) -> str:
request = {
"model": "custom-chat-model",
"messages": [{"role": "user", "content": prompt}],
}
def operation(recorder):
response = {
"model": "custom-chat-model",
"choices": [{"message": {"role": "assistant", "content": "Hello!"}}],
"usage": {
"prompt_tokens": 4,
"completion_tokens": 2,
"total_tokens": 6,
},
}
recorder.append_results(response)
return "Hello!"
return helicone.log_request(request, operation, provider="openai")
try:
print(run("Say hello."))
finally:
respan.flush()
respan.shutdown()
HeliconeInstrumentor(capture_content=False) keeps span identity, model,
provider, timing, usage, and errors while omitting request and response content.
Authentication and Helicone transport headers are never copied into spans.
Safe constructor/request correlation headers are normalized into canonical
customer/session fields and one JSON respan.metadata attribute.
Activation and overlap policy
Helicone manual logging is explicit instrumentation. Activate
HeliconeInstrumentor() only in applications that use HeliconeManualLogger;
it is not a direct-provider auto-instrumentor. The package patches Helicone's
logger and builder methods only—it does not patch OpenAI, Anthropic, or another
provider SDK.
Do not combine this package with instrumentation for the provider operation
that the same manual log describes unless you intentionally want both records.
For example, wrapping an OpenAI call in HeliconeManualLogger.log_request()
while also activating OpenAIInstrumentor() produces one provider span and one
Helicone manual-log span for the same logical model call.
The instrumentor is reference-counted and restores the exact SDK methods it
patched when the final owner deactivates. It also exposes instrument() and
uninstrument() aliases for compatibility with OpenTelemetry-style lifecycle
code.
See the Helicone example set in respan-example-projects/python/tracing/helicone
for deterministic sync, async-builder, streaming, error, tool, vector database,
and custom data coverage.
Metadata
Release files for respan-instrumentation-helicone 0.1.0
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_helicone-0.1.0.tar.gz | 17.6 kB | Without provenance | Details for respan_instrumentation_helicone-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| respan_instrumentation_helicone-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for respan_instrumentation_helicone-0.1.0-py3-none-any.whl |
Total release size: 36.5 kB
Release files / respan_instrumentation_helicone-0.1.0.tar.gz
| Download URL | respan_instrumentation_helicone-0.1.0.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e8ecf7d2af76ffd9d19ca4e2e9843a5158250e49fedc15a2c3673987a841a040
|
|
BLAKE2b-256 checksum How to use checksums |
113e2f3ace2afb86b162c65d0e12f7905d78aca955c3f02ea2b30da739b0060d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / respan_instrumentation_helicone-0.1.0-py3-none-any.whl
| Download URL | respan_instrumentation_helicone-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d90910b7b025b9bef15d44d227ade28be14f0d4fe78c1481234096cd287f4288
|
|
BLAKE2b-256 checksum How to use checksums |
b7c91f3c32af7c9e0ba9db48d8626a5f277a5c2db406c5c5deb186f99c485c06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Security for respan-instrumentation-helicone 0.1.0
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.