Skip to content

Conversation

@TAOXUY
Copy link
Contributor

@TAOXUY TAOXUY commented Nov 24, 2025

Commit Message: add gauge support in access_loggers.stats
Risk Level:low
Testing:both unit test and integration test are added
Docs Changes: updated in the protobuf comments
Release Notes: updated
Platform Specific Features:no

Signed-off-by: Xuyang Tao <[email protected]>
@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 @mattklein123
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #42226 was opened by TAOXUY.

see: more, trace.

@TAOXUY TAOXUY changed the title AccessLogger: support Gauge in access_loggers.stats Support Gauge in access_loggers.stats Nov 24, 2025
@TAOXUY
Copy link
Contributor Author

TAOXUY commented Nov 24, 2025

@kyessenov

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

/wait

Comment on lines 117 to 118
// A fixed value to add to this counter.
// One of ``value_format`` or ``value_fixed`` must be configured.
Copy link
Member

Choose a reason for hiding this comment

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

This comment needs to be updated for how it relates to the gauge operations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated.

Signed-off-by: Xuyang Tao <[email protected]>
Copy link
Member

@ggreenway ggreenway left a comment

Choose a reason for hiding this comment

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

/wait

google.protobuf.UInt64Value value_fixed = 3 [(validate.rules).uint64 = {gt: 0}];
}

// Configuration for a gauge stat.
Copy link
Member

Choose a reason for hiding this comment

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

I think it's quite tricky to use a gauge correctly (to avoid "leaking" of counts). Please add documentation on correct and incorrect ways this could be configured, with some examples.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated.

Signed-off-by: Xuyang Tao <[email protected]>
Signed-off-by: Xuyang Tao <[email protected]>

// The access log type to emit this gauge. If set, the gauge will only be
// emitted for the specified access log type.
data.accesslog.v3.AccessLogType access_log_type = 5;
Copy link
Member

Choose a reason for hiding this comment

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

This seems like it should be common to all types (counters and histograms). Should this be part of message Stat? Or should it be a top-level configuration on the logger, and user defines multiple loggers, one for each desired value?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants