refactor(secrets): pair Vault credential failure logs and metrics#3747
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vault credential failures incremented
carbide_api_vault_requests_failed_totaland then wrote a separate diagnostic for the same request outcome.Four credential-specific sibling
Events now own those paired signals while preserving each historical log level, message, and context shape. The existing metric-onlyVaultRequestFailedcontinues to cover service-account and certificate failures, and the frozen request/status labels remain unchanged.A table-driven test covers all six failure shapes without adding irrelevant empty context to any operation.
Related issues
Type of Change
Breaking Changes
Testing
The six failure shapes share a
check_valuestable that asserts the returned status, counter delta, and complete log observation for each request type.Verified with:
cargo test -p carbide-secrets(49 passed)cargo make format-nightlycargo make clippycargo make carbide-lintscargo make check-event-namescargo xtask check-metric-docsAdditional Notes
CodeRabbit suggested adding
credential_keyto set/delete failures. That would expand their historical log schemas, so this compatibility pass deliberately leaves those fields out; the rationale is also recorded in the PR conversation.Closes #3735