Skip to content

Conversation

@ggreenway
Copy link
Member

@ggreenway ggreenway commented Oct 29, 2025

Commit Message: Added a new access logger which emits configurable metrics.
Risk Level: Low
Testing: New tests added
Docs Changes: Docs in new proto
Release Notes: added
Platform Specific Features: None
Fixes #34168

@repokitteh-read-only
Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #41770 was opened by ggreenway.

see: more, trace.

@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @adisuissa
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #41770 was opened by ggreenway.

see: more, trace.

Signed-off-by: Greg Greenway <[email protected]>
Signed-off-by: Greg Greenway <[email protected]>
Signed-off-by: Greg Greenway <[email protected]>
Signed-off-by: Greg Greenway <[email protected]>
Signed-off-by: Greg Greenway <[email protected]>
Signed-off-by: Greg Greenway <[email protected]>
@ggreenway ggreenway changed the title http: add new filter to record request timing stats access_logger: add new logger to record metrics derived from substitution formatter values Oct 30, 2025
Signed-off-by: Greg Greenway <[email protected]>
Signed-off-by: Greg Greenway <[email protected]>
@ggreenway
Copy link
Member Author

Starting to add some implementation. Completely untested so far. I think I'm doing the StatName storage correctly, but please take a look and let me know.

Copy link
Member

@wbpcode wbpcode left a comment

Choose a reason for hiding this comment

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

Thanks for this great contribution. Some initial comments to the API are added.

@wbpcode wbpcode self-assigned this Oct 31, 2025
Signed-off-by: Greg Greenway <[email protected]>
Signed-off-by: Greg Greenway <[email protected]>
@ggreenway
Copy link
Member Author

/coverage

@repokitteh-read-only
Copy link

Coverage for this Pull Request will be rendered here:

https://storage.googleapis.com/envoy-cncf-pr/41770/coverage/index.html

For comparison, current coverage on main branch is here:

https://storage.googleapis.com/envoy-cncf-postsubmit/main/coverage/index.html

The coverage results are (re-)rendered each time the CI Envoy/Checks (coverage) job completes.

🐱

Caused by: a #41770 (comment) was created by @ggreenway.

see: more, trace.

@ggreenway
Copy link
Member Author

@wbpcode @kyessenov tests and docs are written. This is now fully ready for review.

kyessenov
kyessenov previously approved these changes Nov 6, 2025
getFormatValue(*histogram.value_formatter_, context, stream_info,
histogram.unit_ == Stats::Histogram::Unit::Percent);
if (!computed_value_opt.has_value()) {
continue;
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be useful to add a failure stat? Given we log, not necessary though.

@kyessenov
Copy link
Contributor

LGTM and some feedback. Nothing that can't be fixed later though.

Signed-off-by: Greg Greenway <[email protected]>
Copy link
Contributor

@kyessenov kyessenov left a comment

Choose a reason for hiding this comment

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

Thank you!

@ggreenway
Copy link
Member Author

/retest

@ggreenway
Copy link
Member Author

@wbpcode or @adisuissa this needs an API signoff

Copy link
Member

@wbpcode wbpcode left a comment

Choose a reason for hiding this comment

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

/lgtm api

@repokitteh-read-only repokitteh-read-only bot removed the api label Nov 8, 2025
@wbpcode
Copy link
Member

wbpcode commented Nov 8, 2025

@ggreenway Thanks so much for this PR. This will be a huge change for our users/stats system. 👍

Copy link
Member

@wbpcode wbpcode left a comment

Choose a reason for hiding this comment

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

Code also LGTM. Thanks.

@wbpcode
Copy link
Member

wbpcode commented Nov 8, 2025

I think it would be better to have a detailed document/example to show how it works. But it needn't to be done in this PR anyway.

Copy link
Contributor

@adisuissa adisuissa left a comment

Choose a reason for hiding this comment

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

Thanks overal LGTM.
On thing I suggest clarifying is what happens if there's a conflict between header0set stat name and one that Envoy already has.
/lgtm api

I suggest adding an example showing how to use this extension (either in the api or accompanying doc).

@ggreenway
Copy link
Member Author

/retest

@ggreenway ggreenway enabled auto-merge (squash) November 10, 2025 17:57
@kyessenov
Copy link
Contributor

We could example in a follow-up and close some open stats issue, e.g. #33671 or the one mentioned in #41732.

@ggreenway ggreenway merged commit ac08f4e into envoyproxy:main Nov 10, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export Common Duration Metrics

6 participants