Skip to content

Commit 8d2f486

Browse files
authored
elastic-opentelemetry-instrumentation-openai: test with latest openai (#11)
Adapt tests to work with faster error handling from versions newer than 1.46.0 that are near a second faster for a particular test case.
1 parent 237e2fd commit 8d2f486

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

instrumentation/elastic-opentelemetry-instrumentation-openai/dev-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jiter==0.5.0
4949
# via openai
5050
multidict==6.1.0
5151
# via yarl
52-
openai==1.46.0
52+
openai==1.50.2
5353
# via elastic-opentelemetry-instrumentation-openai (pyproject.toml)
5454
opentelemetry-api==1.27.0
5555
# via

instrumentation/elastic-opentelemetry-instrumentation-openai/tests/test_chat_completions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,4 +1228,8 @@ async def test_async_local_connection_error(self):
12281228
self.assertEqual(span.events, ())
12291229

12301230
(operation_duration_metric,) = self.get_sorted_metrics()
1231-
self.assertErrorOperationDurationMetric(operation_duration_metric, {"error.type": "APIConnectionError"})
1231+
self.assertErrorOperationDurationMetric(
1232+
operation_duration_metric,
1233+
{"error.type": "APIConnectionError"},
1234+
data_point=0.0072969673201441765,
1235+
)

0 commit comments

Comments
 (0)