
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
firestore-metrics
Advanced tools
A library which uses the Cloud Monitoring API v3 to view Firestore metrics.
This is a library which uses the Cloud Monitoring API v3 to view Firestore usage metrics.
Viewer
role should suffice.Console
tab.Quick access
> Basic
, pick Viewer
.FirestoreMetrics
import { FirestoreMetrics } from "firestore-metrics";
async function testApi() {
const firestoreMetrics = new FirestoreMetrics({
projectId: "PROJECT_ID",
keyFile: "./service-account.json",
});
const readUsage = await firestoreMetrics.getReadCount(
"2023-07-22T08:00:00Z",
"2023-07-22T22:42:15Z"
);
console.log(JSON.stringify(readUsage, null, 4));
}
testApi();
Output would look like:
[
{
"type": "QUERY",
"interval": {
"startTime": "2023-08-21T16:15:00Z",
"endTime": "2023-08-21T16:16:00Z"
},
"count": 26
},
{
"type": "QUERY",
"interval": {
"startTime": "2023-08-21T16:14:00Z",
"endTime": "2023-08-21T16:15:00Z"
},
"count": 15
},
{
"type": "QUERY",
"interval": {
"startTime": "2023-08-21T15:51:00Z",
"endTime": "2023-08-21T15:52:00Z"
},
"count": 11
}
]
import { FirestoreMetrics } from "firestore-metrics";
async function testApi() {
const firestoreMetrics = new FirestoreMetrics({
projectId: "PROJECT_ID",
keyFile: "./service-account.json",
});
const writeUsage = await firestoreMetrics.getWriteCount(
"2023-08-21T15:00:00Z",
"2023-08-21T20:00:00Z"
);
console.log(JSON.stringify(writeUsage, null, 4));
}
testApi();
Output would look like:
[
{
"op": "CREATE",
"interval": {
"startTime": "2023-08-21T16:09:00Z",
"endTime": "2023-08-21T16:10:00Z"
},
"count": 1
},
{
"op": "UPDATE",
"interval": {
"startTime": "2023-08-21T16:15:00Z",
"endTime": "2023-08-21T16:16:00Z"
},
"count": 1
},
{
"op": "UPDATE",
"interval": {
"startTime": "2023-08-21T16:09:00Z",
"endTime": "2023-08-21T16:10:00Z"
},
"count": 1
}
]
Just provide the path to your service-account
file
const firestoreMetrics = new FirestoreMetrics({
projectId: "PROJECT_ID",
keyFile: "./service-account.json",
});
FAQs
A library which uses the Cloud Monitoring API v3 to view Firestore metrics.
The npm package firestore-metrics receives a total of 2 weekly downloads. As such, firestore-metrics popularity was classified as not popular.
We found that firestore-metrics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.