Skip to content
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 #1712

Closed
francisan opened this issue Aug 29, 2024 · 2 comments
Closed

Testing Observability Pipeline #1712

francisan opened this issue Aug 29, 2024 · 2 comments

Comments

@francisan
Copy link

francisan commented Aug 29, 2024

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'.

receivers:
webhookevent:

  endpoint: 0.0.0.0:1111
  path: /get/info

processors:
transform/tr:

   error_mode: ignore
   log_statements:
    - context: log
      statements:
       - set(body, ParseJSON(body)) where body != nil
       - set(resource.attributes["name"], body["name"])

connectors:
routing :
table:
- statement: route() where attributes["name"] == "abc"
pipelines:
- logs/abc
- statement: route() where attributes["name"] == "xyz"
pipelines:
- logs/xyz

exporters:
logging:
loglevel: debug

service:
pipelines:

logs/receivers:
receivers: [webhookevent]
processors: [transform/tr]
exporters: [routing,logging]

logs/abc:
receivers: [routing]
processors: []
exporters: [logging]

logs/xyz:
receivers: [routing]
processors: []
exporters: [logging]

Want to build something as shown below. Any existing test frameworks available?
type: Test
spec:
id: 19L__G7IR
name: Call API
trigger:
type: http
httpRequest:
url: http://host.docker.internal:1111/get/info
method: POST
headers:
- key: Content-Type
value: application/json
specs:

assertions:
- attr:http.status_code  =  200
@danielbdias
Copy link
Contributor

hi @francisan , I noticed this issue is related to your report on kubeshop/tracetest#3997.

I believe that is not related to the OTel Demo itself (feel free to correct me if I'm wrong @puckpuck and @julianocosta89)

Are you trying to validate a behavior on your OTel Collector right?

@francisan
Copy link
Author

@danielbdias Yes, you are right. Will discuss this in other thread (kubeshop/tracetest#3997).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants