Respan instrumentation for Marqo
Native OpenTelemetry instrumentation for the official Marqo Python client, validated against Marqo 3.18.2 and the declared minimum 3.5.1.
import os
import marqo
from opentelemetry.sdk.trace import TracerProvider
from respan_instrumentation_marqo import MarqoInstrumentor
provider = TracerProvider() # Add your application's processors/exporters.
instrumentor = MarqoInstrumentor(tracer_provider=provider)
instrumentor.activate()
try:
client = marqo.Client(url=os.environ["MARQO_URL"])
result = client.index("documents").search(q="native tracing")
print(result)
finally:
instrumentor.deactivate()
provider.shutdown()
The paired examples use actual released Marqo clients against a local controlled HTTP server, with no Marqo credentials. Respan trace export requires an explicit opt-in. These controlled examples do not establish hosted-service acceptance.
Coverage
Client operations include create_index, delete_index, get_indexes, and
bulk_search. Index operations include create/delete, document add/update/get/
get-many/delete, search, recommend, embed, settings/stats/status/health, and model
ejection where available in the installed SDK. Native convenience aliases
produce one operation span. index and get_index retain their native handle
factory behavior and do not invent database-operation spans. Native minimum
model ejection requires its original model_device argument; the adapter does
not rewrite SDK signatures or parameters.
Database operations are task spans with standard database attributes and full
sanitized public inputs, observed serialized requests, and native results.
Actual Index.embed calls are embedding spans: complete returned vectors appear
in canonical entity output; nonvector response fields remain separately in
capture-gated metadata. Model and HTTP status fields are emitted only when
observed. No token usage, totals, response, error output, or HTTP status is
invented. A final observed HTTP status describes an actual request and does not
claim an aggregate batch status. Native worker requests may execute outside the
call context, leaving transport metadata unobserved while public batch inputs
and aggregate native results remain complete.
The released upstream instrumentor wraps only add/search/delete-documents and does not provide this broader native API coverage or canonical payload/privacy behavior. This adapter retains its existing native boundary. Native results, exceptions, warnings, request serialization, callbacks, and SDK session ownership are preserved. Instrumentation does not drain responses, repeat provider calls, or close Marqo's module-owned HTTP session.
Content and lifecycle
Sampling and general/LLM suppression are checked before telemetry content
inspection. Constructor capture_content=False, canonical Respan content flags,
legacy trace_content/override_enable_content_tracing, and both content
environment switches disable bodies. Initial and observed active/finished
ancestor denial cannot widen; unknown local parents fail closed. Later vetoes
clear owned input/output, native request buffers, metadata, diagnostics, SDK
events, and readable span snapshots before export.
Known native JSON and typed storage retain full records, 5001-value vectors, schemas and false/zero/empty fields. Credentials in fields, quoted authentication text and URLs are redacted; schema property names remain intact while sensitive defaults/examples are redacted. Unknown user conversion, getter, equality, hash, iterator, string and representation hooks are not invoked solely for telemetry.
Compatible owners share patches until the last deactivation. Configuration
conflicts raise ValueError, and restoration removes only owned descriptors and
processors. Observer startup, serialization, setter, attach/detach and end faults
preserve native outcomes and caller context. The supported runtime floors are
validated separately from current companions and a clean wheel built from the
sdist. Stored Respan trace fidelity remains a separate acceptance gate.
Metadata
Release files for respan-instrumentation-marqo 0.2.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 | |
|---|---|---|---|
| respan_instrumentation_marqo-0.2.0.tar.gz | 12.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| respan_instrumentation_marqo-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.3 kB
Release files / respan_instrumentation_marqo-0.2.0.tar.gz
| Download URL | respan_instrumentation_marqo-0.2.0.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e5c94cded5e400426e0f5d261a260b8e89761314a7aa4b960304888f54e062a
|
|
BLAKE2b-256 checksum How to use checksums |
b498bb616365a98a4b74cdc9aa807f0625f629605af5b956c934f51743f34a91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / respan_instrumentation_marqo-0.2.0-py3-none-any.whl
| Download URL | respan_instrumentation_marqo-0.2.0-py3-none-any.whl |
|---|---|
| Size | 13.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1cd090eb32d8ec6009a85405238897d4ed6549bea4a5a2465dbcf30e8c76aab0
|
|
BLAKE2b-256 checksum How to use checksums |
052b24009e4ba1c4400707ca28c96ed52c1515e4c68868e481e394c93b4360c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency log