A lightweight observability wrapper for LangSmith, Langfuse, Sentry, Phoenix, and OpenTelemetry.
Project description
oaas-tool
oaas-tool is a small Python observability wrapper that lets you plug one or more providers into any project with a simple config.
Supported tools:
langsmithlangfusesentryphoenixotel
Install
After this repository is on GitHub, anyone can install it with:
pip install "git+https://github.com/MeghanaTathireddy/oaas-tool.git"
If you later publish it to PyPI, the install becomes:
pip install oaas-tool
Quick Start
from oaas import init, Event
obs = init(
langsmith={
"api_key": "your-langsmith-api-key",
"project": "my-app",
}
)
obs.push(Event("app_started", {"env": "dev"}))
You can also use environment variables instead of passing keys directly.
from oaas import init, Event
obs = init(
langsmith={},
sentry={},
)
obs.push(Event("request_received", {"route": "/chat"}))
Environment Variables
LangSmith
LANGSMITH_API_KEYLANGSMITH_PROJECT
Langfuse
LANGFUSE_PUBLIC_KEYLANGFUSE_SECRET_KEYLANGFUSE_HOST
Sentry
SENTRY_DSN
Tool Selection
Users only enable the tools they want by passing those tool names into init(...).
from oaas import init
obs = init(
sentry={"dsn": "your-dsn"},
phoenix={},
)
If a tool needs credentials, the library expects the user's own keys through config or environment variables.
API
from oaas import init, Event, available_tools, node_start, node_end, error_event
init(config=None, **tool_configs)creates and starts the configured providers.available_tools()returns the supported tool names.Event(...)creates a custom event.node_start(...),node_end(...), anderror_event(...)are helper events.
Example
from oaas import init, Event
obs = init(
langfuse={
"public_key": "your-public-key",
"secret_key": "your-secret-key",
}
)
obs.push(Event("generation_completed", {"tokens": 128}))
Publish To GitHub
- Create a new GitHub repository.
- Add that GitHub repo as the remote for this project.
- Push your code.
- Create a release when you want to publish to PyPI.
Publish To PyPI Later
Once you are ready, users will be able to run pip install oaas-tool.
GitHub Actions
This repository includes:
- CI on push and pull request
- package build verification
- a PyPI publish workflow triggered by GitHub releases
For PyPI publishing, configure Trusted Publishing for this GitHub repository on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oaas_tool-0.1.0.tar.gz.
File metadata
- Download URL: oaas_tool-0.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cea960cf6105aeaff647b89daf2d97b2db1f1a9c9b3edf8b06641bd5e051cbe8
|
|
| MD5 |
4f34ac6d7b00470d9b57cd9bbe3972e5
|
|
| BLAKE2b-256 |
b438054e867e4590460e0cfded215f9ff45f2133128fac83d7e28141a02b5a51
|
Provenance
The following attestation bundles were made for oaas_tool-0.1.0.tar.gz:
Publisher:
publish.yml on MeghanaTathireddy/oaas-tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oaas_tool-0.1.0.tar.gz -
Subject digest:
cea960cf6105aeaff647b89daf2d97b2db1f1a9c9b3edf8b06641bd5e051cbe8 - Sigstore transparency entry: 1280552823
- Sigstore integration time:
-
Permalink:
MeghanaTathireddy/oaas-tool@d583243e61f527385c32b5e95acc6abdb2ca0ded -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/MeghanaTathireddy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d583243e61f527385c32b5e95acc6abdb2ca0ded -
Trigger Event:
release
-
Statement type:
File details
Details for the file oaas_tool-0.1.0-py3-none-any.whl.
File metadata
- Download URL: oaas_tool-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1de50c48a5555bb9b3b5c363eaca14c7c5ed8129e3e5b6a069e8355db175c5f9
|
|
| MD5 |
a9678adc89b2f81e4ca49c47c69ecaf2
|
|
| BLAKE2b-256 |
f08c8199021ee3d4ea8825d6ef33d8df2efd79aa16cffda532ea0d6591e32416
|
Provenance
The following attestation bundles were made for oaas_tool-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on MeghanaTathireddy/oaas-tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oaas_tool-0.1.0-py3-none-any.whl -
Subject digest:
1de50c48a5555bb9b3b5c363eaca14c7c5ed8129e3e5b6a069e8355db175c5f9 - Sigstore transparency entry: 1280552831
- Sigstore integration time:
-
Permalink:
MeghanaTathireddy/oaas-tool@d583243e61f527385c32b5e95acc6abdb2ca0ded -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/MeghanaTathireddy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d583243e61f527385c32b5e95acc6abdb2ca0ded -
Trigger Event:
release
-
Statement type: