-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[opampsupervisor] Panic occurred in agent while configuring the TCP log receiver. #39474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I was able to reproduce this panic. Here's the fix #39485 |
@open-telemetry/collector-contrib-maintainers I'm marking this as a |
@VihasMakwana can you confirm if this is only when using the opampsupervisor? I suspect the opampsupervisor is unrelated and the issue is in the component, which would affect its use anywhere |
Sure. I'll confirm that if can trigger panic from elsewhere. |
I am specifically curious if the contrib distro panics when this component is configured |
No, it doesn't. Running this works just fine: service:
pipelines:
logs:
receivers:
- tcplog
exporters:
- debug/basic
receivers:
tcplog:
listen_address: 0.0.0.0:1234
exporters:
debug/basic: $ otelcol-contrib-0.124.1-linux_amd64 --config 0418-tcplog-receiver.yaml
2025-04-18T23:08:14.790+0200 info [email protected]/service.go:199 Setting up own telemetry...
2025-04-18T23:08:14.790+0200 info builders/builders.go:26 Development component. May change in the future.
2025-04-18T23:08:14.793+0200 info [email protected]/service.go:266 Starting otelcol-contrib... {"Version": "0.124.1", "NumCPU": 20}
2025-04-18T23:08:14.793+0200 info extensions/extensions.go:41 Starting extensions...
2025-04-18T23:08:14.793+0200 info adapter/receiver.go:41 Starting stanza receiver
2025-04-18T23:08:14.794+0200 info [email protected]/service.go:289 Everything is ready. Begin running and processing data. |
@TylerHelmuth I also checked other areas that might potentially trigger a panic, but everything seems to be working fine (except running it with opampextension). The panic triggers at this step opentelemetry-collector-contrib/extension/opampextension/opamp_agent.go Lines 412 to 413 in 990e1dc
The exported
We then try to marshal it to yaml and it panics.
yeah, component should exclude such fields (or mark them unexported). |
I’ve recently started exploring OpenTelemetry, and I think it would be beneficial to have a unit test or verification method in place to ensure that the all component configurations are properly marshable to YAML (common method if possible). This would help maintain consistency. As Vishal mentioned, the current issue isn’t reproducible with existing configs, but there’s a chance that new components might not follow the same pattern. |
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description The `SplitFuncBuilder` field is part of the collector's effective configuration, which it shouldn't be. We can't marshal/unmarshal functions. This PR removes it. It also solves a collector panic reported by #39474 <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes #39474 <!--Please delete paragraphs that you did not use before submitting.-->
Can we add auto-generated tests to all components to verify that the component config structure is marshallable? |
Yeah, that was on my mind as well. It should be doable. We can rely on |
I'll open up a follow-up issue. |
…elemetry#39485) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description The `SplitFuncBuilder` field is part of the collector's effective configuration, which it shouldn't be. We can't marshal/unmarshal functions. This PR removes it. It also solves a collector panic reported by open-telemetry#39474 <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#39474 <!--Please delete paragraphs that you did not use before submitting.-->
…elemetry#39485) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description The `SplitFuncBuilder` field is part of the collector's effective configuration, which it shouldn't be. We can't marshal/unmarshal functions. This PR removes it. It also solves a collector panic reported by open-telemetry#39474 <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#39474 <!--Please delete paragraphs that you did not use before submitting.-->
Component(s)
cmd/opampsupervisor, cmd/otelcontribcol, receiver/tcplog, extension/opamp
What happened?
Description
When running collector using OpAMP supervisor it's panic on notifyConfig method for tcplog reciever.
Steps to Reproduce
Use the OpAMP Supervisor to connect with the server and attempt to apply the effective configuration to the provided configuration.
Expected Result
Config should be applied and collector should report back effective config.
Actual Result
Collector was in crashloop back with provided error.
Collector version
v0.123.1
Environment information
OS: Ubuntu 24.04
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: