-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(sync-service): Separate stack telemetry from application teleme…
…try (#2337) Our cloud version of electric has multiple stacks, one per tenant/database. Since we want metrics from each tenant, this PR separates the stack/tenant specific telemetry from the application/system telemetry. For cloud electric we will then have 1 application metric message and multiple stack metric messages being sent each time we poll.
- Loading branch information
Showing
11 changed files
with
347 additions
and
138 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@core/sync-service": patch | ||
--- | ||
|
||
Electric as a library: Support multiple stacks |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
DROP TABLE temp_values; | ||
|
||
CREATE TEMP TABLE temp_values ( value text[]); | ||
|
||
DO | ||
$do$ | ||
BEGIN | ||
FOR i IN 1..40000 LOOP | ||
INSERT INTO temp_values (value) | ||
SELECT ARRAY( | ||
SELECT floor(random() * 100)::text | ||
FROM generate_series(1, 5) | ||
); | ||
END LOOP; | ||
END | ||
$do$; | ||
|
||
EXPLAIN ANALYZE | ||
SELECT * | ||
FROM temp_values | ||
WHERE ARRAY( | ||
SELECT floor(random() * 100)::text | ||
FROM generate_series(1, 100) | ||
) @> value; | ||
|
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
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
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
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
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
Oops, something went wrong.