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

README clarifications #74

Open
codefromthecrypt opened this issue Apr 10, 2018 · 16 comments
Open

README clarifications #74

codefromthecrypt opened this issue Apr 10, 2018 · 16 comments

Comments

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Apr 10, 2018

per #42 (comment)

We should highlight that this code (which ends up in the openzipkin/zipkin-gcp docker image) replaces the preceding gcr.io/stackdriver-trace-docker/zipkin-collector, but it is different. Primarily, the stackdriver module here is a server extension, not enabled by default. We should also note the oauth scope required for stackdriver quite loudly

https://www.googleapis.com/auth/trace.append oauth scope is required

translation from old to new:

kubectl run zipkin-collector --image=gcr.io/stackdriver-trace-docker/zipkin-collector --expose --port=9411
kubectl run zipkin-gcp --image=openzipkin/zipkin-gcp --env="STORAGE_TYPE=stackdriver" --expose --port=9411

Thanks for the advice @jsw

@jsw
Copy link

jsw commented Apr 10, 2018

Also note that thankfully I did not need to specify GOOGLE_APPLICATION_CREDENTIALS or STACKDRIVER_PROJECT_ID, as expected as those should be inferred from GKE. Or maybe it's the case that I could configure those to send to a different Stackdriver account than the one associated with the current cluster.

I'd also expect STORAGE_TYPE=stackdriver to be a default given what I thought the primary use case for this image is, but based on your previous comments, I'm guessing that may not always be the case?

@codefromthecrypt
Copy link
Member Author

codefromthecrypt commented Apr 10, 2018 via email

@jsw
Copy link

jsw commented Apr 10, 2018

Makes sense. Perhaps the point of the gcr.io/stackdriver-trace-docker/zipkin-collector image is to set stackdriver as the storage? I'm not sure where the associated Dockerfile for that is.

@codefromthecrypt
Copy link
Member Author

codefromthecrypt commented Apr 10, 2018 via email

@codefromthecrypt
Copy link
Member Author

@saturnism @mtwo (or anyone else) do one of you know how to verify an account?

@zachdaniel mentioned this:
In kubernetes getting PERMISSION_DENIED: The caller does not have permission, but I checked and those oauth scopes are granted on the cluster.

I tried to verify what we have and I can't seem to figure it out.

Ex I googled around enough to figure out how to get gcloud installed

brew install caskroom/cask/google-cloud-sdk

I associated it with our account etc.

Then I found this doc to try to see permissions for the service account I use:

16:55 $ gcloud iam service-accounts describe stackdriver-zipkin@zipkin-demo.iam.gserviceaccount.com
displayName: stackdriver-zipkin
email: stackdriver-zipkin@zipkin-demo.iam.gserviceaccount.com
etag: BwVAn_6DdwA=
name: projects/zipkin-demo/serviceAccounts/stackdriver-zipkin@zipkin-demo.iam.gserviceaccount.com
oauth2ClientId: '103291061020214604728'
projectId: zipkin-demo
uniqueId: '103291061020214604728'~/Downloads 
16:58 $ gcloud iam service-accounts get-iam-policy stackdriver-zipkin@zipkin-demo.iam.gserviceaccount.com
etag: ACAB

Basically I see nothing that I could use to help @zachdaniel troubleshoot his access, as I don't know how to even verify mine. Whatever we end up with should likely go into a troubleshooting section.

@mtwo
Copy link
Contributor

mtwo commented Apr 10, 2018

Either Ray or myself can update the docs whenever you wish, just say the word!

I assume that @zachdaniel is using GKE? In that case, the project scope selection is automatic and there's no need to specify a service account or configure anything. However, the Trace API isn't enabled by default - I'm guessing it needs to be enabled and then the errors will go away.

@zachdaniel
Copy link

@mtwo that is correct, that was all I needed :)

@zachdaniel
Copy link

Actually I also needed to ensure the service account had write permissions to the Trace API as well, sorry.

@mtwo
Copy link
Contributor

mtwo commented Apr 11, 2018

@adriancole should I update the GCP docs to point at the new container images? Happy to make the changes if everything is good to go

@codefromthecrypt
Copy link
Member Author

codefromthecrypt commented Apr 11, 2018 via email

@mtwo
Copy link
Contributor

mtwo commented Apr 13, 2018

Right now our docs cover how to get this working via container within GCP, container outside of GCP, or as a .jar. I'm going to keep the container-focused sections and will direct people who want .jar instructions to the documentation here on GitHub.

Sound okay?

@codefromthecrypt
Copy link
Member Author

codefromthecrypt commented Apr 13, 2018 via email

@jsw
Copy link

jsw commented Apr 30, 2018

@mtwo @adriancole Per Google's documentation

Zipkin tracers and the Stackdriver Trace instrumentation libraries can't append spans to the same traces, meaning that traces that are captured in one library won't contain spans for services instrumented in the other type of library... This is because Zipkin and Stackdriver Trace use different formats for propagating trace context between services.

Is there any work being done to resolve this limitation?

@codefromthecrypt
Copy link
Member Author

yep census is the replacement for stackdriver instrumentation moving forward. It uses B3 by default now https://github.com/census-instrumentation/opencensus-specs/blob/master/trace/HTTP.md#propagation

@jsw
Copy link

jsw commented Apr 30, 2018

Nice. I guess the documentation can't quite be updated to reflect that as it looks like the transition to OpenCensus is there for Java, but not, for example, JavaScript, based on what these links go to

https://cloud.google.com/trace/docs/client-libraries

I did find this, but it has no releases, and doesn't seem to be linked to from opencensus.io

https://github.com/census-instrumentation/opencensus-js-core

@toredash
Copy link

Hi,

I was wondering what the status is on the updates to the docs ? I'm having a hard time to identify what images and ENV are required to make this work when running on GKE / GCP.

I'm able to get image gcr.io/stackdriver-trace-docker/zipkin-collector working, but then I need to specify env PROJECT_ID, but I don't see that documented anywhere.

And using the image openzipkin/zipkin-gcp with env STORAGE_TYPE does not work, but thats the one google has documented.

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

No branches or pull requests

5 participants