diff --git a/src/steps/groups/converters.ts b/src/steps/groups/converters.ts index 4ecae33..2a4cc57 100644 --- a/src/steps/groups/converters.ts +++ b/src/steps/groups/converters.ts @@ -1,4 +1,7 @@ -import { createIntegrationEntity } from '@jupiterone/integration-sdk-core'; +import { + IntegrationLogger, + createIntegrationEntity, +} from '@jupiterone/integration-sdk-core'; import { Group } from '../../jamf/types'; import { generateEntityKey } from '../../util/generateKey'; import { skippedRawDataSource } from '../../util/graphObject'; @@ -21,3 +24,19 @@ export function createGroupEntity(data: Group) { }, }); } +//INT-8912 +export function printSizeOfField(data: Group, logger: IntegrationLogger) { + logger.info( + { + _class: Entities.GROUP._class.length, + _type: Entities.GROUP._type.length, + _key: generateEntityKey(Entities.GROUP._type, data.id).length, + id: data.id.toString().length, + displayName: data.name.length, + name: data.name.length, + accessLevel: data.access_level?.length, + privilegeSet: data.privilege_set?.length, + }, + 'Size of Group fields', + ); +} diff --git a/src/steps/groups/index.ts b/src/steps/groups/index.ts index bce31ee..0d42cf0 100644 --- a/src/steps/groups/index.ts +++ b/src/steps/groups/index.ts @@ -10,7 +10,7 @@ import { import { IJamfClient, JamfClient } from '../../jamf/client'; import { IntegrationConfig } from '../../config'; import { Entities, IntegrationSteps, Relationships } from '../constants'; -import { createGroupEntity } from './converters'; +import { createGroupEntity, printSizeOfField } from './converters'; import { Group } from '../../jamf/types'; import { getAccountData, getAccountEntity } from '../../util/account'; import { generateEntityKey } from '../../util/generateKey'; @@ -71,7 +71,7 @@ export async function fetchGroups({ await iterateGroupProfiles(client, logger, jobState, async (group) => { const groupEntity = await jobState.addEntity(createGroupEntity(group)); - + printSizeOfField(group, logger); await jobState.addRelationship( createDirectRelationship({ _class: RelationshipClass.HAS,