Skip to main content

Radiant SDK

Radiant SDK is a Python package that simplifies the process of adding OpenTelemetry instrumentation to your applications, with a focus on integrating with Radiant's observability platform.

Features

  • Easy setup of OpenTelemetry tracing with Radiant
  • Automatic instrumentation of OpenAI API calls
  • Simple decorator for annotating functions with tracing

Installation

The Radiant SDK uses Poetry for dependency management and packaging. To install the SDK and its dependencies:

  1. Make sure you have Poetry installed. If not, install it by following the instructions at https://python-poetry.org/docs/#installation

  2. Clone the repository:

    git clone https://github.com/your-repo/radiant-sdk.git
    cd radiant-sdk
    
  3. Install the dependencies:

    poetry install
    

Usage

Basic Setup

from radiant import Instrumentor, annotate

# Initialize the instrumentor with your Radiant endpoint
Instrumentor.start("http://your-radiant-endpoint.com/api/v0/otel_receiver")

# Use the annotate decorator to trace functions
@annotate
def my_function():
    # Your function code here
    pass

Error Handling

The SDK will raise a RadiantConfigurationError if the Radiant endpoint is not provided:

try:
    Instrumentor.start("http://your-radiant-endpoint.com/api/v0/ingest/submit/otel/{YOUR_APP_NAME}", "<YOUR_API_KEY>")
except RadiantConfigurationError as e:
    print(f"Failed to initialize Radiant: {e}")

If you already have a TracerProvider (`opentelemetry.sdk.trace.TracerProvider()), you can just pass that into the configuration as well.

tracer_provider = opentelemetry.sdk.trace.TracerProvider()
try:
    Instrumentor.start("http://your-radiant-endpoint.com/api/v0/ingest/submit/otel/{YOUR_APP_NAME}", "<YOUR_API_KEY>" tracer_provider)
except RadiantConfigurationError as e:
    print(f"Failed to initialize Radiant: {e}")

Running Tests

To run the tests using pytest:

poetry run pytest

Contributing

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

License

This project is licensed under the MIT License.

Metadata

Release files for radiantai 0.137.0

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

Source distribution (sdist)

Source distribution for radiantai 0.137.0
File Size Uploaded Provenance Actions
radiantai-0.137.0.tar.gz 2.5 kB Without provenance Details for radiantai-0.137.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for radiantai 0.137.0
File Interpreter ABI Platform Actions
radiantai-0.137.0-py3-none-any.whl Python 3 none any Details for radiantai-0.137.0-py3-none-any.whl

Total release size: 5.5 kB

Release files / radiantai-0.137.0.tar.gz

Download URL radiantai-0.137.0.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
72cf2ee0c96281b13b22fa8fa72d8dd107803e0b687a836c4e8a2ba6062342d2
BLAKE2b-256 checksum
How to use checksums
f556041b76d2e43ae1ba5f1b4be37118bf858ad81050fd8c7af5b5fdbe67dd60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.12.4 Linux/6.5.0-1025-azure

Release files / radiantai-0.137.0-py3-none-any.whl

Download URL radiantai-0.137.0-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e95f452373d41f8d930b205e8e747e7da376162050817edc688f4324df3f0350
BLAKE2b-256 checksum
How to use checksums
25b97fbaaf296934ca2f61a475fbc44b8308bef4795924465905f901423af375
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.12.4 Linux/6.5.0-1025-azure

Security for radiantai 0.137.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.137.0 This release

2 release files No provenance

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