Skip to content

Demonstrate using metrics#45

Merged
mathetake merged 6 commits into
envoyproxy:mainfrom
wtzhang23:metrics-example
Sep 26, 2025
Merged

Demonstrate using metrics#45
mathetake merged 6 commits into
envoyproxy:mainfrom
wtzhang23:metrics-example

Conversation

@wtzhang23

@wtzhang23 wtzhang23 commented Sep 26, 2025

Copy link
Copy Markdown
Contributor

This example records the e2e latency of a route from when a request enters the filter to when it exits.

Depends on #46

@mathetake

mathetake commented Sep 26, 2025

Copy link
Copy Markdown
Member

can you do the update to the latest commit hash in a separate PR and adding the new metrics API in a separate PR?

@mathetake

Copy link
Copy Markdown
Member

The main branch here can be pinned to any latest hash in other words

@wtzhang23

Copy link
Copy Markdown
Contributor Author

Will rebase to main once ready.

@wtzhang23 wtzhang23 force-pushed the metrics-example branch 3 times, most recently from fe1674b to b593bd6 Compare September 26, 2025 15:30
Signed-off-by: William Zhang <wtzhang23@gmail.com>
wtzhang23 and others added 2 commits September 26, 2025 08:36
Signed-off-by: William Zhang <wtzhang23@gmail.com>
Signed-off-by: William Zhang <williamzhang@roblox.com>

@mathetake mathetake left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do you want to add integration test case?

Comment thread rust/src/http_metrics.rs Outdated
///
/// The trait corresponds to a Envoy filter chain configuration.
pub struct FilterConfig {
_filter_config: String,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let's remove _ prefix?

Signed-off-by: William Zhang <williamzhang@roblox.com>
@wtzhang23

wtzhang23 commented Sep 26, 2025

Copy link
Copy Markdown
Contributor Author

Added integration test by parsing the prometheus output. Might be a little overkill. Let me know if you prefer just searching for route_latency_ms_count{version="v1.0.0",route_name="catch_all"} and a simple string split.

@mathetake

Copy link
Copy Markdown
Member

it's alright

@mathetake

Copy link
Copy Markdown
Member

looks good

…eterministic

Signed-off-by: William Zhang <williamzhang@roblox.com>
@wtzhang23

Copy link
Copy Markdown
Contributor Author

Oh oops I didn't like it so went ahead and made it simple lol

@wtzhang23

Copy link
Copy Markdown
Contributor Author

Undid new change

…uld be deterministic"

This reverts commit 354ea16.

Signed-off-by: William Zhang <williamzhang@roblox.com>
@mathetake

Copy link
Copy Markdown
Member

marking ready for review?

@wtzhang23 wtzhang23 marked this pull request as ready for review September 26, 2025 19:50

@mathetake mathetake left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

💯

@mathetake mathetake merged commit 4711818 into envoyproxy:main Sep 26, 2025
9 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.

2 participants