-
Notifications
You must be signed in to change notification settings - Fork 59
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
Merged
sfc-gh-tkommineni
merged 10 commits into
main
from
SNOW-1843926-spcs-event-table-snow-cli-integration
Jan 14, 2025
Merged
SNOW-1843926: SPCS service events & metrics #1954
sfc-gh-tkommineni
merged 10 commits into
main
from
SNOW-1843926-spcs-event-table-snow-cli-integration
Jan 14, 2025
+1,069
−13
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
4 times, most recently
from
January 7, 2025 15:46
5411ad2
to
5f38795
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments were marked as resolved without a change - did you forget to push?
(if not - please leave a comment why)
sfc-gh-tkommineni
force-pushed
the
SNOW-1843926-spcs-event-table-snow-cli-integration
branch
2 times, most recently
from
January 13, 2025 16:17
281ca39
to
ddab2e9
Compare
sfc-gh-tkommineni
force-pushed
the
SNOW-1843926-spcs-event-table-snow-cli-integration
branch
2 times, most recently
from
January 13, 2025 16:32
89ff3fb
to
58e89ab
Compare
sfc-gh-tkommineni
force-pushed
the
SNOW-1843926-spcs-event-table-snow-cli-integration
branch
from
January 13, 2025 16:53
58e89ab
to
80b0a07
Compare
sfc-gh-pczajka
approved these changes
Jan 14, 2025
sfc-gh-tkommineni
deleted the
SNOW-1843926-spcs-event-table-snow-cli-integration
branch
January 14, 2025 09:20
sfc-gh-pczajka
added a commit
that referenced
this pull request
Jan 14, 2025
* spcs service events&metrics * snapshot and feature flag * add new test * fix test * new table format and new test and new snapshot * fix comment * release notes * fix comments * snapshot update * update snapshots --------- Co-authored-by: Teja Kommineni <teja.kommineni@snowflake.com> Co-authored-by: Patryk Czajka <patryk.czajka@snowflake.com>
This was referenced Jan 14, 2025
Closed
Merged
sfc-gh-pczajka
added a commit
that referenced
this pull request
Jan 14, 2025
* SNOW-1843926: SPCS service events & metrics (#1954) * spcs service events&metrics * snapshot and feature flag * add new test * fix test * new table format and new test and new snapshot * fix comment * release notes * fix comments * snapshot update * update snapshots --------- Co-authored-by: Teja Kommineni <teja.kommineni@snowflake.com> Co-authored-by: Patryk Czajka <patryk.czajka@snowflake.com> * Refactor unreleased commands and hide released spcs flags instead of blocking (#1989) * disable spcs commands if feature flag is disabled; hide logs instead of rising an error * Hide flag instead of command, fix tests * update snapshots * remove streaming flag --------- Co-authored-by: Abby Shen <abby.shen@snowflake.com> Co-authored-by: Teja Kommineni <teja.kommineni@snowflake.com>
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):