gnodet-bot commented on code in PR #26608:
URL: https://github.com/apache/camel/pull/26608#discussion_r4056342626


##########
components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/OpenAIAudioSpeechProducer.java:
##########
@@ -84,12 +87,21 @@ public void process(Exchange exchange) throws Exception {
 
         SpeechCreateParams params = paramsBuilder.build();
 

Review Comment:
   ⚠️ **Wrong operation name for TTS spans.** `GENERATE_CONTENT` is the 
catch-all label for image generation and Gemini-style operations — it makes 
speech spans indistinguishable from image-generation spans in any telemetry 
dashboard. The [OTel GenAI semantic 
conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/) define 
`gen_ai.operation.name = "text_to_speech"` for TTS. `TRANSCRIPTION` and 
`TRANSLATION` were correctly added to `GenAiOperationName` in this PR — 
`SPEECH` (mapped to `"text_to_speech"`) was overlooked.
   
   ```suggestion
           GenAiObservation observation = 
OpenAIGenAiProducerSupport.start(exchange, GenAiOperationName.SPEECH, model);
   ```
   
   And add the missing enum value in `GenAiOperationName.java`:
   ```java
   /** Text-to-speech audio generation operation. */
   SPEECH("text_to_speech"),
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to