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

[Bug]: Jaeger not respecting JAEGER_DISABLED=true #5385

Closed
tomsiwik opened this issue Apr 24, 2024 · 15 comments
Closed

[Bug]: Jaeger not respecting JAEGER_DISABLED=true #5385

tomsiwik opened this issue Apr 24, 2024 · 15 comments
Labels
bug good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement

Comments

@tomsiwik
Copy link

tomsiwik commented Apr 24, 2024

What happened?

I'm trying to run jaeger without it's own traces in docker (using environment variable as stated in the documentation). However, when I open the UI and refresh the page the traces are still logged. I've tried pruning/killing all docker images and volumes to no effect.

Steps to reproduce

  1. Run the docker-compose up -d with example docker-compose.yml
  • alternative: Run docker run -e JAEGER_DISABLED=true -p 16686:16686 jaegertracing/all-in-one:1.56
  1. Navigate to http://localhost:16686/
  2. Refresh page and look at traces

Expected behavior

Traces of jaeger-all-in-one should not be visible

Relevant log output

No response

Screenshot

image

Additional context

No response

Jaeger backend version

latest

SDK

No response

Pipeline

No response

Stogage backend

No response

Operating system

M1 Mac

Deployment model

docker,docker-compose

Deployment configs

docker-compose.yml

services:
  jaeger:
    image: jaegertracing/all-in-one:latest
    container_name: jaeger
    environment:
      - JAEGER_DISABLED=true
      - COLLECTOR_OTLP_ENABLED=true
    ports:
      - '16686:16686' # UI @ http://localhost:16686
      - '14250:14250' # TRACES via protobuf
@tomsiwik tomsiwik added the bug label Apr 24, 2024
@tomsiwik tomsiwik changed the title [Bug]: [Bug]: Jaeger not respecting JAEGER_DISABLED=true Apr 24, 2024
@varshith257
Copy link
Contributor

@yurishkuro I have also tried with it and traces are appearing as mentioned above in issue. I think we need a fix for this

@yurishkuro
Copy link
Member

what is JAEGER_DISABLED? Where is it documented?

@varshith257
Copy link
Contributor

varshith257 commented Apr 24, 2024

I think he introduced a variable in such a way that he can stop Jaeger 😅. I just tested with his docker file. He may assuming with that JAEGER_DISABLED=true get Jaeger stop from working.

Maybe he referred wrong documentation or previous one . I think we get clarified from his response of where he referred that variable.

@varshith257
Copy link
Contributor

@tomsiwik Can we get the link of documentation where you referred it?

@tomsiwik
Copy link
Author

tomsiwik commented Apr 25, 2024

Hey, sorry for the late response - different timezones I guess. It's mentioned here:

https://www.jaegertracing.io/docs/1.25/monitoring/#traces
Edit: even on new version - https://www.jaegertracing.io/docs/1.56/monitoring/#traces

@varshith257
Copy link
Contributor

varshith257 commented Apr 25, 2024

But it mentioned to keep that variable while docker run. You have explicitly introduced in Dockerfile instead at docker run cd. Once give it try and let us know

docker run -e JAEGER_DISABLED=true -p 16686:16686 jaegertracing/all-in-one:1.56

@tomsiwik
Copy link
Author

tomsiwik commented Apr 25, 2024

In docker-compose this is the equivalent command to docker, but I tried your line. I'm not using a Dockerfile.
Same thing :(

image

@varshith257
Copy link
Contributor

Got it! Samething resulting getting confused about this variable. There mentioned the traces are of its own components of query service.

Maybe @yurishkuro will know the clear context of this JAEGER_DISABLED=true variable.

@tomsiwik
Copy link
Author

tomsiwik commented Apr 25, 2024

True. Regardless of the naming jaeger-query or jaeger-all-in-one setting the variable to true or false does never show jaeger-query but always jaeger-all-in-one. Ideally, I don't want to see any traces but the services I'm explicitly
collecting them from.

@skocan
Copy link

skocan commented Apr 26, 2024

Hey, I'm having the same issue. Downgrading to jaegertracing 1.47 solved this issue (there is no jaeger-all-in-one but jaeger-query instead, so I think that's the reason why JAEGER_DISABLED=true works), but I would really appreciate some tips how to disable jaeger-all-in-one service.

@varshith257
Copy link
Contributor

@yurishkuro PTAL

@yurishkuro
Copy link
Member

yurishkuro commented Apr 26, 2024

Since we switched to OTEL SDKs (from v1.48.0) this setting is no longer applicable. We need to change the docs (retroactively). There is a setting for OTEL SDK which will have similar effect: OTEL_TRACES_SAMPLER=always_off

@yurishkuro yurishkuro added help wanted Features that maintainers are willing to accept but do not have cycles to implement good first issue Good for beginners labels Apr 26, 2024
@yurishkuro
Copy link
Member

another thing we could do is remap that var, but the prod binaries don't seem to call this function, only hotrod does

func MapJaegerToOtelEnvVars(logger *zap.Logger) {

yurishkuro added a commit to jaegertracing/documentation that referenced this issue May 2, 2024
## Which problem is this PR solving?
- Part of jaegertracing/jaeger#5385

## Description of the changes
- Use OTEL env var that works with OTEL SDKs
- Update all docs starting from v1.48, when OTEL SDK were introduced

## How was this change tested?
- Verified that starting all-in-one as below does not generate traces
```
$ OTEL_TRACES_SAMPLER=always_off go run -tags=ui ./cmd/all-in-one
```

Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro
Copy link
Member

I updated the docs

@yurishkuro
Copy link
Member

Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement
Projects
None yet
Development

No branches or pull requests

4 participants