Skip to content

feat: add metrics pipeline_resolver_graphql_steps_total and pipeline_resolver_function_steps_total#42

Merged
k1LoW merged 1 commit intomainfrom
step-type
Oct 9, 2025
Merged

feat: add metrics pipeline_resolver_graphql_steps_total and pipeline_resolver_function_steps_total#42
k1LoW merged 1 commit intomainfrom
step-type

Conversation

@k1LoW
Copy link
Copy Markdown
Contributor

@k1LoW k1LoW commented Oct 9, 2025

This pull request adds new metrics to track the number of GraphQL and Function steps within pipeline resolvers, updates the documentation accordingly, and introduces comprehensive tests to ensure correct metric calculation and coverage of edge cases.

Metrics collection enhancements:

  • Added two new metrics: pipeline_resolver_graphql_steps_total and pipeline_resolver_function_steps_total, which count the number of GraphQL and Function steps in all pipeline resolvers, respectively. [1] [2] [3]
  • Updated the README.md to document these new metrics and their purpose.

Testing improvements:

  • Updated existing metric tests to include the new metrics and ensure they are present in all test cases. [1] [2] [3] [4] [5]
  • Added a new test suite (TestClient_Metrics_StepTypes) covering various scenarios for GraphQL and Function step counting, including mixed types, only one type, empty resources, and resolvers with no steps.

@k1LoW k1LoW self-assigned this Oct 9, 2025
@k1LoW k1LoW requested a review from a team as a code owner October 9, 2025 07:27
@k1LoW k1LoW added enhancement New feature or request minor labels Oct 9, 2025
@k1LoW k1LoW enabled auto-merge October 9, 2025 07:28
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Oct 9, 2025

Code Metrics Report

main (347af8b) #42 (b93a748) +/-
Coverage 26.6% 27.5% +0.9%
Code to Test Ratio 1:1.3 1:1.4 +0.1
Test Execution Time 6s 8s +2s
Details
  |                     | main (347af8b) | #42 (b93a748) |  +/-  |
  |---------------------|----------------|---------------|-------|
+ | Coverage            |          26.6% |         27.5% | +0.9% |
  |   Files             |             12 |            12 |     0 |
  |   Lines             |            556 |           563 |    +7 |
+ |   Covered           |            148 |           155 |    +7 |
+ | Code to Test Ratio  |          1:1.3 |         1:1.4 |  +0.1 |
  |   Code              |           1462 |          1483 |   +21 |
+ |   Test              |           1924 |          2178 |  +254 |
- | Test Execution Time |             6s |            8s |   +2s |

Code coverage of files in pull request scope (93.6% → 94.4%)

Files Coverage +/- Status
tailor/metrics.go 94.4% +0.8% modified

Reported by octocov

Copy link
Copy Markdown

@Mistat Mistat left a comment

Choose a reason for hiding this comment

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

LGTM

@k1LoW k1LoW merged commit 6b6f5df into main Oct 9, 2025
1 check passed
@k1LoW k1LoW deleted the step-type branch October 9, 2025 09:35
@github-actions github-actions Bot mentioned this pull request Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants