Feature request: enhanced observability with core metrics #19629

Closed
opened 2026-02-21 20:02:07 -05:00 by yindo · 0 comments
Owner

Originally created by @minimAluminiumalism on GitHub (Oct 20, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

The following metrics is essential in LLM observability.

  1. TTFT(time to first token, gen_ai.server.time_to_first_token): Time to generate first token for successful responses.
  2. LLM operation duration(gen_ai.server.time_to_first_token): GenAI operation duration.
  3. LLM tokens(gen_ai.client.token.usage): Actually we should also write token usage into metrics besides writing them into trace.

I plan to implement support for these metrics in Tencent APM/tencent_trace first, as they are required by our platform. Since these are newly added metrics, this will not affect other ops integrations.

2. Additional context or comments

OpenTelemetry semantic conventions

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @minimAluminiumalism on GitHub (Oct 20, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. The following metrics is essential in LLM observability. 1. TTFT(time to first token, `gen_ai.server.time_to_first_token`): Time to generate first token for successful responses. 2. LLM operation duration(`gen_ai.server.time_to_first_token`): GenAI operation duration. 3. LLM tokens(`gen_ai.client.token.usage`): Actually we should also write token usage into metrics besides writing them into trace. I plan to implement support for these metrics in Tencent APM/`tencent_trace` first, as they are required by our platform. Since these are newly added metrics, this will not affect other ops integrations. ### 2. Additional context or comments [OpenTelemetry semantic conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-metrics/) ### 3. Can you help us with this feature? - [x] I am interested in contributing to this feature.
yindo added the 💪 enhancement label 2026-02-21 20:02:07 -05:00
yindo closed this issue 2026-02-21 20:02:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#19629