Skip to content

metrics

Eleanor Framework Prometheus Metrics.

This module defines Prometheus metrics for tracking various aspects of the Eleanor Framework Backend API. It includes counters and summaries for monitoring the creation of namespaces, users, agents, memory collections, memories, and sessions. Additionally, it provides metrics for chain invocation and agent chat completion.

Attributes

agent_chat_completion_generation_counter module-attribute

agent_chat_completion_generation_counter = Counter(
    "agent_chat_completion_generation_total",
    "Total number of chat completions generated",
    ["agent_pkid", "name"],
)

agent_chat_completion_perplexity module-attribute

agent_chat_completion_perplexity = Summary(
    "agent_chat_completion_perplexity",
    "Agent chat completion perplexity",
    ["agent_pkid", "name"],
)

agent_chat_completion_prompt_tokens module-attribute

agent_chat_completion_prompt_tokens = Counter(
    "agent_chat_completion_request_tokens",
    "Agent chat completion request tokens",
    ["agent_pkid", "name"],
)

agent_chat_completion_response_time module-attribute

agent_chat_completion_response_time = Summary(
    "agent_chat_completion_response_time",
    "Agent chat completion response time",
    ["agent_pkid", "name"],
)

agent_chat_completion_response_tokens module-attribute

agent_chat_completion_response_tokens = Counter(
    "agent_chat_completion_response_tokens",
    "Agent chat completion response tokens",
    ["agent_pkid", "name"],
)

agent_chat_completion_total_tokens module-attribute

agent_chat_completion_total_tokens = Counter(
    "agent_chat_completion_total_tokens",
    "Agent chat completion total tokens",
    ["agent_pkid", "name"],
)

agent_create_counter module-attribute

agent_create_counter = Counter(
    "agent_create_total",
    "Total number of new agents created",
    ["namespace_pkid"],
)

app_info module-attribute

app_info = Info("app_info", "Eleanor Framework Backend API")

chain_invoke_fail_counter module-attribute

chain_invoke_fail_counter = Counter(
    "chain_invoke_fail_total",
    "Total number of failed chain invocations",
    ["chain_ref"],
)

chain_invoke_success_counter module-attribute

chain_invoke_success_counter = Counter(
    "chain_invoke_success_total",
    "Total number of successful chain invocations",
    ["chain_ref"],
)

chain_invoke_token_completion_counter module-attribute

chain_invoke_token_completion_counter = Counter(
    "chain_invoke_token_completion_counter",
    "Total number of completion tokens generated",
    ["chain_ref"],
)

chain_invoke_token_prompt_counter module-attribute

chain_invoke_token_prompt_counter = Counter(
    "chain_invoke_token_prompt_counter",
    "Total number of prompt tokens generated",
    ["chain_ref"],
)

chain_invoke_token_total_counter module-attribute

chain_invoke_token_total_counter = Counter(
    "chain_invoke_token_total_counter",
    "Total number of tokens generated",
    ["chain_ref"],
)

memory_collection_create_counter module-attribute

memory_collection_create_counter = Counter(
    "memory_collections_create_total",
    "Total number of new memory collections created",
    ["namespace_pkid"],
)

memory_create_counter module-attribute

memory_create_counter = Counter(
    "memory_create_total",
    "Total number of new memories created",
    ["agent_pkid", "collection_pkid"],
)

namespace_create_counter module-attribute

namespace_create_counter = Counter(
    "namespaces_create_total",
    "Total number of new namespaces created",
    [],
)

session_create_counter module-attribute

session_create_counter = Counter(
    "session_create_total",
    "Total number of new sessions created",
    ["namespace_pkid"],
)

user_create_counter module-attribute

user_create_counter = Counter(
    "user_create_total",
    "Total number of new users created",
    ["namespace_pkid"],
)