ory / ory/x

Zipkin server_url parsed as an empty string

Open
#583 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
111
Forks
116
PR merge metrics
No merged PRs in 30d

Description

Preflight checklist
Describe the bug

I have trouble setting up tracing in keto, kratos and oathkeeper, and I couldn't find a solution. I configured tracing in each of them, the same way.
In their respective configuration files, I added the following tracing configuration:

tracing:
  service_name: Ory Keto
  providers:
    zipkin:
      server_url: http://tempo:9411/api/v2/spans
  provider: zipkin

I confirmed that http://tempo:9411/api/v2/spans is able to receive zipkin spans, and that they show up in grafana. But the ory services seem not to pick up this url. For example, in the ory keto logs I can see the following:

09T13:10:12Z level=info msg=Zipkin tracer configured! Sending spans to  func=github.com/ory/x/logrusx.(*Logger).Logf file=/go/pkg/mod/github.com/ory/x@v0.0.451/logrusx/helper.go:118 audience=application service_name=Ory Keto service_version=v0.9.0-alpha.0

It seems like the "server_url" is parsed as an empty string. Because of that, the ory services don't send their own spans.
The ory services seem to correctly pick up the trace context from the incoming requests headers, but they don't send spans to the zipkin url. Example of this is in the picture
image (2)
.

Reproducing the bug

Use the provided tracing config

Relevant log output
09T13:10:12Z level=info msg=Zipkin tracer configured! Sending spans to  func=github.com/ory/x/logrusx.(*Logger).Logf file=/go/pkg/mod/github.com/ory/x@v0.0.451/logrusx/helper.go:118 audience=application service_name=Ory Keto service_version=v0.9.0-alpha.0
Relevant configuration
tracing:
  service_name: Ory Keto
  providers:
    zipkin:
      server_url: http://tempo:9411/api/v2/spans
  provider: zipkin
 server_url: "http://tempo:9411/api/v2/spans"

is not working either

Version

0.0.451

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Docker Compose

Additional Context

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the provided tracing configuration and inspect the Zipkin setup associated with github.com/ory/x/logrusx/helper.go:118. Verify how the configured server_url is read and reported in the log. Done means the configured URL appears in the log and spans are sent to the Zipkin endpoint.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.