Skip to main content

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 string
  • customer_name: Maps to service.name in OpenTelemetry resource
  • agent_name: Maps to service.instance.id in OpenTelemetry resource

Environment Variables

You can set these environment variables:

  • AZURE_MONITOR_CONNECTION_STRING: The connection string for Azure Monitor
  • CUSTOMER_NAME: Maps to service.name in OpenTelemetry resource
  • AGENT_NAME: Maps to service.instance.id in 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ntt_ai_observability_exporter-0.1.5.tar.gz (6.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ntt_ai_observability_exporter-0.1.5-py3-none-any.whl (7.8 MB view details)

Uploaded Python 3

File details

Details for the file ntt_ai_observability_exporter-0.1.5.tar.gz.

File metadata

File hashes

Hashes for ntt_ai_observability_exporter-0.1.5.tar.gz
Algorithm Hash digest
SHA256 287e9b8f0c845e11ad433fbf8f28a4bb84df2ebc835d282b7f676eabc4762b99
MD5 ded60a91ea6d6e56ce25686bfee383a5
BLAKE2b-256 861ab998bfdd6a19448946ae5dfce96a3f5d702ad17cbe859c3b43a1695bc34b

See more details on using hashes here.

File details

Details for the file ntt_ai_observability_exporter-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for ntt_ai_observability_exporter-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 eb4129b416b13e308f189fbaf26a2517d8a4c8242c6e3436d6a8c437ad55c4e9
MD5 f5c733ea8ec086bfd80ba0a861207fea
BLAKE2b-256 3cf18d2ff247602b282daeb5d629dbfd102f92f5a6e8fed8202aa934112534a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page