Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add groq instrumentation #1928

Merged
merged 8 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cz.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ major_version_zero = true
update_changelog_on_bump = true
version = "0.29.2"
version_files = [
"packages/opentelemetry-instrumentation-groq/pyproject.toml:^version",
"packages/opentelemetry-instrumentation-groq/opentelemetry/instrumentation/groq/version.py",
"packages/opentelemetry-instrumentation-alephalpha/pyproject.toml:^version",
"packages/opentelemetry-instrumentation-alephalpha/opentelemetry/instrumentation/alephalpha/version.py",
"packages/opentelemetry-instrumentation-anthropic/pyproject.toml:^version",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ OpenLLMetry can instrument everything that [OpenTelemetry already instruments](h
- ✅ IBM Watsonx AI
- ✅ Together AI
- ✅ Aleph Alpha
- ✅ Groq

### Vector DBs

Expand All @@ -133,7 +134,6 @@ OpenLLMetry can instrument everything that [OpenTelemetry already instruments](h
- ✅ Marqo
- ✅ LanceDB


### Frameworks

- ✅ LangChain
Expand Down
11 changes: 11 additions & 0 deletions packages/opentelemetry-instrumentation-groq/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[flake8]
exclude =
.git,
__pycache__,
build,
dist,
.tox,
venv,
.venv,
.pytest_cache
max-line-length = 120
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9.5
33 changes: 33 additions & 0 deletions packages/opentelemetry-instrumentation-groq/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# OpenTelemetry Groq Instrumentation

<a href="https://pypi.org/project/opentelemetry-instrumentation-groq/">
<img src="https://badge.fury.io/py/opentelemetry-instrumentation-groq.svg">
</a>

This library allows tracing Groq prompts and completions sent with the official [Groq SDK](https://github.com/groq/groq-python).

## Installation

```bash
pip install opentelemetry-instrumentation-groq
```

## Example usage

```python
from opentelemetry.instrumentation.groq import GroqInstrumentor

GroqInstrumentor().instrument()
```

## Privacy

**By default, this instrumentation logs prompts, completions, and embeddings to span attributes**. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the `TRACELOOP_TRACE_CONTENT` environment variable to `false`.

```bash
TRACELOOP_TRACE_CONTENT=false
```
Loading