Skip to content

Conversation

Defined2014
Copy link
Contributor

@Defined2014 Defined2014 commented Jun 16, 2025

This reverts commit 3d1708f.

What problem does this PR solve?

Issue Number: close #61766

Problem Summary: Add telemetry related code back, it will print log to files. The code removed PR is #51202

The output log looks like

[2025/06/23 11:06:18.546 +08:00] [INFO] [telemetry.go:67] [category=telemetry] ["telemetry data"="{\"reportTimestamp\":1750647892,\"featureUsage\":{\"txn\":{\"asyncCommitUsed\":false,\"onePCUsed\":false,\"txnCommitCounter\":{\"twoPC\":0,\"asyncCommit\":0,\"onePC\":0},\"mutationCheckerUsed\":true,\"assertionLevel\":\"FAST\",\"rcCheckTS\":false,\"rcWriteCheckTS\":false,\"fairLocking\":true,\"SavepointCounter\":0,\"lazyUniqueCheckSetCounter\":0,\"FairLockingUsageCounter\":{\"txn_fair_locking_used\":0,\"txn_fair_locking_effective\":0}},\"newClusterIndex\":{\"numClusteredTables\":0,\"numTotalTables\":2},\"temporaryTable\":false,\"cte\":{\"nonRecursiveCTEUsed\":0,\"recursiveUsed\":0,\"nonCTEUsed\":15},\"accountLock\":{\"lockUser\":0,\"unlockUser\":0,\"createOrAlterUser\":0},\"cachedTable\":false,\"autoCapture\":false,\"placementPolicy\":{\"numPlacementPolicies\":0,\"numDBWithPolicies\":0,\"numTableWithPolicies\":0,\"numPartitionWithExplicitPolicies\":0},\"nonTransactional\":{\"delete\":0,\"update\":0,\"insert\":0},\"globalKill\":true,\"multiSchemaChange\":{\"multi_schema_change_used\":0},\"exchangePartition\":{\"exchange_partition_cnt\":0},\"tablePartition\":{\"table_partition_cnt\":0,\"table_partition_list_cnt\":0,\"table_partition_range_cnt\":0,\"table_partition_hash_cnt\":0,\"table_partition_range_columns_cnt\":0,\"table_partition_range_columns_gt_1_cnt\":0,\"table_partition_range_columns_gt_2_cnt\":0,\"table_partition_range_columns_gt_3_cnt\":0,\"table_partition_list_columns_cnt\":0,\"table_partition_max_partitions_cnt\":0,\"table_partition_create_interval_partitions_cnt\":0,\"table_partition_add_interval_partitions_cnt\":0,\"table_partition_drop_interval_partitions_cnt\":0,\"table_TablePartitionComactCnt\":0,\"table_reorganize_partition_cnt\":0},\"logBackup\":false,\"enablePaging\":false,\"enableCostModelVer2\":true,\"DDLUsageCounter\":{\"add_index_ingest_used\":0,\"metadata_lock_used\":true,\"flashback_cluster_used\":0,\"dist_reorg_used\":0},\"enableGlobalMemoryControl\":true,\"autoIDNoCache\":false,\"indexMergeUsageCounter\":{\"index_merge_used\":0},\"resourceControl\":{\"resourceControlEnabled\":true,\"numResourceGroups\":1},\"ttlUsage\":{\"ttl_job_enabled\":true,\"ttl_table_count\":0,\"ttl_job_enabled_tables\":0,\"ttl_hist_date\":\"2025-06-22\",\"table_hist_with_delete_rows\":[{\"less_than\":10000,\"count\":0},{\"less_than\":100000,\"count\":0},{\"less_than\":1000000,\"count\":0},{\"less_than\":10000000,\"count\":0},{\"less_than_max\":true,\"count\":0}],\"table_hist_with_delay_time\":[{\"less_than\":1,\"count\":0},{\"less_than\":6,\"count\":0},{\"less_than\":24,\"count\":0},{\"less_than\":72,\"count\":0},{\"less_than_max\":true,\"count\":0}]},\"storeBatchCopr\":{\"batch_size\":4,\"query\":0,\"tasks\":0,\"batched\":0,\"batched_fallback\":0}},\"windowedStats\":[{\"beginAt\":\"2025-06-23T11:03:22.935124584+08:00\",\"executeCount\":7,\"tiFlashUsage\":{\"pushDown\":0,\"exchangePushDown\":0,\"tableScan\":0,\"tableScanWithFastScan\":0},\"coprCacheUsage\":{\"gte0\":4,\"gte1\":0,\"gte10\":0,\"gte20\":0,\"gte40\":0,\"gte80\":0,\"gte100\":0},\"builtinFunctionsUsage\":{\"EQInt\":2,\"PlusInt\":3}},{\"beginAt\":\"2025-06-23T11:04:22.93512986+08:00\",\"executeCount\":0,\"tiFlashUsage\":{\"pushDown\":0,\"exchangePushDown\":0,\"tableScan\":0,\"tableScanWithFastScan\":0},\"coprCacheUsage\":{\"gte0\":0,\"gte1\":0,\"gte10\":0,\"gte20\":0,\"gte40\":0,\"gte80\":0,\"gte100\":0},\"builtinFunctionsUsage\":{}}]}"]

What changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@Defined2014 Defined2014 added the skip-issue-check Indicates that a PR no need to check linked issue. label Jun 16, 2025
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 16, 2025
Copy link

tiprow bot commented Jun 16, 2025

Hi @Defined2014. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link

codecov bot commented Jun 16, 2025

Codecov Report

Attention: Patch coverage is 69.66551% with 263 lines in your changes missing coverage. Please review.

Project coverage is 74.8907%. Comparing base (9f1396b) to head (0186d6b).
Report is 1 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #61753        +/-   ##
================================================
+ Coverage   72.9375%   74.8907%   +1.9532%     
================================================
  Files          1742       1794        +52     
  Lines        483190     492182      +8992     
================================================
+ Hits         352427     368599     +16172     
+ Misses       109165     100473      -8692     
- Partials      21598      23110      +1512     
Flag Coverage Δ
integration 48.7920% <29.2964%> (?)
unit 72.1847% <69.6655%> (-0.0110%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.7804% <ø> (ø)
parser ∅ <ø> (∅)
br 63.0718% <ø> (+16.7318%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Defined2014
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Jun 16, 2025

@Defined2014: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@Defined2014 Defined2014 removed the skip-issue-check Indicates that a PR no need to check linked issue. label Jun 17, 2025
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 23, 2025
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 25, 2025
@Defined2014
Copy link
Contributor Author

/retest

7 similar comments
@Defined2014
Copy link
Contributor Author

/retest

@Defined2014
Copy link
Contributor Author

/retest

@Defined2014
Copy link
Contributor Author

/retest

@Defined2014
Copy link
Contributor Author

/retest

@Defined2014
Copy link
Contributor Author

/retest

@Defined2014
Copy link
Contributor Author

/retest

@Defined2014
Copy link
Contributor Author

/retest

@hawkingrei
Copy link
Member

/retest

3 similar comments
@Defined2014
Copy link
Contributor Author

/retest

@Defined2014
Copy link
Contributor Author

/retest

@Defined2014
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit 15fe8f1 into pingcap:master Jul 4, 2025
27 checks passed
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jul 4, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #62208.
But this PR has conflicts, please resolve them!

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jul 4, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #62209.
But this PR has conflicts, please resolve them!

Defined2014 added a commit to ti-chi-bot/tidb that referenced this pull request Jul 4, 2025
Defined2014 added a commit to ti-chi-bot/tidb that referenced this pull request Jul 4, 2025
morgo added a commit to morgo/tidb that referenced this pull request Jul 7, 2025
* origin/master: (79 commits)
  backend/local: add rate limiter for split region and ingest data (pingcap#61555)
  fix(runaway): resolve the dead channel in UpdateNewAndDoneWatch (pingcap#61795)
  *: collect subtask summary for `IMPORT INTO` tasks (pingcap#61600)
  tests: update vector cluster test result (pingcap#62174)
  planner: change casetest instance-plan-cache test timeout. (pingcap#62195)
  planner: remove data race for instance plan cache (pingcap#62217)
  *: upgrade pd client to fix keyspace issue (pingcap#62189)
  resource_control: support collecting cross AZ traffic in ru consumption (pingcap#62003)
  test: wait for statistics owner to close on exit (pingcap#62198)
  planner: remove the selection above the table dual (pingcap#62193)
  telemetry: add telemetry related code back (pingcap#61753)
  planner: move physical limit related logic into physical op. (pingcap#62187)
  planner: remove useless code (pingcap#61968)
  retry: enhance retry for ingestor on nextgen (pingcap#62191)
  importinto: encode and ingest step use task keyspace in nextgen (pingcap#62138)
  planner: lift the can-push-to-cop check of aggregation/proj (pingcap#62068)
  ddl: cannot panic with failpoint panic in the DDLNotifier (pingcap#62151)
  planner: skip empty expression in the applyPredicateSimplification (pingcap#62178)
  codec: should also return the value even with error because the error may be ignored in the future (pingcap#62175)
  parser: also reduce literal list with charset (pingcap#61484)
  ...
morgo added a commit to morgo/tidb that referenced this pull request Jul 7, 2025
* origin/master: (79 commits)
  backend/local: add rate limiter for split region and ingest data (pingcap#61555)
  fix(runaway): resolve the dead channel in UpdateNewAndDoneWatch (pingcap#61795)
  *: collect subtask summary for `IMPORT INTO` tasks (pingcap#61600)
  tests: update vector cluster test result (pingcap#62174)
  planner: change casetest instance-plan-cache test timeout. (pingcap#62195)
  planner: remove data race for instance plan cache (pingcap#62217)
  *: upgrade pd client to fix keyspace issue (pingcap#62189)
  resource_control: support collecting cross AZ traffic in ru consumption (pingcap#62003)
  test: wait for statistics owner to close on exit (pingcap#62198)
  planner: remove the selection above the table dual (pingcap#62193)
  telemetry: add telemetry related code back (pingcap#61753)
  planner: move physical limit related logic into physical op. (pingcap#62187)
  planner: remove useless code (pingcap#61968)
  retry: enhance retry for ingestor on nextgen (pingcap#62191)
  importinto: encode and ingest step use task keyspace in nextgen (pingcap#62138)
  planner: lift the can-push-to-cop check of aggregation/proj (pingcap#62068)
  ddl: cannot panic with failpoint panic in the DDLNotifier (pingcap#62151)
  planner: skip empty expression in the applyPredicateSimplification (pingcap#62178)
  codec: should also return the value even with error because the error may be ignored in the future (pingcap#62175)
  parser: also reduce literal list with charset (pingcap#61484)
  ...
morgo added a commit to morgo/tidb that referenced this pull request Jul 7, 2025
* origin/master: (79 commits)
  backend/local: add rate limiter for split region and ingest data (pingcap#61555)
  fix(runaway): resolve the dead channel in UpdateNewAndDoneWatch (pingcap#61795)
  *: collect subtask summary for `IMPORT INTO` tasks (pingcap#61600)
  tests: update vector cluster test result (pingcap#62174)
  planner: change casetest instance-plan-cache test timeout. (pingcap#62195)
  planner: remove data race for instance plan cache (pingcap#62217)
  *: upgrade pd client to fix keyspace issue (pingcap#62189)
  resource_control: support collecting cross AZ traffic in ru consumption (pingcap#62003)
  test: wait for statistics owner to close on exit (pingcap#62198)
  planner: remove the selection above the table dual (pingcap#62193)
  telemetry: add telemetry related code back (pingcap#61753)
  planner: move physical limit related logic into physical op. (pingcap#62187)
  planner: remove useless code (pingcap#61968)
  retry: enhance retry for ingestor on nextgen (pingcap#62191)
  importinto: encode and ingest step use task keyspace in nextgen (pingcap#62138)
  planner: lift the can-push-to-cop check of aggregation/proj (pingcap#62068)
  ddl: cannot panic with failpoint panic in the DDLNotifier (pingcap#62151)
  planner: skip empty expression in the applyPredicateSimplification (pingcap#62178)
  codec: should also return the value even with error because the error may be ignored in the future (pingcap#62175)
  parser: also reduce literal list with charset (pingcap#61484)
  ...
ti-chi-bot bot pushed a commit that referenced this pull request Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restore telemetry functionality using logging instead of network reporting
7 participants