@@ -201,6 +201,10 @@ class GenAIInvocation:
201201 context_token : ContextToken | None = None
202202 span : Span | None = None
203203 attributes : dict [str , Any ] = field (default_factory = _new_str_any_dict )
204+ # Monotonic start time in seconds (from timeit.default_timer) used
205+ # for duration calculations to avoid mixing clock sources. This is
206+ # populated by the TelemetryHandler when starting an invocation.
207+ monotonic_start_s : float | None = None
204208
205209
206210@dataclass
@@ -250,10 +254,6 @@ class LLMInvocation(GenAIInvocation):
250254 seed : int | None = None
251255 server_address : str | None = None
252256 server_port : int | None = None
253- # Monotonic start time in seconds (from timeit.default_timer) used
254- # for duration calculations to avoid mixing clock sources. This is
255- # populated by the TelemetryHandler when starting an invocation.
256- monotonic_start_s : float | None = None
257257
258258
259259@dataclass
@@ -267,7 +267,6 @@ class EmbeddingInvocation(GenAIInvocation):
267267 operation_name : str = GenAI .GenAiOperationNameValues .EMBEDDINGS .value
268268
269269 provider : str | None = None # e.g., azure.ai.openai, openai, aws.bedrock
270-
271270 request_model : str | None = None
272271 server_address : str | None = None
273272 server_port : int | None = None
@@ -291,7 +290,6 @@ class EmbeddingInvocation(GenAIInvocation):
291290 Additional attributes to set on metrics. Must be of a low cardinality.
292291 These attributes will not be set on spans or events.
293292 """
294- monotonic_start_s : float | None = None
295293
296294
297295@dataclass
0 commit comments