# Jaeger + Traefik config

**URL:** <https://community.traefik.io/t/jaeger-traefik-config/4913>\
**Category:** Traefik v2\
**Tags:** tracing\
**Created:** [March 13, 2020, 1:01pm UTC](https://community.traefik.io/t/jaeger-traefik-config/4913 "2020-03-13T13:01:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![obeyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/obeyler/32/1558_2.png) [@obeyler](https://community.traefik.io/u/obeyler)\
**Post date:** [March 13, 2020, 1:01pm UTC](https://community.traefik.io/t/jaeger-traefik-config/4913/1 "2020-03-13T13:01:02Z")

</div>

what is the good args to enable jaeger opentracing?

```
          - --tracing.serviceName=traefik-service
          - --tracing=true
          - --tracing.jaeger.samplingServerURL=http://my-jaeger-agent.jaeger:5778/sampling
          - --tracing.jaeger.localAgentHostPort=my-jaeger-agent.jaeger::6831

```

On my jaeger instance I only see trace for jaeger not for traefik  
Need I add something into IngressRoute or service to see the trace of each call inside Jaeger ?  
Is it better to use agent or collector ?

---

<div class="post-metadata">

**Author:** ![obeyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/obeyler/32/1558_2.png) [@obeyler](https://community.traefik.io/u/obeyler)\
**Post date:** [March 19, 2020, 2:17pm UTC](https://community.traefik.io/t/jaeger-traefik-config/4913/2 "2020-03-19T14:17:17Z")

</div>

@ldez Are you sure that traefik with jaeger works fine? I think I've try all possible configuration without any success.(by collector or agent)

---

<div class="post-metadata">

**Author:** ![ldez](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/ldez/32/5_2.png) [@ldez](https://community.traefik.io/u/ldez)\
**Post date:** [March 19, 2020, 2:22pm UTC](https://community.traefik.io/t/jaeger-traefik-config/4913/3 "2020-03-19T14:22:15Z")

</div>

Yes I'm sure:

- [https://github.com/containous/traefik/blob/37fb5298a026fdf6518fae32a5db972e446e152a/integration/tracing\_test.go#L148](https://github.com/containous/traefik/blob/37fb5298a026fdf6518fae32a5db972e446e152a/integration/tracing_test.go#L148)
- [https://github.com/containous/traefik/blob/master/integration/fixtures/tracing/simple-jaeger.toml](https://github.com/containous/traefik/blob/master/integration/fixtures/tracing/simple-jaeger.toml)
- [https://github.com/containous/traefik/blob/master/integration/fixtures/tracing/simple-jaeger-collector.toml](https://github.com/containous/traefik/blob/master/integration/fixtures/tracing/simple-jaeger-collector.toml)
- [https://github.com/containous/traefik/blob/master/integration/resources/compose/tracing.yml](https://github.com/containous/traefik/blob/master/integration/resources/compose/tracing.yml)

---

<div class="post-metadata">

**Author:** ![obeyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/obeyler/32/1558_2.png) [@obeyler](https://community.traefik.io/u/obeyler)\
**Post date:** [March 19, 2020, 2:56pm UTC](https://community.traefik.io/t/jaeger-traefik-config/4913/4 "2020-03-19T14:56:26Z")

</div>

@Idez see somethink really strange. If I use the clusterIp it works. but not with the dns name.  
see:

```
          "--tracing.serviceName=tracing",
          "--tracing=true",
          "--tracing.jaeger=true",
          "--tracing.jaeger.samplingType=const",
          "--tracing.jaeger.samplingParam=1.0",
          "--tracing.jaeger.samplingServerURL=http://my-jaeger-agent.jaeger.svc.cluster.local:5778/sampling",
          "--tracing.jaeger.collector.endpoint=http://my-jaeger-collector.jaeger.svc.cluster.local:14268/api/traces?format=jaeger.thrift"

```

doesnt works  
if I replace "--tracing.jaeger.collector.endpoint=http://my-jaeger-collector.jaeger.svc.cluster.local:14268/api/traces?format=jaeger.thrift" by "--tracing.jaeger.collector.endpoint=http://10.100.200.55:14268/api/traces?format=jaeger.thrift" it works

![image](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/c/c8dca9a80595ae1c8af68e694aeb4a15da4625d7.png)

Inside log file I see:  
time="2020-03-19T15:08:00Z" level=error msg="Tracing jaeger error: error reporting Jaeger span "kube-system-middleware-https@kubernetescrd": Post [http://my-jaeger-collector.jaeger.svc.cluster.local:14268/api/traces?format=jaeger.thrift:](http://my-jaeger-collector.jaeger.svc.cluster.local:14268/api/traces?format=jaeger.thrift:) dial tcp: lookup my-jaeger-collector.jaeger.svc.cluster.local on 169.254.0.2:53: no such host" tracingProviderName=jaeger

---

<div class="post-metadata">

**Author:** ![obeyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/obeyler/32/1558_2.png) [@obeyler](https://community.traefik.io/u/obeyler)\
**Post date:** [March 19, 2020, 2:58pm UTC](https://community.traefik.io/t/jaeger-traefik-config/4913/5 "2020-03-19T14:58:04Z")

</div>

forget that it seems that I've got a pb on my core-dns

---

<div class="post-metadata">

**Author:** ![rdgacarvalho](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/rdgacarvalho/32/1903_2.png) [@rdgacarvalho](https://community.traefik.io/u/rdgacarvalho)\
**Post date:** [April 12, 2020, 1:06am UTC](https://community.traefik.io/t/jaeger-traefik-config/4913/6 "2020-04-12T01:06:55Z")

</div>

I have a smoothly traefik + jaeger integration using service name resolution. Please have a look at below:

```auto
            - --tracing.jaeger=true
            - --tracing.serviceName=traefik-service
            - --tracing.jaeger.samplingParam=1.0
            - --tracing.jaeger.samplingType=const
            - --tracing.jaeger.localAgentHostPort=jaeger-operator-jaeger-agent.monitoring:6831
            - --tracing.jaeger.samplingServerURL=http://jaeger-operator-jaeger-agent.monitoring:5778/sampling

```
