feat: add opentelemetry-instrumentation-aerospike#4154
feat: add opentelemetry-instrumentation-aerospike#4154KimSoungRyoul wants to merge 5 commits intoopen-telemetry:mainfrom
Conversation
13d11d3 to
a75032d
Compare
|
This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment. |
a75032d to
aea380c
Compare
|
I noticed this PR has been inactive for a while, so I wanted to leave a note with some context and updates. First, I very much agree with Aaron Abbott's suggestion (via Slack#otel-python) that the ideal approach would be native instrumentation built into the official Aerospike client. That would provide the best out-of-the-box experience and keep telemetry perfectly in sync with client updates. However, based on the current state of the Aerospike Python client project, this is unfortunately not a realistic path at the moment. The Aerospike team's priority is focused on performance and the new async Rust-binding-based client (aerospike/aerospike-client-python#263 (comment)), and features like OpenTelemetry support are not on their near-term roadmap. I also opened aerospike/aerospike-client-python#945 to propose native instrumentation, but there has been no response yet. Given this situation, contributing native OTel instrumentation directly to In the meantime, I have been actively maintaining this instrumentation and would like to continue doing so as part of the official contrib repository. For reference, I am the organizer of aerospike-py, an open-source project in the Aerospike community ecosystem. While it is still in its early stages, I am continuously improving it. If there are any concerns about my ability to maintain the I have also rebased this PR onto the latest I would appreciate any feedback or guidance on how to move this forward. Thank you for your time! |
Add OpenTelemetry instrumentation for the Aerospike Python client. Supported operations: - Single record: put, get, select, exists, remove, touch, operate, etc. - Batch: batch_read, batch_write, batch_operate, batch_remove, batch_apply - Query/Scan, UDF, Admin operations Captured attributes follow OTel semantic conventions (db.system.name, db.namespace, db.collection.name, db.operation.name, server.address, server.port) plus Aerospike-specific attributes (db.aerospike.key, db.aerospike.bins, db.aerospike.generation, db.aerospike.ttl, etc.).
Add functional tests that run against a real Aerospike server in Docker. Covers single-record ops, batch ops, query/scan, and UDF operations.
Add changelog entry, Sphinx docs page for aerospike instrumentation.
Add aerospike test jobs (py3.9-3.13) to test.yml, lint job to lint.yml, and core contrib test job to core_contrib_test.yml.
aea380c to
7014b58
Compare
Resolve conflicts with upstream Python 3.9 drop: - Update aerospike instrumentation to require Python >=3.10 - Add Python 3.14 support to classifiers and tox - Remove py39 test jobs, add py314 test jobs - Keep both CHANGELOG entries (breaking changes + added)
Description
I am the original author and maintainer of the standalone library opentelemetry-instrumentation-aerospike, which is currently published on PyPI. I am contributing this library to
pypi: opentelemetry-python-contribto integrate it into the official ecosystem.To support this integration, I volunteer to serve as the Code Owner for this component. I currently hold the ownership of the PyPI package and am ready to transfer it (or grant publish permissions) to the OpenTelemetry maintainers to facilitate automated releases.
Features
Supported Operations
put,get,select,exists,remove,touch,operate,append,prepend,incrementbatch_read,batch_write,batch_operate,batch_remove,batch_applyquery,scanapply,scan_apply,query_applytruncate,info_allCaptured Telemetry Data
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 ifcapture_key=Trueis 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.Type of change
How Has This Been Tested?
I have added both unit tests and functional tests (using Docker) to verify the instrumentation.
tox -e py311-test-instrumentation-aerospike): Verified span creation, attribute population (including newdb.system.name,db.user,db.aerospike.bins), and context propagation for all supported operations.tox -e docker-tests -- tests/aerospike): Verified integration with a real Aerospike server running in Docker, ensuring correct span generation and attribute values in a real-world scenario.tox -e lint-instrumentation-aerospike(pylint score 10.00/10).Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.