Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure metrics to use tags #143

Closed
cescoffier opened this issue Dec 13, 2023 · 2 comments · Fixed by #155
Closed

Restructure metrics to use tags #143

cescoffier opened this issue Dec 13, 2023 · 2 comments · Fixed by #155

Comments

@cescoffier
Copy link
Collaborator

I was looking at the metrics output and found that the raw HTTP ones are formatted differently:

# HELP http_client_requests_seconds  
# TYPE http_client_requests_seconds summary
http_client_requests_seconds_count{clientName="api.openai.com",method="POST",outcome="SUCCESS",status="200",uri="/chat/completions",} 2.0
http_client_requests_seconds_sum{clientName="api.openai.com",method="POST",outcome="SUCCESS",status="200",uri="/chat/completions",} 4.791650208
# HELP http_client_requests_seconds_max  
# TYPE http_client_requests_seconds_max gauge
http_client_requests_seconds_max{clientName="api.openai.com",method="POST",outcome="SUCCESS",status="200",uri="/chat/completions",} 2.70089925

while we have:

# HELP langchain4j_aiservices_TriageService_triage_seconds
# TYPE langchain4j_aiservices_TriageService_triage_seconds summary
langchain4j_aiservices_TriageService_triage_seconds_count 2.0
langchain4j_aiservices_TriageService_triage_seconds_sum 4.992278791
# HELP langchain4j_aiservices_TriageService_triage_seconds_max
# TYPE langchain4j_aiservices_TriageService_triage_seconds_max gauge
langchain4j_aiservices_TriageService_triage_seconds_max 2.706755083

I think we need to align. In Quarkus, we use tags massively to reduce the number of keys. So, it might be better to follow that principle and have:

langchain4j_aiservices_seconds{aiservice=TriageService, method=triage}
@geoand
Copy link
Collaborator

geoand commented Dec 13, 2023

Sure, we can definitely do that

@geoand
Copy link
Collaborator

geoand commented Dec 14, 2023

#155 takes care of this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants