Skip to content

feat: add opentelemetry-instrumentation-aerospike#4154

Open
KimSoungRyoul wants to merge 5 commits intoopen-telemetry:mainfrom
KimSoungRyoul:feat/add-aerospike-instrumentation
Open

feat: add opentelemetry-instrumentation-aerospike#4154
KimSoungRyoul wants to merge 5 commits intoopen-telemetry:mainfrom
KimSoungRyoul:feat/add-aerospike-instrumentation

Conversation

@KimSoungRyoul
Copy link
Copy Markdown

@KimSoungRyoul KimSoungRyoul commented Jan 31, 2026

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-contrib to 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


  • 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

Captured 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 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.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

I have added both unit tests and functional tests (using Docker) to verify the instrumentation.

  • Unit Tests (tox -e py311-test-instrumentation-aerospike): Verified span creation, attribute population (including new db.system.name, db.user, db.aerospike.bins), and context propagation for all supported operations.
  • Functional Tests (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.
  • Linting: Passed tox -e lint-instrumentation-aerospike (pylint score 10.00/10).

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@KimSoungRyoul KimSoungRyoul requested a review from a team as a code owner January 31, 2026 08:12
@KimSoungRyoul KimSoungRyoul changed the title Feat/add aerospike instrumentation feat: add opentelemetry-instrumentation-aerospike Jan 31, 2026
@KimSoungRyoul KimSoungRyoul force-pushed the feat/add-aerospike-instrumentation branch from 13d11d3 to a75032d Compare February 12, 2026 13:00
@tammy-baylis-swi tammy-baylis-swi moved this to Ready for review in Python PR digest Feb 27, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 3, 2026

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.
If you're still working on this, please add a comment or push new commits.

@github-actions github-actions Bot added the Stale label Mar 3, 2026
@KimSoungRyoul KimSoungRyoul force-pushed the feat/add-aerospike-instrumentation branch from a75032d to aea380c Compare April 13, 2026 08:27
@KimSoungRyoul
Copy link
Copy Markdown
Author

KimSoungRyoul commented Apr 13, 2026

Hi @tammy-baylis-swi,

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 aerospike-client-python seems difficult for the foreseeable future.

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 opentelemetry-instrumentation-aerospike component long-term, I hope this project can serve as a reference for your review.

I have also rebased this PR onto the latest main to resolve all merge conflicts and updated the version references to 0.63b0.dev.

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.
@KimSoungRyoul KimSoungRyoul force-pushed the feat/add-aerospike-instrumentation branch from aea380c to 7014b58 Compare April 13, 2026 08:54
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

2 participants