Skip to content

Conversation

TAOXUY
Copy link
Contributor

@TAOXUY TAOXUY commented Aug 25, 2025

See the proto file for the detailed feature description.

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 @markdroth
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #40854 was opened by TAOXUY.

see: more, trace.

@TAOXUY
Copy link
Contributor Author

TAOXUY commented Aug 25, 2025

@kyessenov

TAOXUY added 7 commits August 26, 2025 16:23
Signed-off-by: Xuyang Tao <[email protected]>
Signed-off-by: Xuyang Tao <[email protected]>
Signed-off-by: Xuyang Tao <[email protected]>
Signed-off-by: Xuyang Tao <[email protected]>
Signed-off-by: Xuyang Tao <[email protected]>
Signed-off-by: Xuyang Tao <[email protected]>
Signed-off-by: Xuyang Tao <[email protected]>
@TAOXUY TAOXUY force-pushed the otlpMetricAggregation branch from f9f89ae to 1805eb8 Compare August 26, 2025 16:23
TAOXUY added 5 commits August 29, 2025 18:29
Signed-off-by: Xuyang Tao <[email protected]>
Signed-off-by: Xuyang Tao <[email protected]>
Signed-off-by: Xuyang Tao <[email protected]>
Signed-off-by: Xuyang Tao <[email protected]>
return std::make_unique<OpenTelemetryGrpcSink>(otlp_metrics_flusher, grpc_metrics_exporter);
return std::make_unique<OpenTelemetryGrpcSink>(
otlp_metrics_flusher, grpc_metrics_exporter,
server.timeSource().systemTime().time_since_epoch().count());
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like another change?

Copy link
Contributor Author

@TAOXUY TAOXUY Aug 29, 2025

Choose a reason for hiding this comment

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

This is the object construction time which will be used as the last flush time for this first flush.

envoy::extensions::stat_sinks::open_telemetry::v3::SinkConfig::ConversionAction> {
public:
explicit OnMatchAction(
envoy::extensions::stat_sinks::open_telemetry::v3::SinkConfig::ConversionAction config)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe pass by reference and return a reference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The caller create a temporary Action object so we have to do a copy.

I add a TODO to check if we can change that to a move operation.
https://screenshot.googleplex.com/7afqYYXURaDf4Lc

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.

Generally, looks fine to me. But it's hard to compare diff since a lot of code got moved. I'll take a deeper look later.

@@ -107,7 +107,7 @@ class OpenTelemetryGrpcIntegrationTest : public Grpc::GrpcClientIntegrationParam
for (const opentelemetry::proto::metrics::v1::Metric& metric : metrics) {
if (metric.name() == getFullStatName("cluster.membership_change") && metric.has_sum()) {
known_counter_exists = true;
EXPECT_EQ(1, metric.sum().data_points().size());
EXPECT_EQ(2, metric.sum().data_points().size());
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is because we have aggregation logic so the metrics with the same name are aggregated now

TAOXUY added 3 commits August 29, 2025 23:02
Signed-off-by: Xuyang Tao <[email protected]>
Signed-off-by: Xuyang Tao <[email protected]>
Signed-off-by: Xuyang Tao <[email protected]>
TAOXUY added 4 commits August 30, 2025 00:33
Signed-off-by: Xuyang Tao <[email protected]>
Signed-off-by: Xuyang Tao <[email protected]>
Signed-off-by: Xuyang Tao <[email protected]>
Signed-off-by: Xuyang Tao <[email protected]>
@markdroth
Copy link
Contributor

/lgtm api

@repokitteh-read-only repokitteh-read-only bot removed the api label Sep 2, 2025
@kyessenov kyessenov assigned ohadvano and kyessenov and unassigned markdroth Sep 2, 2025
@kyessenov
Copy link
Contributor

@ohadvano Looking for your feedback as you are an owner for the extension. I can give a general review.

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.

4 participants