Skip to content

Commit

Permalink
Merge pull request #1080 from JupiterOne/INT-10872-metrics
Browse files Browse the repository at this point in the history
No Collection Metrics
  • Loading branch information
zemberdotnet authored May 14, 2024
2 parents fa9129b + 795f7fa commit e4d3dbe
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 33 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to

# Unreleased

# 12.7.1 - 2024-05-14

- Add `NO_COLLECTION_METRICS` for disabling data collection metrics

# 12.7.0 - 2024-05-08

- Add expiremental `OnDiskDuplicateKeyTracker`
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"packages/integration-sdk-*",
"packages/cli"
],
"version": "12.7.0"
"version": "12.7.1"
}
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jupiterone/cli",
"version": "12.7.0",
"version": "12.7.1",
"description": "The JupiterOne cli",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand All @@ -24,8 +24,8 @@
"test": "jest"
},
"dependencies": {
"@jupiterone/integration-sdk-core": "^12.7.0",
"@jupiterone/integration-sdk-runtime": "^12.7.0",
"@jupiterone/integration-sdk-core": "^12.7.1",
"@jupiterone/integration-sdk-runtime": "^12.7.1",
"@lifeomic/attempt": "^3.0.3",
"commander": "^5.0.0",
"globby": "^11.0.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/integration-sdk-benchmark/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jupiterone/integration-sdk-benchmark",
"version": "12.7.0",
"version": "12.7.1",
"private": true,
"description": "SDK benchmarking scripts",
"main": "./src/index.js",
Expand All @@ -15,8 +15,8 @@
"benchmark": "for file in ./src/benchmarks/*; do yarn prebenchmark && node $file; done"
},
"dependencies": {
"@jupiterone/integration-sdk-core": "^12.7.0",
"@jupiterone/integration-sdk-runtime": "^12.7.0",
"@jupiterone/integration-sdk-core": "^12.7.1",
"@jupiterone/integration-sdk-runtime": "^12.7.1",
"benchmark": "^2.1.4"
}
}
8 changes: 4 additions & 4 deletions packages/integration-sdk-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jupiterone/integration-sdk-cli",
"version": "12.7.0",
"version": "12.7.1",
"description": "The SDK for developing JupiterOne integrations",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand All @@ -25,8 +25,8 @@
},
"dependencies": {
"@jupiterone/data-model": "^0.55.0",
"@jupiterone/integration-sdk-core": "^12.7.0",
"@jupiterone/integration-sdk-runtime": "^12.7.0",
"@jupiterone/integration-sdk-core": "^12.7.1",
"@jupiterone/integration-sdk-runtime": "^12.7.1",
"chalk": "^4",
"commander": "^9.4.0",
"fs-extra": "^10.1.0",
Expand All @@ -43,7 +43,7 @@
"url-exists": "^1.0.3"
},
"devDependencies": {
"@jupiterone/integration-sdk-private-test-utils": "^12.7.0",
"@jupiterone/integration-sdk-private-test-utils": "^12.7.1",
"@pollyjs/adapter-node-http": "^6.0.5",
"@pollyjs/core": "^6.0.5",
"@pollyjs/persister-fs": "^6.0.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/integration-sdk-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jupiterone/integration-sdk-core",
"version": "12.7.0",
"version": "12.7.1",
"description": "The SDK for developing JupiterOne integrations",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand All @@ -24,7 +24,7 @@
},
"dependencies": {
"@jupiterone/data-model": "^0.57.0",
"@jupiterone/integration-sdk-entity-validator": "^12.7.0",
"@jupiterone/integration-sdk-entity-validator": "^12.7.1",
"lodash": "^4.17.21"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/integration-sdk-dev-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jupiterone/integration-sdk-dev-tools",
"version": "12.7.0",
"version": "12.7.1",
"description": "A collection of developer tools that will assist with building integrations.",
"repository": "[email protected]:JupiterOne/sdk.git",
"author": "JupiterOne <[email protected]>",
Expand All @@ -15,8 +15,8 @@
"access": "public"
},
"dependencies": {
"@jupiterone/integration-sdk-cli": "^12.7.0",
"@jupiterone/integration-sdk-testing": "^12.7.0",
"@jupiterone/integration-sdk-cli": "^12.7.1",
"@jupiterone/integration-sdk-testing": "^12.7.1",
"@types/jest": "^29.5.3",
"@types/node": "^18",
"@typescript-eslint/eslint-plugin": "^6.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/integration-sdk-entities/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jupiterone/integration-sdk-entities",
"version": "12.7.0",
"version": "12.7.1",
"description": "Generated types for the JupiterOne data-model",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/integration-sdk-entity-validator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jupiterone/integration-sdk-entity-validator",
"version": "12.7.0",
"version": "12.7.1",
"description": "Validator for JupiterOne integration entities",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down
8 changes: 4 additions & 4 deletions packages/integration-sdk-http-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jupiterone/integration-sdk-http-client",
"version": "12.7.0",
"version": "12.7.1",
"description": "The HTTP client for use in JupiterOne integrations",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand All @@ -24,15 +24,15 @@
},
"dependencies": {
"@jupiterone/hierarchical-token-bucket": "^0.3.1",
"@jupiterone/integration-sdk-core": "^12.7.0",
"@jupiterone/integration-sdk-core": "^12.7.1",
"@lifeomic/attempt": "^3.0.3",
"form-data": "^4.0.0",
"lodash": "^4.17.21",
"node-fetch": "^2.7.0"
},
"devDependencies": {
"@jupiterone/integration-sdk-dev-tools": "^12.7.0",
"@jupiterone/integration-sdk-private-test-utils": "^12.7.0",
"@jupiterone/integration-sdk-dev-tools": "^12.7.1",
"@jupiterone/integration-sdk-private-test-utils": "^12.7.1",
"@types/node-fetch": "^2.6.11"
},
"bugs": {
Expand Down
4 changes: 2 additions & 2 deletions packages/integration-sdk-private-test-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@jupiterone/integration-sdk-private-test-utils",
"private": true,
"version": "12.7.0",
"version": "12.7.1",
"description": "The SDK for developing JupiterOne integrations",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -15,7 +15,7 @@
"build:dist": "tsc -p tsconfig.json --declaration"
},
"dependencies": {
"@jupiterone/integration-sdk-core": "^12.7.0",
"@jupiterone/integration-sdk-core": "^12.7.1",
"lodash": "^4.17.15"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/integration-sdk-runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jupiterone/integration-sdk-runtime",
"version": "12.7.0",
"version": "12.7.1",
"description": "The SDK for developing JupiterOne integrations",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand All @@ -23,7 +23,7 @@
"prepack": "yarn build:dist"
},
"dependencies": {
"@jupiterone/integration-sdk-core": "^12.7.0",
"@jupiterone/integration-sdk-core": "^12.7.1",
"@lifeomic/alpha": "^5.2.0",
"@lifeomic/attempt": "^3.0.3",
"async-sema": "^3.1.0",
Expand All @@ -40,7 +40,7 @@
"rimraf": "^3.0.2"
},
"devDependencies": {
"@jupiterone/integration-sdk-private-test-utils": "^12.7.0",
"@jupiterone/integration-sdk-private-test-utils": "^12.7.1",
"get-port": "^5.1.1",
"lmdb": "^3.0.8",
"memfs": "^3.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ export async function executeWithContext<
}
}

if (process.env.NO_COLLECTION_METRICS) {
logger.info('Disabling collection metrics');
}

const integrationStepResults = await executeSteps({
executionContext: context,
integrationSteps: config.integrationSteps,
Expand All @@ -296,8 +300,12 @@ export async function executeWithContext<
createStepGraphObjectDataUploader,
beforeAddEntity: config.beforeAddEntity,
beforeAddRelationship: config.beforeAddRelationship,
afterAddEntity: createAfterAddEntityInternalHook(logger),
afterAddRelationship: createAfterAddRelationshipInternalHook(logger),
afterAddEntity: process.env.NO_COLLECTION_METRICS
? undefined
: createAfterAddEntityInternalHook(logger),
afterAddRelationship: process.env.NO_COLLECTION_METRICS
? undefined
: createAfterAddRelationshipInternalHook(logger),
dependencyGraphOrder: config.dependencyGraphOrder,
executionHandlerWrapper: config.executionHandlerWrapper,
});
Expand Down
8 changes: 4 additions & 4 deletions packages/integration-sdk-testing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jupiterone/integration-sdk-testing",
"version": "12.7.0",
"version": "12.7.1",
"description": "Testing utilities for JupiterOne integrations",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand All @@ -23,16 +23,16 @@
"prepack": "yarn build:dist"
},
"dependencies": {
"@jupiterone/integration-sdk-core": "^12.7.0",
"@jupiterone/integration-sdk-runtime": "^12.7.0",
"@jupiterone/integration-sdk-core": "^12.7.1",
"@jupiterone/integration-sdk-runtime": "^12.7.1",
"@pollyjs/adapter-node-http": "^6.0.5",
"@pollyjs/core": "^6.0.5",
"@pollyjs/persister-fs": "^6.0.5",
"deepmerge": "^4.2.2",
"lodash": "^4.17.15"
},
"devDependencies": {
"@jupiterone/integration-sdk-private-test-utils": "^12.7.0",
"@jupiterone/integration-sdk-private-test-utils": "^12.7.1",
"@types/lodash": "^4.14.149",
"get-port": "^5.1.1",
"memfs": "^3.2.0"
Expand Down

0 comments on commit e4d3dbe

Please sign in to comment.