Skip to content

Commit

Permalink
feat: add groq instrumentation (#1928)
Browse files Browse the repository at this point in the history
Co-authored-by: Doron Kopit <[email protected]>
  • Loading branch information
galkleinman and doronkopit5 authored Sep 4, 2024
1 parent af6dcdb commit 259622c
Show file tree
Hide file tree
Showing 25 changed files with 4,524 additions and 1,127 deletions.
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

0 comments on commit 259622c

Please sign in to comment.