From 1188d16c2785db7ec2f9ea81fcfb44c17b40f73c Mon Sep 17 00:00:00 2001 From: Francine Lucca <40550942+francinelucca@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:54:02 -0500 Subject: [PATCH] =?UTF-8?q?chore:=20onboard=20@carbon/react-native=20to=20?= =?UTF-8?q?IBM=20Telemetry=20=F0=9F=9A=80=20(#175)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 9 ++ package.json | 5 +- telemetry.yml | 407 ++++++++++++++++++++++++++++++++++++++++++++++++++ yarn.lock | 10 +- 4 files changed, 424 insertions(+), 7 deletions(-) create mode 100644 telemetry.yml diff --git a/README.md b/README.md index 6c2c637..c837410 100644 --- a/README.md +++ b/README.md @@ -131,3 +131,12 @@ Fonts can be overridden on individual components by overriding the styles (`font ## Contributing See the [contributing guide](/.github/CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow. + +## IBM Telemetry IBM Telemetry + +This package uses IBM Telemetry to collect metrics data. By installing this +package as a dependency you are agreeing to telemetry collection. To opt out, +see +[Opting out of IBM Telemetry data collection](https://github.com/ibm-telemetry/telemetry-js/tree/main#opting-out-of-ibm-telemetry-data-collection). +For more information on the data being collected, please see the +[IBM Telemetry documentation](https://github.com/ibm-telemetry/telemetry-js/tree/main#ibm-telemetry-collection-basics). \ No newline at end of file diff --git a/package.json b/package.json index 33cac75..aa9829a 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "ios", "cpp", "carbon-react-native.podspec", + "telemetry.yml", "!lib/typescript/example", "!android/build", "!ios/build", @@ -30,7 +31,7 @@ "example": "yarn --cwd example", "bootstrap": "yarn example && yarn && yarn example pods", "example:bump": "node ./scripts/bump-example.js", - "postinstall": "carbon-telemetry collect --install", + "postinstall": "ibmtelemetry --config=telemetry.yml", "docs": "typedoc" }, "keywords": [ @@ -173,6 +174,6 @@ ] }, "dependencies": { - "@carbon/telemetry": "^0.1.0" + "@ibm/telemetry-js": "^1.2.1" } } diff --git a/telemetry.yml b/telemetry.yml new file mode 100644 index 0000000..8df641a --- /dev/null +++ b/telemetry.yml @@ -0,0 +1,407 @@ +# yaml-language-server: $schema=https://unpkg.com/@ibm/telemetry-config-schema@v1/dist/config.schema.json + +version: 1 +projectId: 54796b29-ac43-4958-9cf9-7196743550dc +endpoint: https://collector-prod.1am6wm210aow.us-south.codeengine.appdomain.cloud/v1/metrics +collect: + jsx: + elements: + allowedAttributeNames: + # General + - accessibleText + - actions + - autoCapitalize + - autoCorrect + - breakMode + - buttonProps + - cancelText + - checked + - children + - closeText + - componentProps + - content + - continueText + - customImage + - decrementNumberText + - disableContainerPadding + - disabled + - dismissKeyboardOnPress + - forceDarkMode + - forceView + - forwardRef + - getErrorText + - helperText + - hideLabel + - icon + - id + - imageStyle + - incrementNumberText + - isInvalid + - items + - kind + - label + - labelBreakMode + - labelLink + - lastItem + - leftIcon + - leftItems + - light + - maxLength + - maxMenuHeight + - numberRules + - onBlur + - onChange + - onChangeText + - onDismiss + - onFocus + - onLongPress + - onPress + - onSubmitEditing + - open + - placeholder + - required + - resultsCallback + - rightIcon + - rightItems + - rightLink + - secureTextEntry + - selectedIndex + - source + - status + - style + - subText + - subTitle + - text + - textAreaMinHeight + - textBreakMode + - textType + - title + - togglePasswordText + - tooltipProps + - type + - value + - warningText + - wrapperStyle + # AcceptTerms + - textStrings + # Accordion + - firstAccordion + # ActionSheet + - body + - cancelButtonIndex + - forceCustomActionSheet + - fullBleed + # BaseTextInput + - fullBleedCallback + # BottomSafeAreaColorOverride + - backgroundOverlay + - color + - marginRight + # BottomToolbarPrimaryAction + - position + # Button + - disableDesignPadding + - forceTheme + - iconOnlyMode + - overrideColor + # DataTableCell + - cellText + - noPadding + - width + # DataTableHeader + - primaryAction + - secondaryActions + # DataTableHeaderSelected + - itemsSelectedText + - onCancel + # DataTableRow + - rowText + # DocumentViewer + - disableScrollView + - dismissText + - navigationFooter + - renderChildComponent + - sourceNode + # Dropdown + - unsetText + - valueToText + # ErrorState + - errorCode + - noImage + # FileUploaderItem + - deleteFileButtonText + - errorDetails + - errorTitle + - invalid + - name + - onDelete + # FormItem + - buttonIcon + - descriptionFirstHeader + - overrideActiveCheckboxIcon + - renderToggleCheckboxLeft + - sliderProps + - textInputProps + - toggleValueText + # GrantPermission + - additionalReasoning + - reasoning + # LandingView + - companyImage + - companyImageSize + - continueDisabled + - continueOnLongPress + - continueOnPress + - copyrightText + - longProductName + - privacyPolicyOnLongPress + - privacyPolicyOnPress + - privacyPolicyText + - productImage + - productImageSize + - versionText + # Link + - backButtonMode + - iconSize + - textStyle + # List + - nested + # Loading + - loadingText + # MenuItem + - divider + - iconColor + # Modal + - description + - primaryActionOnPress + - primaryActionText + - secondaryActionOnPress + - secondaryActionText + # NavigationListItem + - customContent + - hasChevron + - onSelectableRowChange + - reverseSubText + - rightText + - selectableSide + - selectableText + - selectableType + - selected + - unreadBadge + # Notification + - actionArea + - dropShadow + - lowContrast + - multiLine + - onDismissText + # Pagination + - currentPage + - onPageChange + - paginationText + - totalPages + # ProgressIndicator + - firstStep + # Search + - clearTextButtonText + - onTextClearPress + - searchIconText + # Slider + - hideRangeLabels + - hideTextInput + - maxValue + - minValue + # Tabs + - scrollMode + # Tag + - onClosePress + - tagType + # Tile + - tileText + # Toggle + - selectedLabelText + - toggled + - toggleWrapperStyle + # Tooltip + - caretPosition + - contentStyle + - height + - linkProps + # TopNavigationBar + - additionalHeaderContent + - headerMode + - leftLink + # TopNavigationBarLogin + - backOnPress + - backText + # UiPanel + - closeOnNoChildrenPress + - onClose + - onCloseText + # UiPanelItem + - hidden + - noChildrenPressCallback + - openOnLoad + # ViewWrapper + - bottomBackgroundColor + - hasBottomNavigation + - hasTopNavigation + - statusBarStyle + - topBackgroundColor + # WebHeader + - mainName + - secondaryName + # React + - key + - ref + allowedAttributeStringValues: + # General - autoCapitalize + - characters + - none + - sentences + - words + # General - breakMode + - head + - middle + - tail + - wrap + # General - forceView + - android + - ios + # General - kind + - danger + - danger-ghost + - danger-tertiary + - error + - ghost + - high-contrast + - high-contrast-inverse + - info + - primary + - secondary + - success + - tertiary + - warning + # General - labelBreakMode + - head + - middle + - tail + - wrap + # General - status + - complete + - edit + - in-progress + - invalid + - pending + - uploading + # General - textBreakMode + - head + - middle + - tail + - wrap + # General - textType + - body-01 + - body-02 + - body-compact-01 + - body-compact-02 + - code-01 + - code-02 + - heading-01 + - heading-02 + - heading-03 + - heading-04 + - heading-05 + - heading-06 + - heading-07 + - heading-compact-01 + - heading-compact-02 + - helper-text-01 + - helper-text-02 + - label-01 + - label-02 + - legal-01 + - legal-02 + # General - type + - access + - body-01 + - body-02 + - body-compact-01 + - body-compact-02 + - button + - camera + - checkbox + - clickable + - code-01 + - code-02 + - date + - default + - divider + - empty + - files + - generic + - header + - header-compact + - heading-01 + - heading-02 + - heading-03 + - heading-04 + - heading-05 + - heading-06 + - heading-07 + - heading-compact-01 + - heading-compact-02 + - helper-text-01 + - helper-text-02 + - label-01 + - label-02 + - large + - legal-01 + - legal-02 + - location + - medium + - notifications + - number + - ordered + - password + - scroll + - slider + - small + - static + - text + - text-area + - toggle + - toggle-inline + - unordered + # BottomToolbarPrimaryAction - position + - center + - left + - right + # Button - forceTheme + - dark + - light + # NavigationListItem - selectableSide + - left + - right + # NavigationListItem - selectableType + - checkbox + - radio + # Tag - tagType + - blue + - cool-gray + - cyan + - gray + - green + - high-contrast + - magenta + - purple + - red + - teal + - warm-gray + # Tooltip - caretPosition + - center + - left + - right + # ViewWrapper - statusBarStyle + - dark-content + - light-content + npm: + dependencies: null diff --git a/yarn.lock b/yarn.lock index f23276f..e1cacf4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1213,11 +1213,6 @@ resolved "https://registry.yarnpkg.com/@carbon/layout/-/layout-11.20.0.tgz#12a88c3f3ac9b659abe0e55c615b9b736f1875d0" integrity sha512-G9eJE3xb/J98Id9VvTA/b4v+2i/c+IiHAhxNPc0PPpPN6C/r6U4gJsG4yPgQnbuIU42cP9L8OvCrQr0mbrCMlA== -"@carbon/telemetry@^0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@carbon/telemetry/-/telemetry-0.1.0.tgz#57b331cd5a855b4abbf55457456da8211624d879" - integrity sha512-kNWt0bkgPwGW0i5h7HFuljbKRXPvIhsKbB+1tEURAYLXoJg9iJLF1eGvWN5iVoFCS2zje4GR3OGOsvvKVe7Hlg== - "@carbon/themes@^11.27.1": version "11.30.0" resolved "https://registry.yarnpkg.com/@carbon/themes/-/themes-11.30.0.tgz#ee62c470e7f569272b95b1e89f8231aefe4cb522" @@ -1471,6 +1466,11 @@ resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c" integrity sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg== +"@ibm/telemetry-js@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@ibm/telemetry-js/-/telemetry-js-1.2.1.tgz#0b12801a683af23bcd2b90d1b83f332b3cca7f0e" + integrity sha512-ZNuqoclscha2RC089RBPkiGzv8g+mQfBOnHDJZEGBFrvsXg0B9lfRGFBSLzCuTR5nFDqVFYb6XqMRu36EiHIDA== + "@isaacs/ttlcache@^1.4.1": version "1.4.1" resolved "https://registry.yarnpkg.com/@isaacs/ttlcache/-/ttlcache-1.4.1.tgz#21fb23db34e9b6220c6ba023a0118a2dd3461ea2"