-
Notifications
You must be signed in to change notification settings - Fork 72
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
Testing Observability Pipeline #3997
Comments
hi @francisan , how are you? Are you planning to use OTel Collector to test the routing? As far as I see in the configurations, you are testing only with logs. You can do with Tracetest, in a mixed approach, by running a test that will trigger an HTTP endpoint and validating its response, like this example: type: Test
spec:
id: PrLoRxqIg
name: Http Bin test
trigger:
type: http
httpRequest:
method: GET
url: https://httpbin.org/get?hello=world
headers:
- key: Content-Type
value: application/json
skipTraceCollection: true Then, manually inspect the OTel Collector logs to see if they are working. Another option is to make your webhook emit traces and then validate it against a Tracing Backend. |
@danielbdias I am good. Suppose if I am exporting logs to Kafka or Splunk, how can I test whether corresponding logs are successfully ingested to corresponding Kafka Topic or Splunk HEC. Need to do the assertion/verification in an automated way, without any manual intervention. |
@danielbdias Any thoughts regarding above question? |
Hello @francisan If I understood it correctly, you want to test your collector configuration regarding the routing of the logs exporters. Unfortunately, it's not possible to use Unfortunately, I'm not aware of any framework to test this scenario specifically. I suppose you could do that automatically by using file exporters for Let me know if I misunderstood your problem. |
Thanks for your reply. What I am thinking is, I will create some Junit Testcases which will invoke the web hook API, and after routing the logs are written to corresponding files (abc.txt or xyz.txt). Through Junit itself I will verify the files contents and if I found name=xyz/abc then I will mark the test case as success. Please share your thoughts. Also, I am facing one issue in webhookevent receiver. If I put any new line in between Json, then rather than considering it as a single log statement, it will consider it as two different log statements. For example, If we use below Json, then it will consider it as a single log. We are good here. But if we use below Json, then it will consider it as 4 different logs. I think, ideally it should consider it as a single log statement. { that is, Why is it behaving in this way? |
I think I would use the same approach for testing your case and I think it works. About the log issue, I don't know As this is specific problem is not related to tracetest, I'll close this issue. But feel free to open another issue if you want to discuss how Tracetest can help you test your observability pipeline or if you face any issues while creating tracetests. We will be more than happy to assist you. |
Hi,
How I can test below pipeline using some sample payload. Want to test/ensure connector routes the request to corresponding pipeline based on the field 'name'.
Want to build something as shown below. Any existing test frameworks available?
The text was updated successfully, but these errors were encountered: