Skip to content

Conversation

@dprotaso
Copy link
Member

  • Change metrics name to have a common prefix 'kn.activator.stats.conn.*'
  • Encapsulate OTel details into metrics struct

- Change metrics name to have a common prefix 'kn.activator.stats.conn.*'
- Encapsulate OTel details into metrics struct
@knative-prow knative-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 15, 2026
@knative-prow knative-prow bot requested review from linkvt and skonto January 15, 2026 18:25
@dprotaso
Copy link
Member Author

/assign @prashanthjos @linkvt

Thinking about the metric names a bit more - I think they should be a bit more explicit they they relate to stats reporting connection status

@knative-prow
Copy link

knative-prow bot commented Jan 15, 2026

@dprotaso: GitHub didn't allow me to assign the following users: prashanthjos.

Note that only knative members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

Details

In response to this:

/assign @prashanthjos @linkvt

Thinking about the metric names a bit more - I think they should be a bit more explicit they they relate to stats reporting connection status

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@dprotaso
Copy link
Member Author

Looks like there's a flake

panic: Log in goroutine after TestReportStatsSendFailure has completed: 2026-01-15T18:28:23.624Z	ERROR	activator/stat_reporter.go:68	Autoscaler is not reachable from activator. Stats were not sent.	{"error": "connection refused", "stat_message_count": 1}
	

goroutine 9 [running]:
testing.(*common).log(0xc000170c40, {0xc0002680c0, 0xb6})
	/opt/hostedtoolcache/go/1.25.5/x64/src/testing/testing.go:1030 +0x1df
testing.(*common).Logf(0xc000170c40, {0x1639105, 0x2}, {0xc00004f900, 0x1, 0x1})
	/opt/hostedtoolcache/go/1.25.5/x64/src/testing/testing.go:1191 +0x8f
go.uber.org/zap/zaptest.TestingWriter.Write({{0x1826530?, 0xc000170c40?}, 0xf0?}, {0xc000199400, 0xb7, 0x400})
	/home/runner/work/serving/serving/vendor/go.uber.org/zap/zaptest/logger.go:146 +0x11a
go.uber.org/zap/zapcore.(*ioCore).Write(0xc0002338c0, {0x2, {0xc2526a51e53a3648, 0x117105d, 0x1faec80}, {0x0, 0x0}, {0x1682d1c, 0x40}, {0x1, ...}, ...}, ...)
	/home/runner/work/serving/serving/vendor/go.uber.org/zap/zapcore/core.go:99 +0x18e
go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc000211380, {0xc000167a80, 0x2, 0x2})
	/home/runner/work/serving/serving/vendor/go.uber.org/zap/zapcore/entry.go:258 +0x1ed
go.uber.org/zap.(*SugaredLogger).log(0xc00006e648, 0x2, {0x1682d1c, 0x40}, {0x0, 0x0, 0x0}, {0xc000141f18, 0x2, 0x2})
	/home/runner/work/serving/serving/vendor/go.uber.org/zap/sugar.go:355 +0x12d
go.uber.org/zap.(*SugaredLogger).Errorw(...)
	/home/runner/work/serving/serving/vendor/go.uber.org/zap/sugar.go:269
knative.dev/serving/pkg/activator.ReportStats.func1({0xc000036660, 0x1, 0x1?})
	/home/runner/work/serving/serving/pkg/activator/stat_reporter.go:68 +0x7c9
created by knative.dev/serving/pkg/activator.ReportStats in goroutine 8
	/home/runner/work/serving/serving/pkg/activator/stat_reporter.go:59 +0xa5
FAIL	knative.dev/serving/pkg/activator	0.035s

@nader-ziada
Copy link
Member

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jan 15, 2026
@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 30.76923% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.08%. Comparing base (ca98904) to head (d4d5f11).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/activator/metrics.go 30.00% 7 Missing ⚠️
pkg/activator/stat_reporter.go 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16341      +/-   ##
==========================================
+ Coverage   80.06%   80.08%   +0.01%     
==========================================
  Files         216      216              
  Lines       13429    13436       +7     
==========================================
+ Hits        10752    10760       +8     
+ Misses       2317     2316       -1     
  Partials      360      360              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@prashanthjos
Copy link
Contributor

/retest

@knative-prow
Copy link

knative-prow bot commented Jan 15, 2026

@prashanthjos: changing LGTM is restricted to collaborators

Details

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@knative-prow
Copy link

knative-prow bot commented Jan 15, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, prashanthjos

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot merged commit b26a6c6 into knative:main Jan 15, 2026
153 of 154 checks passed
@dprotaso dprotaso deleted the minor-activator-stats-refactor branch January 15, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants