Skip to main content

A Python package for monitoring and observability in Apache Spark applications

Project description

ScholarSparkObservability

A Python package for monitoring and observability in Apache Spark applications.

Installation

You can install the package using pip:

pip install scholarSparkObservability

Or using Poetry:

poetry add scholarSparkObservability

Usage

Here's a simple example of how to use the package:

from scholarSparkObservability import ScholarSparkObservability

client = ScholarSparkObservability()
result = client.example_method()
print(result)

Features

Features

OpenTelemetry Integration

  • Full OpenTelemetry support for distributed tracing and metrics collection
  • Configurable exporters for different observability backends (e.g., Jaeger, Zipkin)
  • Automatic context propagation across Spark jobs and stages

Comprehensive Monitoring

  • Real-time metrics collection for Spark executors and tasks
  • Custom span creation for detailed performance tracking
  • Exception tracking and error reporting with detailed attributes
  • Resource utilization metrics (CPU, memory, I/O)

Flexible Configuration

  • Singleton pattern for consistent telemetry setup across your application
  • Environment-aware configuration (production, staging, development)
  • Customizable export intervals and batch processing
  • Debug mode for detailed logging and troubleshooting

Enterprise-Ready

  • Low-overhead implementation suitable for production workloads
  • Batch span processing for efficient telemetry data export
  • Support for multiple exporters and monitoring backends
  • Robust error handling and logging capabilities

Easy Integration

  • Simple API for creating spans and recording metrics
  • Automatic service name and version tracking
  • Built-in support for custom attributes and tags
  • Seamless integration with existing Spark applications

Development

To contribute to this project:

  1. Clone the repository:
git clone https://github.com/pouyaardehkhani/ScholarSparkObservability.git
cd ScholarSparkObservability
  1. Install dependencies:
# Using poetry (recommended)
poetry install

# Using pip
pip install -r requirements.txt
  1. Run tests:
# Using poetry
poetry run pytest

# Using pytest directly
pytest tests/
  1. Set up pre-commit hooks:
pre-commit install
  1. Create a new branch for your feature:
git checkout -b feature/your-feature-name

Development Guidelines

  • Follow PEP 8 style guidelines
  • Write tests for new features
  • Update documentation as needed
  • Add type hints to all new functions
  • Ensure all tests pass before submitting PR

Building Documentation

# Generate documentation
poetry run sphinx-build -b html docs/source docs/build

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Authors

Pouya Ataei- Initial work

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

scholar_spark_observability-0.6.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

scholar_spark_observability-0.6.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file scholar_spark_observability-0.6.0.tar.gz.

File metadata

File hashes

Hashes for scholar_spark_observability-0.6.0.tar.gz
Algorithm Hash digest
SHA256 313cbef2615290fe7bdb812522eb8a35b97e39e605f0dd23627953c655cd502d
MD5 ac2da3181134908461ae63ee41cdbbbf
BLAKE2b-256 cdb40c295e296d2cd2e70b79ec572bbed55e0172c690bb547674b36eeefd65df

See more details on using hashes here.

File details

Details for the file scholar_spark_observability-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for scholar_spark_observability-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e22ef5eed2af20fcd40f18d1c31f027d8377dcba1fbd3793c9fa5900d3e07b3
MD5 dcdad0ee0b2a865ce88fbf7821fa88d2
BLAKE2b-256 1541c55e0b1a41aa83c167b752064e4bcd245676ea4eb2f22925453c488f8ac8

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