Describe your environment
any env
What happened?
def create_gen_ai_server_time_per_output_token(meter: Meter) -> Histogram:
"""Time per output token generated after the first token for successful responses"""
return meter.create_histogram(
name=GEN_AI_SERVER_TIME_PER_OUTPUT_TOKEN,
description="Time per output token generated after the first token for successful responses.",
unit="s",
)
def create_gen_ai_server_time_to_first_token(meter: Meter) -> Histogram:
"""Time to generate first token for successful responses"""
return meter.create_histogram(
name=GEN_AI_SERVER_TIME_TO_FIRST_TOKEN,
description="Time to generate first token for successful responses.",
unit="s",
)
these two help methods are not correctly implemented, because the related semconv states SHOULD be specified with ExplicitBucketBoundaries .... The histogram created from these two methods would use _DEFAULT_EXPLICIT_BUCKET_HISTOGRAM_AGGREGATION_BOUNDARIES, which is totally wrong and meaningless for ttft and tpot.
Steps to Reproduce
code issue.
Expected Result
code issue.
Actual Result
code issue.
Additional context
No response
Would you like to implement a fix?
Yes
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Describe your environment
any env
What happened?
these two help methods are not correctly implemented, because the related semconv states
SHOULD be specified with ExplicitBucketBoundaries .... The histogram created from these two methods would use _DEFAULT_EXPLICIT_BUCKET_HISTOGRAM_AGGREGATION_BOUNDARIES, which is totally wrong and meaningless for ttft and tpot.Steps to Reproduce
code issue.
Expected Result
code issue.
Actual Result
code issue.
Additional context
No response
Would you like to implement a fix?
Yes
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it. Learn more here.