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

Telemetry addon configuration not working #6002

Open
lsergio opened this issue Dec 17, 2024 · 7 comments
Open

Telemetry addon configuration not working #6002

lsergio opened this issue Dec 17, 2024 · 7 comments
Labels
kind/bug Something isn't working
Milestone

Comments

@lsergio
Copy link
Contributor

lsergio commented Dec 17, 2024

What happened?

Create the following Integration with telemetry configuration:

kind: Integration
metadata:
  name: bugtelemetry
spec:  
  sources:
  - name: main.yaml
    content: |-
      - from:
          uri: rest:get:/demo
          steps:
          - setBody:
              constant: "It worked"
  traits:
    health:
      enabled: true
    camel:
      runtimeVersion: 3.2.3
    addons:
      telemetry:
        auto: false
        enabled: true
        endpoint: http://simplest-collector-headless.jaeger.svc.cluster.local:4317
        sampler-ratio: "1.0"
        serviceName: Demo

After it's running, submit some requests to the endpoint and monitor the log:
Eventually we will ser an error exporting the spans:

[1] 2024-12-17 16:52:06,352 SEVERE [io.ope.exp.int.grp.OkHttpGrpcExporter] (OkHttp http://localhost:4317/...) Failed to export spans. The request could not be executed. Full error message: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:4317

Per the error message, the trait is trying to send tracing data to localhost and not the configured endpoint.

Steps to reproduce

No response

Relevant log output

No response

Camel K version

2.4.0

@lsergio lsergio added the kind/bug Something isn't working label Dec 17, 2024
@lsergio
Copy link
Contributor Author

lsergio commented Dec 17, 2024

With runtime 3.15.0, the behavior is the same, although the error message changes a little bit:

[1] 2024-12-17 17:01:05,486 WARNING [io.ope.exp.int.grp.GrpcExporter] (vert.x-eventloop-thread-1) Failed to export spans. Server responded with gRPC status code 2. Error message: Failed to export TraceRequestMarshalers. The request could not be executed. Full error message: Connection refused: localhost/127.0.0.1:4317

@lsergio
Copy link
Contributor Author

lsergio commented Dec 17, 2024

Adding properties to the camel trait fixes the issue:

    camel:
      runtimeVersion: 3.2.3
      properties:
      - quarkus.otel.exporter.otlp.traces.endpoint=http://simplest-collector-headless.jaeger.svc.cluster.local:4317

It looks like the quarkus property names are not the expected ones when we use only the telemetry add on trait.

@squakez
Copy link
Contributor

squakez commented Dec 17, 2024

It's weird as we have E2E test for this. @gansheer any idea why we're not detecting this?

@squakez squakez added this to the 2.6.0 milestone Dec 17, 2024
@lsergio
Copy link
Contributor Author

lsergio commented Dec 17, 2024

@squakez Per Quarkus documentation, the property is quarkus.otel.exporter.otlp.traces.endpoint, but here I can see we're using quarkus.opentelemetry.tracer.exporter.otlp.endpoint.

My guess is that we have upgraded Quarkus and didn't realize the properties have changed.

@squakez
Copy link
Contributor

squakez commented Dec 19, 2024

Hello. Thanks for reporting. Yeah, the problem with those properties is that unfortunately we see many changes. I think that, looking at the future of the product, we need to make things more flexible. We're deprecating those traits that are purely based on Camel properties, so, I think also the telemetry trait may go in that direction. At the end of the day, having to set a camel property or a Camel K trait, won't change that much from UX perspective.

@lsergio
Copy link
Contributor Author

lsergio commented Dec 20, 2024

I see your point. At the end we might only need the trait or some sort of configuration to enable telemetry and include the required dependencies. Perhaps using the dependencies field on the spec is enough.

@squakez
Copy link
Contributor

squakez commented Dec 22, 2024

This one is intersecting with #5904 - ideally, when we provide some Camel property, we should be able to include the required dependency. In this way we enhance the UX as we limit the input required by the user to any given Camel property only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants