наблюдаемость: завершить базовый контур Community
Добавить структурированные журналы, метрики, трассировку и безопасный канал критических ошибок. Усилить границы рантайма, тесты, проверку зависимостей и сценарии развёртывания.
This commit is contained in:
@@ -296,7 +296,12 @@ impl AdminService {
|
||||
bindings: &[],
|
||||
})
|
||||
.await?;
|
||||
info!(agent_id = %agent_id.as_str(), version = 1, "agent created");
|
||||
info!(
|
||||
name: "admin.agent.created",
|
||||
agent_id = %agent_id.as_str(),
|
||||
version = 1,
|
||||
"agent created"
|
||||
);
|
||||
|
||||
Ok(CreatedAgentResponse {
|
||||
agent_id: agent_id.as_str().to_owned(),
|
||||
@@ -417,6 +422,7 @@ impl AdminService {
|
||||
})
|
||||
.await?;
|
||||
info!(
|
||||
name: "admin.agent.bindings_saved",
|
||||
agent_id = %agent_id.as_str(),
|
||||
version = current_version.version,
|
||||
binding_count = bindings.len(),
|
||||
@@ -531,7 +537,12 @@ impl AdminService {
|
||||
published_by: None,
|
||||
})
|
||||
.await?;
|
||||
info!(agent_id = %agent_id.as_str(), version, "agent published");
|
||||
info!(
|
||||
name: "admin.agent.published",
|
||||
agent_id = %agent_id.as_str(),
|
||||
version,
|
||||
"agent published"
|
||||
);
|
||||
|
||||
Ok(PublishAgentResponse {
|
||||
agent_id: agent_id.as_str().to_owned(),
|
||||
@@ -589,7 +600,11 @@ impl AdminService {
|
||||
self.registry
|
||||
.unpublish_agent(workspace_id, agent_id, &updated_at)
|
||||
.await?;
|
||||
info!(agent_id = %agent_id.as_str(), "agent moved to draft");
|
||||
info!(
|
||||
name: "admin.agent.unpublished",
|
||||
agent_id = %agent_id.as_str(),
|
||||
"agent moved to draft"
|
||||
);
|
||||
|
||||
Ok(AgentMutationResult {
|
||||
agent_id: agent_id.as_str().to_owned(),
|
||||
@@ -609,7 +624,11 @@ impl AdminService {
|
||||
self.registry
|
||||
.archive_agent(workspace_id, agent_id, &updated_at)
|
||||
.await?;
|
||||
info!(agent_id = %agent_id.as_str(), "agent archived");
|
||||
info!(
|
||||
name: "admin.agent.archived",
|
||||
agent_id = %agent_id.as_str(),
|
||||
"agent archived"
|
||||
);
|
||||
|
||||
Ok(AgentMutationResult {
|
||||
agent_id: agent_id.as_str().to_owned(),
|
||||
|
||||
Reference in New Issue
Block a user