Skip to content

stats scope for grpc access log should be envoy wide #18066

@lambdai

Description

@lambdai

Description:

Currently an grpc access logger is instantiate using the creator' context. Usually the owner is an filter that can be destroyed.
The logger use the stats scope of the owner. It's fine if the logger is destroyed along with the owner.
However, the grpc access logger is expensive so that logger is cached. The logger can outlive its creator and the logger stats could refer a destroyed counter.

Since the grpc access loggers are shared for good, perhaps we should maintain an grpc access logger manager wide scope.
And generate server wide access_logs.grpc_access_log.logs_written.

Though we lost the detailed "<per_filter_prefix>.access_logs.grpc_access_log.logs_written" stats, but that counter is broken already when the cache is introduced.

cc @mattklein123 @ggreenway @jmarantz

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions