NTT AI Observability Exporter for Azure Monitor OpenTelemetry in AI Foundry projects
Project description
NTT AI Observability Exporter
A specialized telemetry exporter for NTT AI Foundry projects using Azure Monitor OpenTelemetry. This package simplifies telemetry setup for AI applications built with Azure services.
Features
- Automatic instrumentation of Azure SDK libraries
- Simplified configuration for Azure Monitor OpenTelemetry
- Specialized support for Semantic Kernel telemetry
- Compatible with Azure AI Foundry projects
Installation
# Using pip
pip install ntt-ai-observability-exporter
# Using uv
uv pip install ntt-ai-observability-exporter
Updating Your Package Documentation
Make sure to add a note in your package documentation (such as README.md) about the dependencies:
## Dependencies
This package depends on:
- azure-monitor-opentelemetry (>=1.0.0)
- opentelemetry-sdk (>=1.15.0)
These dependencies will be automatically installed when you install the package via pip.
```bash
# Using pip
pip install ntt-ai-observability-exporter
# Using uv
uv pip install ntt-ai-observability-exporter
Usage
Simple Usage - One Line Setup
from ntt_ai_observability_exporter import configure_telemetry
# That's it! This single line configures all telemetry
configure_telemetry()
# Now you can use your AI components normally - telemetry is automatic
Configuration Options
# Explicit configuration
configure_telemetry(
connection_string="InstrumentationKey=your-key;IngestionEndpoint=your-endpoint",
customer_name="your-customer",
agent_name="your-agent"
)
What Gets Instrumented Automatically
The Azure Monitor OpenTelemetry package automatically instruments:
- Azure SDK libraries (including azure.ai.openai)
- HTTP client libraries (requests, aiohttp)
This means when you use Azure AI Foundry components, telemetry is captured without any additional code.
Configuration Parameters
connection_string: Azure Monitor connection stringcustomer_name: Maps toservice.namein OpenTelemetry resourceagent_name: Maps toservice.instance.idin OpenTelemetry resource
Environment Variables
You can set these environment variables:
AZURE_MONITOR_CONNECTION_STRING: The connection string for Azure MonitorCUSTOMER_NAME: Maps toservice.namein OpenTelemetry resourceAGENT_NAME: Maps toservice.instance.idin OpenTelemetry resource
Telemetry Types Captured
The configuration captures:
- Traces: Request flows and operations
- Metrics: Performance measurements
- Logs: When integrated with Python logging
Example in Azure AI Foundry Project
# Import the NTT AI Observability Exporter
from ntt_ai_observability_exporter import configure_telemetry
# Configure telemetry with your project details
configure_telemetry(
connection_string="InstrumentationKey=xxx;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/",
customer_name="customer-name-foundry",
agent_name="ai-foundry-agent"
)
# Now use Azure AI components as normal - telemetry is automatic
from azure.ai.assistant import AssistantClient
client = AssistantClient(...)
# All operations are automatically instrumented
Semantic Kernel Telemetry Support
For applications using Semantic Kernel, use the specialized configuration function:
from ntt_ai_observability_exporter import configure_semantic_kernel_telemetry
# Configure Semantic Kernel telemetry BEFORE creating any Kernel instances
configure_semantic_kernel_telemetry(
connection_string="your_connection_string",
customer_name="your_customer_name",
agent_name="your_agent_name"
)
# Then create and use your Semantic Kernel
from semantic_kernel import Kernel
kernel = Kernel()
# ... rest of your code
Development and Testing
Installation for Development
Install the package with development dependencies:
# Install with development dependencies
pip install -e ".[dev]"
# Or install with just testing dependencies
pip install -e ".[test]"
# Or install from requirements-dev.txt
pip install -r requirements-dev.txt
Running Tests
# Run all tests
pytest
# Run tests with coverage
pytest --cov=src/ntt_ai_observability_exporter
# Run tests with detailed coverage report
pytest --cov=src/ntt_ai_observability_exporter --cov-report=term-missing
# Run specific test file
pytest tests/test_semantic_kernel_telemetry.py -v
Test Coverage
The package includes comprehensive unit tests with:
- 93% overall test coverage
- 100% coverage for semantic kernel telemetry module
- 17 test cases covering all functionality
- Validation of configuration, error handling, and Azure Monitor integration
Code Quality
The project uses:
- pytest for testing framework
- black for code formatting
- flake8 for linting
- mypy for type checking
- isort for import sorting
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ntt_ai_observability_exporter-0.2.1.tar.gz.
File metadata
- Download URL: ntt_ai_observability_exporter-0.2.1.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bb051cf5f77050a498e7edcaa6ce80ebaddc8dbd8f016a6057e8bee95f4cf05
|
|
| MD5 |
6b9809c7de031114329cc2408739f6b3
|
|
| BLAKE2b-256 |
4ca263efb4bbbf813aa8a6feac0096ff21a8bd645093c7e20a5113e199863729
|
File details
Details for the file ntt_ai_observability_exporter-0.2.1-py3-none-any.whl.
File metadata
- Download URL: ntt_ai_observability_exporter-0.2.1-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a47c93413083bf4746d83b384c8d74ac99d54b15835e6144b6c47f015a0431a
|
|
| MD5 |
bbbeb000ea577e9743da19b7ca567b73
|
|
| BLAKE2b-256 |
3dbb7d419644840b9aa44d9ebdbf2d0606f6c988c6756551897239cda6605720
|