Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Kindling Azure Monitor OpenTelemetry Integration

Azure Monitor OpenTelemetry integration for the Kindling Spark framework.

See CHANGELOG.md for release history.

Overview

This package provides Azure Monitor-backed implementations of Kindling's telemetry providers:

  • AzureMonitorLoggerProvider - Sends logs to Azure Monitor/Application Insights
  • AzureMonitorTraceProvider - Sends distributed traces to Azure Monitor

Installation

pip install spark-kindling-ext-otel-azure

In a Kindling domain project, add it with kindling env add spark-kindling-ext-otel-azure. On a cluster, the runtime installs it from <artifacts>/packages/ when it is listed in kindling.extensions; upload the wheel there with kindling runtime deploy --source github:<version> --dest <artifacts-root> --extension spark-kindling-ext-otel-azure.

Usage

Configuration

Add the extension to your settings.yaml or BOOTSTRAP_CONFIG:

kindling:
  # Extensions are automatically loaded (installed + imported)
  extensions:
    - spark-kindling-ext-otel-azure>=0.14.0

  telemetry:
    azure_monitor:
      connection_string: "InstrumentationKey=your-key;IngestionEndpoint=https://..."
      # Both default to false: with neither set the extension sends nothing.
      enable_logging: true
      enable_tracing: true
      sampling_rate: 1.0  # optional; 1.0 = 100% sampling

Or in bootstrap config:

BOOTSTRAP_CONFIG = {
    'extensions': ['spark-kindling-ext-otel-azure>=0.14.0'],
    'kindling': {
        'telemetry': {
            'azure_monitor': {
                'connection_string': 'InstrumentationKey=...',
                'enable_logging': True,
                'enable_tracing': True,
            }
        }
    }
}

Using with Dependency Injection

The providers automatically register with Kindling's DI container:

from kindling.spark_log_provider import PythonLoggerProvider
from kindling.spark_trace import SparkTraceProvider
from kindling.injection import GlobalInjector

# Import to register Azure Monitor providers
import kindling_ext_otel_azure

# Get logger (automatically uses Azure Monitor if configured)
logger_provider = GlobalInjector.get(PythonLoggerProvider)
logger = logger_provider.get_logger("my_app")

# Get tracer (automatically uses Azure Monitor if configured)
trace_provider = GlobalInjector.get(SparkTraceProvider)

# Use tracing
with trace_provider.span(component="data_pipeline", operation="process"):
    logger.info("Processing data...")
    # Your code here

Manual Setup

You can also manually configure the providers:

from kindling_ext_otel_azure import AzureMonitorLoggerProvider, AzureMonitorTraceProvider
from kindling.spark_config import ConfigService

config = ConfigService()
config.load_from_file("settings.yaml")

# Create providers
logger_provider = AzureMonitorLoggerProvider(config)
trace_provider = AzureMonitorTraceProvider(config)

# Use them
logger = logger_provider.get_logger("my_app")
logger.info("Hello from Azure Monitor!")

Features

  • Automatic instrumentation - Logs and traces flow to Azure Monitor
  • Distributed tracing - Correlate operations across services
  • Custom metrics - Track pipeline execution times, row counts, etc.
  • Application Insights integration - Query with KQL, set up alerts
  • Fallback behavior - Gracefully falls back if Azure Monitor unavailable

Requirements

  • Python 3.10+
  • Kindling framework
  • Azure subscription with Application Insights resource
  • Application Insights connection string

License

MIT

Metadata

Release files for spark-kindling-ext-otel-azure 0.14.0rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spark-kindling-ext-otel-azure 0.14.0rc1
File Size Uploaded
spark_kindling_ext_otel_azure-0.14.0rc1.tar.gz 8.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spark-kindling-ext-otel-azure 0.14.0rc1
File Interpreter ABI Platform
spark_kindling_ext_otel_azure-0.14.0rc1-py3-none-any.whl Python 3 none any Details

Total release size: 17.4 kB

Release files / spark_kindling_ext_otel_azure-0.14.0rc1.tar.gz

Download URL spark_kindling_ext_otel_azure-0.14.0rc1.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
725ac50871f1a3b7f59e2fd1391acbe77e181fbc6f14b0257960a07fe86d4142
BLAKE2b-256 checksum
How to use checksums
552462c025fa584d50673149635ec86c4ab0268754d23b0798eec4ab439149e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / spark_kindling_ext_otel_azure-0.14.0rc1-py3-none-any.whl

Download URL spark_kindling_ext_otel_azure-0.14.0rc1-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66e2d01545136ece5049598508825decf7eebeeee751671f41ad66284e8f6006
BLAKE2b-256 checksum
How to use checksums
69756bc0b3bc41da699d37c8c28e76d19b994ee5b4029fdb774df0d23737eef4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.14.0rc1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page