open-telemetry / opentelemetry-demo

This repository contains the OpenTelemetry Astronomy Shop, a microservice-based distributed system intended to illustrate the implementation of OpenTelemetry in a near real-world environment.
https://opentelemetry.io/docs/demo/
Apache License 2.0
1.7k stars 1.07k forks source link

Testing Observability Pipeline #1712

Closed francisan closed 1 week ago

francisan commented 2 weeks ago

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:

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:

danielbdias commented 2 weeks ago

hi @francisan , I noticed this issue is related to your report on https://github.com/kubeshop/tracetest/issues/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 commented 2 weeks ago

@danielbdias Yes, you are right. Will discuss this in other thread (https://github.com/kubeshop/tracetest/issues/3997).