-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
testbed not working with transform processor in config #33193
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
/label help-wanted |
@swamisriman I would say that this error is expected as the "transform" processor is not included within the generated collector used in the testbed tests. List of included processors: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/oteltestbedcol/builder-config.yaml#L28 |
@rogercoll Update: Thanks @rogercoll ! |
Yes, you could add them in the testbed collector factory and add a specific test file for those processors. For example, like the resource attributes one: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/testbed/tests/resource_processor_test.go I would suggest opening an issue first for each processor you want to add, explaining the reasoning behind and what the test is going to assert. |
@rogercoll
I believe each end-user will have their own assertions. So that, users can just test their own config using any processor and write a custom test case similar to resource_processor_test.go |
Hi @rogercoll |
No, I am not a maintainer, but feel free to raise a PR. I would not add all the components to the testbed binary, instead, I would just add the ones that are actually being tested in |
@rogercoll |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
-Stale |
This issue is still relevant because, So that, users can just test their own config using any processor and write a custom test case similar to resource_processor_test.go |
-help wanted |
I understand that we can't have all the components in testbed as per this discussion Closing this issue. For future users who are facing this issue, the quickest hack to use any processor in testbed is to change the binary to
Thanks everyone, for looking into this. |
Component(s)
testbed
What happened?
Description
When we use a test configuration with transform processor, the test case is failing.
Steps to Reproduce
Create a test with transform processor.
Say, in tests/resource_processor_test.go/TestMetricResourceProcessor(...) we add a new transform processor.
Now it looks like this
Run the test
Expected Result
Test should pass.
Because, the transform processor doesn't do anything (it's empty).
Actual Result
Test case failing with the following error
Collector version
v0.100.0
Environment information
Environment
OS: Mac OS Sonoma Version 14.5 (23F79)
Compiler(if manually compiled): go version go1.22.3 darwin/arm64
PS: I'm not sure what
if manually compiled
means.I ran the test with the command
TESTS_DIR=tests make e2e-test
OpenTelemetry Collector configuration
(taken from
configStr
here)Log output
(testbed/tests/results/TestMetricResourceProcessor/set_attribute_on_empty_resource/agent.log)
Additional context
We use a collector config with a series of different processors that do different operations on incoming data.
I am trying to have inputs and expected outputs and test the config if it's doing what is expected.
Can the testbed be used to test the configs with only these processors [attributes resource batch memory_limiter]?
Can't we test other processors?
If not, what is the recommended way to test a pipeline with a series of processors?
The text was updated successfully, but these errors were encountered: