Add App Events logging API - #1459
Draft
kristianpd wants to merge 2 commits into
Draft
Conversation
This file contains hidden or 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
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.
Description
Adds the Ruby SDK counterpart to
shopify-app-jsApp Events logging:ShopifyAPI.logvalidates and posts one App Event to the Global API.ShopifyAPI::Auth::GlobalApiClientCredentials.global_api_client_credentialsmints and caches the app-level JWT.ShopifyAPI::Context.global_api_urlsupports HTTPS-only non-production Global API hosts.401response refreshes the token once. Other HTTP errors propagate to the caller.The request contract uses snake_case JSON, string shop IDs, the
2026-07API version floor, and both actual and documented idempotent replay headers.JavaScript reference: Shopify/shopify-app-js#3368
How has this been tested?
bundle exec ruby -Ilib -Itest test/app_events_test.rbbundle exec ruby -Ilib -Itest test/app_events/event_payload_test.rbbundle exec ruby -Ilib -Itest test/auth/global_api_client_credentials_test.rbbundle exec rake test:library— 390 runs, 769 assertionsbundle exec rubocop— 119 files, no offensesbundle exec srb tccannot run on this Apple Silicon host because the lockedsorbet-staticbinary is x86_64-only:Bad CPU type in executable. CI must provide the typecheck result.The live local-Core smoke minted a Global API token, then the events endpoint returned
503 Service unavailable. Core loggedPG::InternalError: view 'apps.app_installations' not found in view catalogfromVerifyAppInstallation; the SDK request reached the endpoint, but the local Query Engine prerequisite blocked event ingestion.Checklist: