Metadata-Version: 2.4
Name: otel-logger
Version: 1.0.2
Summary: Structured JSON logging for OpenTelemetry and New Relic
Home-page: https://github.com/your-repo-link
Author: Your Name
Author-email: your.email@example.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Logging
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

**Title:**  
`otel-logger: Structured JSON Logging for OpenTelemetry and New Relic`

**Summary:**  
`otel-logger` is a lightweight Python logging package that outputs structured JSON logs compatible with OpenTelemetry and New Relic observability platforms. It simplifies logging by providing a consistent schema for service name, environment, and custom fields, making it ideal for distributed systems and cloud-native applications.

**Features:**

*   ✅ Structured JSON logs for easy ingestion by observability tools.
*   ✅ Supports custom fields via `extra` parameter.
*   ✅ Configurable `service.name`, log level, and file path.
*   ✅ Default metadata: `team`, `vsn` for uniform logging.
*   ✅ Simple integration with Python’s built-in `logging` module.

**Example Usage:**

```python
import logging
from otel_logger import get_otel_logger

logger = get_otel_logger(
    log_file="/app/logs/otel.log",
    service_name="Cloud Billing",
    level=logging.INFO
)

logger.info("Billing process started", extra={"extra_fields": {"request_id": "12345"}})
```

**Output:**

```json
{
  "timestamp": "2025-11-25T11:30:00Z",
  "level": "INFO",
  "message": "Billing process started",
  "service.name": "Cloud Billing",
  "team": "sse",
  "vsn": "v1.0.0",
  "request_id": "12345"
}
```

**Installation:**

```bash
pip install otel-logger
```
