knative / knative/eventing

PingSource tracing doesn't work anymore

Open
#6,456 1 comment 0 reactions 0 assignees View on GitHub
area/sources kind/bug triage/accepted
Dominant language
Go
Stars
1.6k
Forks
631
Avg merge
2d 1h
Merged PRs (30d)
6

Description

**Describe the bug**

After doing configuration accord to the [document](https://knative.dev/docs/eventing/accessing-traces/#configuring-tracing), no tracing is reported from PingSource.

**Expected behavior**
PingSource should report tracing which should be viewed from zipkin.

**To Reproduce**

1. Set up pingsource following the [guidance](https://knative.dev/docs/eventing/sources/ping-source/)
2. Set up tracing following the [guidance](https://knative.dev/docs/eventing/accessing-traces/#configuring-tracing)
3. Set up zipkin according to the [guidance](https://knative.dev/docs/serving/accessing-traces/#zipkin)
4. Go to the web interface of zipkin, and we will not find any tracing of pingsource

**Knative release version**
the main branch

**Additional context**
I did a debug and located the cause. The issue is caused by both `SetupDynamicPublishing` in `knative-dev/pkg/tracing/setup.go` and `SetupTracing` in `eventing/pkg/adapter/v2/configurator_configmap.go`.

[SetupDynamicPublishing](https://github.com/knative/pkg/blob/main/tracing/setup.go#L45) should call `oct.ApplyConfig(cfg)` at the first time. Since it doesn't call ApplyConfig(cfg), the tracing configuration only takes effect when configmap `config-tracing` is updated.

[SetupTracing](https://github.com/knative/eventing/blob/main/pkg/adapter/v2/configurator_configmap.go#L234) should pass the an empty string as service name other than `pingsource.knative-eventing`. If passing `pingsource.knative-eventing` as the service name, an error `"host lookup failure: lookup pingsource.knative-eventing on 10.96.0.10:53: no such host"` will be reported because there is no service related to PingSource.

After I fixed the issue of `SetupTracing` in my dev environment and made an update of `config-tracing`, I could see traces of pingsource from zipkin web UI.

I'm going to create an issue in "knative-dev/pkg" to track the issue of `SetupDynamicPublishing`. I think the paramters of `SetupDynamicPublishing` might need to be changed. After that, we can fix the issue of `SetupTracing` in eventing. `SetupDynamicPublishing` is called in several places in eventing which might be affected.

Contributor guide

Open the contributing guide

Research direction

Start with pkg/adapter/v2/configurator_configmap.go and inspect SetupTracing, then review knative-dev/pkg/tracing/setup.go and SetupDynamicPublishing. Reproduce the PingSource setup with Zipkin and config-tracing, checking whether tracing appears before and after a configmap update. Done means PingSource traces appear in Zipkin without requiring a later configuration update or resolving a nonexistent PingSource service.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
backend, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.