Skip to content

Conversation

@nadilas
Copy link

@nadilas nadilas commented Jun 11, 2020

func NewEndpoint(serviceName string, hostPort string) (*Endpoint, error)

```
func NewEndpoint(serviceName string, hostPort string) (*Endpoint, error)
```
@arbarlow
Copy link
Contributor

Hi there,

I'm not sure this is a typo? this is setting the name and hostname of the service which would be "accounts" and in normal k8s DNS, also be "accounts".

This PR would set the accounts service to be at "https://zipkin:9411" or similar?

@nadilas
Copy link
Author

nadilas commented Jun 11, 2020

Yes yes... Sorry too early today 😆 ... was looking for something else and didn't think this through. Forget it 🤦 You are using this as a local representative, it's fine.

I am trying to smuggle in some global tags and also add the otgrpc.OpenTracingStreamServerInterceptor in one step

@nadilas nadilas closed this Jun 11, 2020
@nadilas
Copy link
Author

nadilas commented Jun 16, 2020

@arbarlow sorry, but I have to double check here. I just tested this version (v1.4.0) in our test system. The line

endpoint, err := zipkin.NewEndpoint(name, name)
if err != nil {
log.Fatal(err)
}

gives me:

2020/06/16 19:06:37 lookup $name: no such host

It still works, but sends everything unknown-service-name.

The only way I can get it to work if I use something like this:

endpoint, _ := zipkin.NewEndpoint(name, "localhost:0")

Also I would appreciate a second parameter: func Tracer(name string, opts ...ReporterOption) opentracing.Tracer

@nadilas nadilas reopened this Jun 16, 2020
@arbarlow
Copy link
Contributor

I'm guessing you're not on kubernetes? Or you're using non standard DNS naming?

@arbarlow
Copy link
Contributor

I think Zipkin tracer will try to do a DNS lookup to confirm the hostname

@nadilas
Copy link
Author

nadilas commented Jun 17, 2020

I'm guessing you're not on kubernetes? Or you're using non standard DNS naming?

I am on kubernetes, but the exposing service is headless and named different than the hardcoded lile service name.

I could change that, but I don’t know zipkin that well, to know what binding to a headless service with 1+ IPs as a new Endpoint would do. Do you have experience with that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants