Metadata-Version: 2.4
Name: opentelemetry-instrumentation-aerospike
Version: 0.61b0.dev0
Summary: OpenTelemetry Aerospike instrumentation
Project-URL: Homepage, https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-aerospike
Project-URL: Repository, https://github.com/open-telemetry/opentelemetry-python-contrib
Author-email: OpenTelemetry Authors <cncf-opentelemetry-contributors@lists.cncf.io>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Requires-Dist: opentelemetry-api~=1.12
Requires-Dist: opentelemetry-instrumentation==0.61b0.dev
Requires-Dist: opentelemetry-semantic-conventions==0.61b0.dev
Requires-Dist: wrapt>=1.12.1
Provides-Extra: instruments
Requires-Dist: aerospike>=17.0.0; extra == 'instruments'
Description-Content-Type: text/x-rst

OpenTelemetry Aerospike Instrumentation
=======================================

|pypi|

.. |pypi| image:: https://badge.fury.io/py/opentelemetry-instrumentation-aerospike.svg
   :target: https://pypi.org/project/opentelemetry-instrumentation-aerospike/

This library allows tracing requests made by the Aerospike library.

Installation
------------

::

    pip install opentelemetry-instrumentation-aerospike

Requirements
------------

- Python >= 3.9
- **aerospike >= 17.0.0** (minimum supported version)

.. note::

   This instrumentation only supports aerospike Python client version 17.0.0 and above.
   Version 17.0.0 introduced significant API changes including removal of deprecated methods.

Supported Operations
--------------------

The following Aerospike client methods are instrumented:

- **Single Record Operations**: ``put``, ``get``, ``select``, ``exists``, ``remove``, ``touch``, ``operate``, ``append``, ``prepend``, ``increment``
- **Batch Operations**: ``batch_read``, ``batch_write``, ``batch_operate``, ``batch_remove``, ``batch_apply``
- **Query/Scan Operations**: ``query``, ``scan``
- **UDF Operations**: ``apply``, ``scan_apply``, ``query_apply``
- **Admin Operations**: ``truncate``, ``info_all``

Aerospike Client Version Compatibility
--------------------------------------

**Minimum Version: 17.0.0**

+----------+--------------------------------------------------+
| Version  | Changes                                          |
+==========+==================================================+
| 17.0.0   | - Removed ``get_many()``, ``exists_many()``,     |
|          |   ``select_many()`` (use ``batch_read()``)       |
|          | - Removed ``batch_get_ops()``                    |
|          |   (use ``batch_operate()``)                      |
|          | - Removed ``admin_query_user()``,                |
|          |   ``admin_query_users()``                        |
+----------+--------------------------------------------------+
| 18.0.0   | - Added ``NamespaceNotFound`` exception          |
|          | - Added ``InvalidRequest`` exception             |
|          | - ``Query.where()/select()`` raises exception    |
|          |   on duplicate calls                             |
+----------+--------------------------------------------------+

.. note::

   Methods removed in version 17.0.0 are not supported by this instrumentation.
   Use the replacement methods listed above.

Captured Attributes
-------------------

The instrumentation captures the following attributes:

**Standard Attributes:**

* ``db.system.name``: Always "aerospike".
* ``db.namespace``: Aerospike namespace.
* ``db.collection.name``: Aerospike set name.
* ``db.operation.name``: The operation being performed (e.g., "GET", "PUT", "QUERY").
* ``db.user``: The user connected to the database (if configured).
* ``server.address``: The hostname or IP address of the Aerospike node.
* ``server.port``: The port of the Aerospike node.
* ``db.operation.batch.size``: Number of keys in batch operations.

**Aerospike-Specific Attributes:**

* ``db.aerospike.key``: The record key (only if ``capture_key=True`` is enabled).
* ``db.aerospike.bins``: List of bins being written or selected (for PUT/SELECT).
* ``db.aerospike.generation``: Record generation (from GET results).
* ``db.aerospike.ttl``: Record TTL (from GET results).
* ``db.aerospike.udf.module``: UDF module name.
* ``db.aerospike.udf.function``: UDF function name.

References
----------

* `OpenTelemetry Aerospike Instrumentation <https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/aerospike/aerospike.html>`_
* `OpenTelemetry Project <https://opentelemetry.io/>`_
* `Aerospike Python Client <https://github.com/aerospike/aerospike-client-python>`_
* `Aerospike Incompatible API Changes <https://aerospike.com/docs/develop/client/python/incompatible>`_
