@@ -227,44 +227,6 @@ def _maybe_emit_llm_event(
227227 logger .emit (event )
228228
229229
230- def _maybe_emit_embedding_event (
231- logger : Logger | None ,
232- span : Span ,
233- invocation : EmbeddingInvocation ,
234- error_type : str | None = None ,
235- ) -> None :
236- """Emit a gen_ai.client.inference.operation.details event to the logger.
237-
238- This function creates a LogRecord event following the semantic convention
239- for gen_ai.client.inference.operation.details as specified in the GenAI
240- event semantic conventions.
241-
242- For more details, see the semantic convention documentation:
243- https://github.com/open-telemetry/semantic-conventions/blob/main/docs/gen-ai/gen-ai-events.md#event-eventgen_aiclientinferenceoperationdetails
244- """
245- if not is_experimental_mode () or not should_emit_event () or logger is None :
246- return
247-
248- # Build event attributes by reusing the attribute getter functions
249- attributes : dict [str , Any ] = {}
250- attributes .update (_get_embedding_common_attributes (invocation ))
251- attributes .update (_get_embedding_request_attributes (invocation ))
252- attributes .update (_get_embedding_response_attributes (invocation ))
253-
254- # Add error.type if operation ended in error
255- if error_type is not None :
256- attributes [error_attributes .ERROR_TYPE ] = error_type
257-
258- # Create and emit the event
259- context = set_span_in_context (span , get_current ())
260- event = LogRecord (
261- event_name = "gen_ai.client.embedding.operation.details" ,
262- attributes = attributes ,
263- context = context ,
264- )
265- logger .emit (event )
266-
267-
268230def _apply_llm_finish_attributes (
269231 span : Span , invocation : LLMInvocation
270232) -> None :
@@ -403,7 +365,6 @@ def _get_embedding_response_attributes(
403365 "_get_llm_response_attributes" ,
404366 "_get_llm_span_name" ,
405367 "_maybe_emit_llm_event" ,
406- "_maybe_emit_embedding_event" ,
407368 "_apply_embedding_finish_attributes" ,
408369 "_get_embedding_common_attributes" ,
409370 "_get_embedding_request_attributes" ,
0 commit comments