Skip to content

Conversation

vinothkumarr227
Copy link
Contributor

@vinothkumarr227 vinothkumarr227 commented Jul 10, 2025

Fixes #8311

RELEASE NOTES: N/A

Copy link

codecov bot commented Jul 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.48%. Comparing base (8adcc94) to head (2b67a2b).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8441      +/-   ##
==========================================
+ Coverage   82.31%   82.48%   +0.16%     
==========================================
  Files         414      413       -1     
  Lines       40464    40513      +49     
==========================================
+ Hits        33308    33416     +108     
+ Misses       5791     5744      -47     
+ Partials     1365     1353      -12     

see 27 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eshitachandwani
Copy link
Member

Please link the comment in response to which this PR has been raised. @vinothkumarr227

@vinothkumarr227
Copy link
Contributor Author

@arjan-bal This fix was made following the review comment from in this discussion

@@ -70,8 +70,8 @@ func main() {
// up-to-date list of metrics, see:
// https://grpc.io/docs/guides/opentelemetry-metrics/#instruments
Metrics: opentelemetry.DefaultMetrics().Add(
"grpc.client.attempt.started",
"grpc.client.attempt.duration",
"grpc.xds_client.resource_updates_valid",
Copy link
Member

Choose a reason for hiding this comment

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

Correct me if I am wrong but I dont think we are using xds in this example , so using xds metrics might not make sense. Can you change to use some other metrics? Example : grpc.lb.pick_first. connection_attempts_succeeded

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eshitachandwani , Thanks for the review! I don’t think we need to change this example — we’ve already mentioned that it’s meant to demonstrate experimental metrics. Also, this is aligned with the discussion here: grpc-go#8234 (comment).

Copy link
Member

Choose a reason for hiding this comment

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

But the example in my opinion should be a working example , like if someone is trying to run the example , they should be able to see some metrics. And since the example is not using xds , there will be no metrics for the xds client.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback! I’ve updated the example to use pick_first with a valid address, and it now emits metrics

@vinothkumarr227 vinothkumarr227 removed their assignment Jul 24, 2025
@eshitachandwani eshitachandwani self-assigned this Jul 25, 2025
@eshitachandwani eshitachandwani added Type: Documentation Documentation or examples Area: Observability Includes Stats, Tracing, Channelz, Healthz, Binlog, Reflection, Admin, GCP Observability labels Jul 29, 2025
@eshitachandwani eshitachandwani added this to the 1.75 Release milestone Jul 29, 2025
@eshitachandwani
Copy link
Member

Adding @arjan-bal for a second review.

@eshitachandwani eshitachandwani removed their assignment Jul 29, 2025
@arjan-bal arjan-bal merged commit 0a895bc into grpc:master Jul 30, 2025
15 checks passed
dimpavloff pushed a commit to dimpavloff/grpc-go that referenced this pull request Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Observability Includes Stats, Tracing, Channelz, Healthz, Binlog, Reflection, Admin, GCP Observability Type: Documentation Documentation or examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stats: Update documentation and examples to demonstrate enabling experimental metrics
4 participants