Skip to content

Make sure string metrics are dumped in RecDumpRecords#13074

Merged
cmcfarlen merged 1 commit intoapache:masterfrom
cmcfarlen:fix-string-metric-dump
Apr 15, 2026
Merged

Make sure string metrics are dumped in RecDumpRecords#13074
cmcfarlen merged 1 commit intoapache:masterfrom
cmcfarlen:fix-string-metric-dump

Conversation

@cmcfarlen
Copy link
Copy Markdown
Contributor

This bug was preventing string metrics from showing up in plugins like stats_over_http.

@cmcfarlen cmcfarlen added this to the 11.0.0 milestone Apr 9, 2026
@cmcfarlen cmcfarlen self-assigned this Apr 9, 2026
@cmcfarlen cmcfarlen added the Bug label Apr 9, 2026
@cmcfarlen
Copy link
Copy Markdown
Contributor Author

[approve ci autest 1]

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in the records dump path so plugin string metrics (e.g., used by stats_over_http) are included when RecDumpRecords / TSRecordDump enumerates metrics.

Changes:

  • Extend RecDumpRecords() to also emit ts::Metrics::StaticString entries as RECT_PLUGIN / string data.
  • Add a Catch2 unit test that registers a StaticString metric and asserts it appears in RecDumpRecords() output.
  • Wire the new unit test into the test_records target.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/records/RecCore.cc Adds dumping of static string metrics via StaticString::for_each() into RecDumpRecords().
src/records/unit_tests/test_RecDumpRecords.cc New unit test validating string metrics appear in RecDumpRecords() output.
src/records/CMakeLists.txt Adds the new unit test source to the test_records executable.

Comment thread src/records/unit_tests/test_RecDumpRecords.cc
Comment thread src/records/RecCore.cc
@zwoop zwoop self-requested a review April 15, 2026 22:08
@cmcfarlen cmcfarlen merged commit e7e30bb into apache:master Apr 15, 2026
19 checks passed
@github-project-automation github-project-automation bot moved this to For v10.2.0 in ATS v10.2.x Apr 15, 2026
@cmcfarlen cmcfarlen deleted the fix-string-metric-dump branch April 15, 2026 23:07
cmcfarlen added a commit that referenced this pull request Apr 15, 2026
@cmcfarlen cmcfarlen moved this from For v10.2.0 to Picked v10.2.0 in ATS v10.2.x Apr 16, 2026
@cmcfarlen cmcfarlen modified the milestones: 11.0.0, 10.2.0 Apr 16, 2026
@cmcfarlen
Copy link
Copy Markdown
Contributor Author

Cherry-picked to 10.2.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Picked v10.2.0

Development

Successfully merging this pull request may close these issues.

3 participants