Skip to content

Add GitHub Action test for data analytics telemetry monitoring #9

Add GitHub Action test for data analytics telemetry monitoring

Add GitHub Action test for data analytics telemetry monitoring #9

Workflow file for this run

name: Analytics Telemetry Check
on:
pull_request:
branches:
- main
jobs:
check-for-deprecated-v1-telemetry:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check for deprecated telemetry calls
shell: bash
run: |
echo "Checking for deprecated telemetry calls"
set -e
matches=$(grep -rn "logEvent\|telemetryService.log\|logEvents\|eventLogger\.log" --include="*.{js,ts,tsx,yml}" || true)
echo "matches: ${matches}"
# run: |
# MATCHES="$(grep -rn "logEvent\|telemetryService.log\|logEvents\|eventLogger\.log" --include="*.{js,ts,tsx}")"
# echo "matches: ${MATCHES}"
# if [ -n "$MATCHES" ]; then
# echo "Deprecated telemetry calls found"
# echo "::error::Deprecated telemetry calls found: ${MATCHES}"
# exit 1
# fi
# check-telemetry-event:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Check for telemetry event with numbers
# shell: bash
# run: |
# MATCHES=$(grep -rn "telemetryRecorder\.recorderEvent\([^)]*\d+[^)]*\)" --include="*.{js,ts,tsx}")
# if [ -n "$MATCHES" ]; then
# echo "::error::Telemetry events with numbers found: $MATCHES"
# exit 1
# fi