Skip to content

hubble: add support for SCTP metrics#43535

Merged
gandro merged 1 commit intocilium:mainfrom
Jack-R-lantern:ISSUE-23347/hubble-sctp-metrics
Jan 26, 2026
Merged

hubble: add support for SCTP metrics#43535
gandro merged 1 commit intocilium:mainfrom
Jack-R-lantern:ISSUE-23347/hubble-sctp-metrics

Conversation

@Jack-R-lantern
Copy link
Copy Markdown
Member

@Jack-R-lantern Jack-R-lantern commented Jan 3, 2026

Please ensure your pull request adheres to the following guidelines:

  • For first time contributors, read Submitting a pull request
  • All code is covered by unit and/or runtime tests where feasible.
  • All commits contain a well written commit description including a title,
    description and a Fixes: #XXX line if the commit addresses a particular
    GitHub issue.
  • If your commit description contains a Fixes: <commit-id> tag, then
    please add the commit author[s] as reviewer[s] to this issue.
  • All commits are signed off. See the section Developer’s Certificate of Origin
  • Provide a title or release-note blurb suitable for the release notes.
  • Are you a user of Cilium? Please add yourself to the Users doc
  • Thanks for contributing!

Description

SCTP manages connection state using Chunk Types.
SCTP Chunk Types are transmitted in the payload, not in the header.

Based on RFC 4960, Section 6.10 (Bundling), all control chunks must appear first in the SCTP packet payload.
According to the specification, INIT, INIT_ACK, and SHUTDOWN_COMPLETE must not be bundled with any other chunks.

Due to the rule that control chunks must always come first, SHUTDOWN and SHUTDOWN_ACK cannot be bundled with DATA chunks.
However, control chunks can be bundled together.
As a result, SHUTDOWN and SHUTDOWN_ACK may be missed in certain cases.

Test Scenario

  1. Configuration the following options
    cilium config set enable-sctp true
    cilium config set enable-hubble true
    cilium config set hubble-metrics "sctp"
    cilium config set hubble-metrics-server ":9965"
    cilium config set enable-hubble-open-metrics true
    
  2. Deploy a server and client that use the SCTP protocol.
  3. Send a request from the client to the server
  4. Check hubble_sctp_chunk_types_total increase

Test Result

# HELP hubble_sctp_chunk_types_total SCTP chunk type occurrences
# TYPE hubble_sctp_chunk_types_total counter
hubble_sctp_chunk_types_total{chunk_type="INIT",family="IPv4"} 2
hubble_sctp_chunk_types_total{chunk_type="INIT_ACK",family="IPv4"} 2
hubble_sctp_chunk_types_total{chunk_type="SHUTDOWN",family="IPv4"} 2
hubble_sctp_chunk_types_total{chunk_type="SHUTDOWN_ACK",family="IPv4"} 2
hubble_sctp_chunk_types_total{chunk_type="SHUTDOWN_COMPLETE",family="IPv4"} 2

Fixes: #23347

Metrics are collected for SCTP connections.

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jan 3, 2026
@github-actions github-actions bot added the kind/community-contribution This was a contribution made by a community member. label Jan 3, 2026
@Jack-R-lantern Jack-R-lantern force-pushed the ISSUE-23347/hubble-sctp-metrics branch from 7ed1af3 to e45d8ea Compare January 3, 2026 06:27
@maintainer-s-little-helper
Copy link
Copy Markdown

Commit e45d8ea does not match "(?m)^Signed-off-by:".

Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. label Jan 3, 2026
@Jack-R-lantern Jack-R-lantern force-pushed the ISSUE-23347/hubble-sctp-metrics branch from e45d8ea to 1fb3ac4 Compare January 3, 2026 06:28
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. label Jan 3, 2026
@Jack-R-lantern Jack-R-lantern changed the title hubble: add suport for SCTP metrics hubble: add support for SCTP metrics Jan 3, 2026
@Jack-R-lantern Jack-R-lantern force-pushed the ISSUE-23347/hubble-sctp-metrics branch from 1fb3ac4 to 273abea Compare January 4, 2026 11:05
@Jack-R-lantern Jack-R-lantern marked this pull request as ready for review January 4, 2026 11:29
@Jack-R-lantern Jack-R-lantern requested review from a team as code owners January 4, 2026 11:29
@Jack-R-lantern Jack-R-lantern requested a review from kaworu January 4, 2026 11:29
@Jack-R-lantern Jack-R-lantern force-pushed the ISSUE-23347/hubble-sctp-metrics branch 2 times, most recently from d21eda7 to 508f580 Compare January 4, 2026 13:43
@Jack-R-lantern Jack-R-lantern requested a review from a team as a code owner January 4, 2026 13:43
@Jack-R-lantern Jack-R-lantern marked this pull request as draft January 4, 2026 13:49
@Jack-R-lantern Jack-R-lantern force-pushed the ISSUE-23347/hubble-sctp-metrics branch from 508f580 to afb377f Compare January 4, 2026 13:51
@Jack-R-lantern Jack-R-lantern marked this pull request as ready for review January 4, 2026 14:08
@joestringer joestringer added the release-note/minor This PR changes functionality that users may find relevant to operating Cilium. label Jan 4, 2026
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jan 4, 2026
Copy link
Copy Markdown
Member

@joestringer joestringer left a comment

Choose a reason for hiding this comment

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

The docs changes look good to me, but this will need a look from the hubble reviewers for proper review.

Given that v1.19 feature freeze is imminent (ref), we will likely defer this into the v1.20 development cycle.

@joestringer joestringer added the dont-merge/wait-until-release Freeze window for current release is blocking non-bugfix PRs label Jan 9, 2026
@aanm aanm removed the dont-merge/wait-until-release Freeze window for current release is blocking non-bugfix PRs label Jan 14, 2026
@Jack-R-lantern
Copy link
Copy Markdown
Member Author

/test

@devodev devodev added the kind/enhancement This would improve or streamline existing functionality. label Jan 23, 2026
@devodev devodev added area/metrics Impacts statistics / metrics gathering, eg via Prometheus. area/hubble Impacts hubble server or relay labels Jan 23, 2026
@devodev devodev added this to the 1.20 milestone Jan 23, 2026
@devodev
Copy link
Copy Markdown
Contributor

devodev commented Jan 23, 2026

Ping @cilium/sig-hubble-api

@devodev
Copy link
Copy Markdown
Contributor

devodev commented Jan 23, 2026

@Jack-R-lantern Could you update the release note snippet from the description or remove it altogether if the title is good enough?
Thanks!

@Jack-R-lantern
Copy link
Copy Markdown
Member Author

@Jack-R-lantern Could you update the release note snippet from the description or remove it altogether if the title is good enough? Thanks!

A brief description has been added to the release notes.

SCTP manages connection state using Chunk Types.
SCTP Chunk Types are transmitted in the payload, not in the header.

Based on RFC 4960, Section 6.10 (Bundling), all control chunks must appear first in the SCTP packet payload.
According to the specification, INIT, INIT_ACK, and SHUTDOWN_COMPLETE must not be bundled with any other chunks.

Due to the rule that control chunks must always come first, SHUTDOWN and SHUTDOWN_ACK cannot be bundled with DATA chunks.
However, control chunks can be bundled together.
As a result, SHUTDOWN and SHUTDOWN_ACK may be missed in certain cases.

Signed-off-by: Jack-R-lantern <tjdfkr2421@gmail.com>
@Jack-R-lantern Jack-R-lantern force-pushed the ISSUE-23347/hubble-sctp-metrics branch from afb377f to bceabf6 Compare January 26, 2026 05:00
@Jack-R-lantern
Copy link
Copy Markdown
Member Author

/test

@gandro gandro enabled auto-merge January 26, 2026 09:19
@gandro gandro added this pull request to the merge queue Jan 26, 2026
Merged via the queue into cilium:main with commit 2634c99 Jan 26, 2026
75 of 76 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/hubble Impacts hubble server or relay area/metrics Impacts statistics / metrics gathering, eg via Prometheus. kind/community-contribution This was a contribution made by a community member. kind/enhancement This would improve or streamline existing functionality. release-note/minor This PR changes functionality that users may find relevant to operating Cilium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hubble: add support for SCTP metrics

6 participants