Use stable network attributes - #49465
Conversation
|
Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib. Important reminders:
|
|
/workflow-approve |
1a92092 to
8bf8838
Compare
| @@ -1 +1 @@ | |||
| invalid ruok No newline at end of file | |||
| git stash push -u -m "stable network attributes WIP"invalid ruok No newline at end of file | |||
There was a problem hiding this comment.
🙅
| git stash push -u -m "stable network attributes WIP"invalid ruok | |
| invalid ruok |
| | `logs.jsonParserArray` | beta | When enabled, allows usage of `json_array_parser`. | v0.93.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30321) | | ||
| | `parser.uri.ecscompliant` | alpha | When enabled resulting map will be in semconv compliant format. | v0.103.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32906) | | ||
| | `stanza.synchronousLogEmitter` | alpha | Prevents possible data loss in Stanza-based receivers by emitting logs synchronously. | v0.122.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/35456) | | ||
| | `stanza.useStableNetworkAttributes` | alpha | When enabled, the `tcp_input` and `udp_input` operators emit stable `network.*` semantic convention attributes instead of the deprecated `net.*` attributes when `add_attributes` is enabled. | v0.156.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/49051) | |
There was a problem hiding this comment.
I think I'd prefer a separate feature gate for TCP and UDP.
There was a problem hiding this comment.
I understood but the problem is syslog receiver also reuses the same stanza TCP/UDP input.go implementations. So if we make two gates then for syslog receiver we will get mixed attribute names logs. That will make inconsistent entries.
for example:
TCP logs using network.* while UDP logs still use net.*
There was a problem hiding this comment.
From what I understand, I guess this PR should only focus to the TCP logs. 🙂
While changes related to UDP logs should handle in a separate PR which is IMO is this.
There was a problem hiding this comment.
I initially thought the same that we need feature gate for the TCP logs but again when i found UDP use the same existing network attribute logic and syslog is also dependent on the TCP & UDP input files then i thought shared gate is much better for consistency.
But i m open to get review and make changes if this approach is not ideal.
Pull request dashboard statusStatus last refreshed: 2026-07-27 23:19:48 UTC.
This automated status or its linked feedback items may be incorrect. If something looks wrong, please report it with the result you expected. |
5d8171e to
cd18a0c
Compare
Co-authored-by: Vibhanshu Singh <find.vibhanshu@gmail.com>
|
@andrzej-stencel , @antonblock , @akats7 can you review the PR? |
Description
This PR updates the "use of stable network attributes from deprecated ones" for the
tcp_inputandudp_inputoperators to reflect the migration from deprecatednet.*attributes to the stablenetwork.*semantic conventions.When the
StanzaUseStableNetworkAttributesFeatureGateconfiguration is enabled, users can now opt-in to the stable attributes via a new feature flag.When the feature flag is enabled, the following attributes are replaced:
net.transportnetwork.transport("tcp" / "udp")net.peer.ipnetwork.peer.addressnet.peer.portnetwork.peer.portnet.host.ipnetwork.local.addressnet.host.portnetwork.local.portPlease note that
net.peer.nameandnet.host.nameare being dropped and do not have stable replacements under the new feature flag.client.addressandserver.address) are HTTP-flavored and require making assumptions about which side of the socket is the "client" versus the "server". Such assumptions we cannot safely make for TCP/UDP inputs.stanza.useStableNetworkAttributesfeature flag is enabled, these two attributes will no longer be emitted. Users relying on these attributes for reverse-DNS hostname resolution will need to account for their absence in downstream processing.Link to tracking issue
Fixes #49051
Testing
setStableNetworkAttributesGatefunction added to bothtcp/udp_test.gofiles.Documentation
pkg/stanza/documentation.mdchanged and added theAdded details for
stanza.useStableNetworkAttributesin the relevant operator READMEs / feature flag registry.Authorship