-
Notifications
You must be signed in to change notification settings - Fork 57
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
SNOW-1843926: SPCS service events & metrics #1954
Open
sfc-gh-ashen
wants to merge
14
commits into
main
Choose a base branch
from
SNOW-1843926-spcs-event-table-snow-cli-integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
SNOW-1843926: SPCS service events & metrics #1954
sfc-gh-ashen
wants to merge
14
commits into
main
from
SNOW-1843926-spcs-event-table-snow-cli-integration
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sfc-gh-ashen
force-pushed
the
SNOW-1843926-spcs-event-table-snow-cli-integration
branch
from
December 13, 2024 22:15
0700514
to
70cc699
Compare
sfc-gh-ashen
changed the title
SNOW-1843926: SPCS service events&metrics
SNOW-1843926: SPCS service events & metrics
Dec 18, 2024
great job with design doc and description on the pr! |
sfc-gh-ashen
commented
Dec 20, 2024
sfc-gh-tkommineni
force-pushed
the
SNOW-1843926-spcs-event-table-snow-cli-integration
branch
from
January 1, 2025 22:43
72e4916
to
d8e47b7
Compare
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.
Pre-review checklist
Changes description
Design Document
1. Events Command:
snow spcs service events
2. Metrics Command:
snow spcs service metrics
Change Motivation
Alternate Approach: Standalone Command (
snow spcs events
)Unified Command Consideration: Instead of separate commands for metrics and events, a unified
snow spcs events
command was considered. This would handle both service and compute pool telemetry.Given these drawbacks, the current design with distinct commands was chosen for clarity and future extensibility.
Design Logic
Required Parameters
For both events and metrics, the following parameters are mandatory to ensure precise identification of the service and its resources:
name
: Service identifier (Service name).--container-name
: Name of the container.--instance-id
: Instance ID of the service (starting with 0).Filtering Options
Time-Based Filters:
--since
: Fetch telemetry data newer than the specified time (e.g.,1h
,5d
).--until
: Fetch telemetry data older than the specified time.Pagination (for Events Only):
--first <N>
: Fetch only the first N events.--last <N>
: Fetch only the last N events.--first
and--last
are mutually exclusive.All Columns Display:
--all
: Fetch all columns from the event or metrics table.Behavior for Metrics
No Filters Provided (
--since
,--until
not used):With Any Filters (
--since
,--until
):Data Formats
Events (Formatted Data)
Metrics (Formatted Data)
Raw Data (
--all
Flag)Use Cases
snow spcs service events
Narrow the time range using interval syntax:
snow spcs service events LOG_EVENT --container-name log-printer --instance-id 0 --since '5 minutes'
Output :
snow spcs service events LOG_EVENT --container-name log-printer --instance-id 0 --until '1 hour'
Retrieve all events with all columns displayed:
Output: Raw table including all available columns.
Retrieve events formatted for JSON output:
Output (JSON):
snow spcs service metrics
Retrieve a subset of metrics with pagination:
Fetch the first 5 metrics:
Or fetch the last 5 metrics:
Output: Formatted table showing the first or last 5 metrics.
Retrieve metrics within a time range:
Fetch metrics newer than 1 hour:
snow spcs service metrics LOG_EVENT --container-name log-printer --instance-id 0 --since '1 hour'
Fetch metrics older than 2 hours:
snow spcs service metrics LOG_EVENT --container-name log-printer --instance-id 0 --until '2 hours'
Output: Metrics within the specified time range.
Retrieve metrics with all columns:
Output: Raw table showing the last metric with all columns.
Retrieve metrics formatted for JSON output:
Output (JSON):