Skip to content

Commit

Permalink
chore: onboard @carbon/charts-react to ibm telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
francinelucca committed Jan 26, 2024
1 parent f7a0e3a commit 203ab0a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 4 deletions.
9 changes: 9 additions & 0 deletions packages/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,12 @@ For instructions on using the **tabular data format**, see

Customizable options (specific to chart type) can be found
[here](https://charts.carbondesignsystem.com/documentation/modules/interfaces.html)

## <picture><source height="20" width="20" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ibm-telemetry/telemetry-js/main/docs/images/ibm-telemetry-dark.svg"><source height="20" width="20" media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/ibm-telemetry/telemetry-js/main/docs/images/ibm-telemetry-light.svg"><img height="20" width="20" alt="IBM Telemetry" src="https://raw.githubusercontent.com/ibm-telemetry/telemetry-js/main/docs/images/ibm-telemetry-light.svg"></picture> 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).
7 changes: 4 additions & 3 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
},
"files": [
"dist",
"README.md"
"README.md",
"telemetry.yml"
],
"scripts": {
"postinstall": "carbon-telemetry collect --install",
"postinstall": "ibmtelemetry --config=telemetry.yml",
"file:styles": "cp ../core/dist/styles.* dist",
"file:downlevel:dts": "downlevel-dts dist dist",
"postbundle": "concurrently \"yarn:file:*\"",
Expand All @@ -41,7 +42,7 @@
"dependencies": {
"@carbon/charts": "workspace:*",
"@carbon/icons-react": "^11.34.0",
"@carbon/telemetry": "~0.1.0",
"@ibm/telemetry-js": "^1.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
16 changes: 16 additions & 0 deletions packages/react/telemetry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# yaml-language-server: $schema=https://unpkg.com/@ibm/telemetry-config-schema@v1/dist/config.schema.json
version: 1
projectId: 5784a186-6343-49d8-8e9a-1e591596f962
endpoint: "https://collector-prod.1am6wm210aow.us-south.codeengine.appdomain.cloud/v1/metrics"
collect:
npm:
dependencies: null
jsx:
elements:
allowedAttributeNames:
# General
- options
- data
# React
- key
- ref
11 changes: 10 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2227,7 +2227,7 @@ __metadata:
dependencies:
"@carbon/charts": "workspace:*"
"@carbon/icons-react": "npm:^11.34.0"
"@carbon/telemetry": "npm:~0.1.0"
"@ibm/telemetry-js": "npm:^1.2.0"
"@stackblitz/sdk": "npm:1.9.0"
"@types/react": "npm:^18.2.48"
"@types/react-dom": "npm:^18.2.18"
Expand Down Expand Up @@ -3205,6 +3205,15 @@ __metadata:
languageName: node
linkType: hard

"@ibm/telemetry-js@npm:^1.2.0":
version: 1.2.0
resolution: "@ibm/telemetry-js@npm:1.2.0"
bin:
ibmtelemetry: dist/collect.js
checksum: 6b5a154067c52cc8f6abe7bf71308764aa5df361d3d867d8c96862e6196de67799eeb36435355f41ce201a57e75aa9a9279ab461ec7bd98ae5908f06694e3fc4
languageName: node
linkType: hard

"@isaacs/cliui@npm:^8.0.2":
version: 8.0.2
resolution: "@isaacs/cliui@npm:8.0.2"
Expand Down

0 comments on commit 203ab0a

Please sign in to comment.