Skip to content

Commit 259622c

Browse files
feat: add groq instrumentation (traceloop#1928)
Co-authored-by: Doron Kopit <[email protected]>
1 parent af6dcdb commit 259622c

File tree

25 files changed

+4524
-1127
lines changed

25 files changed

+4524
-1127
lines changed

.cz.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ major_version_zero = true
66
update_changelog_on_bump = true
77
version = "0.29.2"
88
version_files = [
9+
"packages/opentelemetry-instrumentation-groq/pyproject.toml:^version",
10+
"packages/opentelemetry-instrumentation-groq/opentelemetry/instrumentation/groq/version.py",
911
"packages/opentelemetry-instrumentation-alephalpha/pyproject.toml:^version",
1012
"packages/opentelemetry-instrumentation-alephalpha/opentelemetry/instrumentation/alephalpha/version.py",
1113
"packages/opentelemetry-instrumentation-anthropic/pyproject.toml:^version",

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ OpenLLMetry can instrument everything that [OpenTelemetry already instruments](h
122122
- ✅ IBM Watsonx AI
123123
- ✅ Together AI
124124
- ✅ Aleph Alpha
125+
- ✅ Groq
125126

126127
### Vector DBs
127128

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

136-
137137
### Frameworks
138138

139139
- ✅ LangChain
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[flake8]
2+
exclude =
3+
.git,
4+
__pycache__,
5+
build,
6+
dist,
7+
.tox,
8+
venv,
9+
.venv,
10+
.pytest_cache
11+
max-line-length = 120
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.9.5
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# OpenTelemetry Groq Instrumentation
2+
3+
<a href="https://pypi.org/project/opentelemetry-instrumentation-groq/">
4+
<img src="https://badge.fury.io/py/opentelemetry-instrumentation-groq.svg">
5+
</a>
6+
7+
This library allows tracing Groq prompts and completions sent with the official [Groq SDK](https://github.com/groq/groq-python).
8+
9+
## Installation
10+
11+
```bash
12+
pip install opentelemetry-instrumentation-groq
13+
```
14+
15+
## Example usage
16+
17+
```python
18+
from opentelemetry.instrumentation.groq import GroqInstrumentor
19+
20+
GroqInstrumentor().instrument()
21+
```
22+
23+
## Privacy
24+
25+
**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.
26+
27+
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.
28+
29+
To disable logging, set the `TRACELOOP_TRACE_CONTENT` environment variable to `false`.
30+
31+
```bash
32+
TRACELOOP_TRACE_CONTENT=false
33+
```

0 commit comments

Comments
 (0)