Skip to content

Commit ed61f0d

Browse files
committed
Update the tracer and finalize tests
1 parent f0154ea commit ed61f0d

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
examples/.env
22
examples/openai_agents_multi_agent_travel/.env
3+
examples/**/.env

instrumentation-genai/opentelemetry-instrumentation-openai-agents/src/opentelemetry/instrumentation/openai_agents/span_processor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class TracingProcessor: # type: ignore[misc]
2828
from opentelemetry.trace.status import Status, StatusCode
2929

3030

31-
def _parse_iso8601(timestamp: str | None) -> float | None:
32-
"""Return POSIX timestamp (seconds) for ISO8601 string."""
31+
def _parse_iso8601(timestamp: str | None) -> int | None:
32+
"""Return nanosecond timestamp for ISO8601 string."""
3333

3434
if not timestamp:
3535
return None
@@ -41,7 +41,7 @@ def _parse_iso8601(timestamp: str | None) -> float | None:
4141
except ValueError:
4242
return None
4343

44-
return dt.timestamp()
44+
return int(dt.timestamp() * 1_000_000_000)
4545

4646

4747
def _extract_server_attributes(

0 commit comments

Comments
 (0)