opentelemetry-instrumentation-groq 0.38.12__tar.gz → 0.39.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of opentelemetry-instrumentation-groq might be problematic. Click here for more details.
- {opentelemetry_instrumentation_groq-0.38.12 → opentelemetry_instrumentation_groq-0.39.0}/PKG-INFO +1 -1
- {opentelemetry_instrumentation_groq-0.38.12 → opentelemetry_instrumentation_groq-0.39.0}/opentelemetry/instrumentation/groq/__init__.py +27 -16
- opentelemetry_instrumentation_groq-0.39.0/opentelemetry/instrumentation/groq/version.py +1 -0
- {opentelemetry_instrumentation_groq-0.38.12 → opentelemetry_instrumentation_groq-0.39.0}/pyproject.toml +1 -1
- opentelemetry_instrumentation_groq-0.38.12/opentelemetry/instrumentation/groq/version.py +0 -1
- {opentelemetry_instrumentation_groq-0.38.12 → opentelemetry_instrumentation_groq-0.39.0}/README.md +0 -0
- {opentelemetry_instrumentation_groq-0.38.12 → opentelemetry_instrumentation_groq-0.39.0}/opentelemetry/instrumentation/groq/config.py +0 -0
- {opentelemetry_instrumentation_groq-0.38.12 → opentelemetry_instrumentation_groq-0.39.0}/opentelemetry/instrumentation/groq/utils.py +0 -0
|
@@ -196,24 +196,35 @@ def _set_response_attributes(span, response, token_histogram):
|
|
|
196
196
|
span, SpanAttributes.LLM_USAGE_TOTAL_TOKENS, usage.get("total_tokens")
|
|
197
197
|
)
|
|
198
198
|
set_span_attribute(
|
|
199
|
-
span,
|
|
200
|
-
SpanAttributes.LLM_USAGE_COMPLETION_TOKENS, completion_tokens
|
|
201
|
-
)
|
|
202
|
-
set_span_attribute(
|
|
203
|
-
span, SpanAttributes.LLM_USAGE_PROMPT_TOKENS, prompt_tokens
|
|
199
|
+
span, SpanAttributes.LLM_USAGE_COMPLETION_TOKENS, completion_tokens
|
|
204
200
|
)
|
|
201
|
+
set_span_attribute(span, SpanAttributes.LLM_USAGE_PROMPT_TOKENS, prompt_tokens)
|
|
205
202
|
|
|
206
|
-
if
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
203
|
+
if (
|
|
204
|
+
isinstance(prompt_tokens, int)
|
|
205
|
+
and prompt_tokens >= 0
|
|
206
|
+
and token_histogram is not None
|
|
207
|
+
):
|
|
208
|
+
token_histogram.record(
|
|
209
|
+
prompt_tokens,
|
|
210
|
+
attributes={
|
|
211
|
+
SpanAttributes.LLM_TOKEN_TYPE: "input",
|
|
212
|
+
SpanAttributes.LLM_RESPONSE_MODEL: response.get("model"),
|
|
213
|
+
},
|
|
214
|
+
)
|
|
211
215
|
|
|
212
|
-
if
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
216
|
+
if (
|
|
217
|
+
isinstance(completion_tokens, int)
|
|
218
|
+
and completion_tokens >= 0
|
|
219
|
+
and token_histogram is not None
|
|
220
|
+
):
|
|
221
|
+
token_histogram.record(
|
|
222
|
+
completion_tokens,
|
|
223
|
+
attributes={
|
|
224
|
+
SpanAttributes.LLM_TOKEN_TYPE: "output",
|
|
225
|
+
SpanAttributes.LLM_RESPONSE_MODEL: response.get("model"),
|
|
226
|
+
},
|
|
227
|
+
)
|
|
217
228
|
|
|
218
229
|
choices = response.get("choices")
|
|
219
230
|
if should_send_prompts() and choices:
|
|
@@ -575,7 +586,7 @@ class GroqInstrumentor(BaseInstrumentor):
|
|
|
575
586
|
token_histogram,
|
|
576
587
|
choice_counter,
|
|
577
588
|
duration_histogram,
|
|
578
|
-
) = (None, None, None
|
|
589
|
+
) = (None, None, None)
|
|
579
590
|
|
|
580
591
|
for wrapped_method in WRAPPED_METHODS:
|
|
581
592
|
wrap_package = wrapped_method.get("package")
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.39.0"
|
|
@@ -8,7 +8,7 @@ show_missing = true
|
|
|
8
8
|
|
|
9
9
|
[tool.poetry]
|
|
10
10
|
name = "opentelemetry-instrumentation-groq"
|
|
11
|
-
version = "0.
|
|
11
|
+
version = "0.39.0"
|
|
12
12
|
description = "OpenTelemetry Groq instrumentation"
|
|
13
13
|
authors = ["Gal Kleinman <gal@traceloop.com>", "Nir Gazit <nir@traceloop.com>"]
|
|
14
14
|
repository = "https://github.com/traceloop/openllmetry/tree/main/packages/opentelemetry-instrumentation-groq"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.38.12"
|
{opentelemetry_instrumentation_groq-0.38.12 → opentelemetry_instrumentation_groq-0.39.0}/README.md
RENAMED
|
File without changes
|
|
File without changes
|