zipkin-gcp icon indicating copy to clipboard operation
zipkin-gcp copied to clipboard

Support the v2 upload format

Open codefromthecrypt opened this issue 8 years ago • 21 comments

Zipkin's v2 format is a lot easier to parse (eventhough in reality it will take a while for instrumentation to start using it). It might be worthwhile supporting: openzipkin/zipkin#1684

codefromthecrypt avatar Aug 10 '17 14:08 codefromthecrypt

I'm attempting to send v2 spans to the docker image documented here https://cloud.google.com/trace/docs/zipkin#option_1_using_a_container_image_to_set_up_your_server and getting Malformed reading List<Span> from json. Is this the relevant issue?

jsw avatar Apr 04 '18 05:04 jsw

Those instructions are out of date. Can you try openzipkin/zipkin-gcp image from docker-zipkin-gcp repo or what is mentioned here?

codefromthecrypt avatar Apr 04 '18 06:04 codefromthecrypt

Thanks for the quick response! Some combination of switching to that image and fixing my curl parameters gives me a 202. Where's the best place to get further troubleshooting as to why I'm not seeing the traces show up in Stackdriver Trace? I'm running the image inside k8s via kubectl run.

jsw avatar Apr 04 '18 16:04 jsw

if you get a 202, then there was no problem parsing the json. You can turn on debug https://github.com/openzipkin/zipkin/blob/master/zipkin-server/README.md#logging to see if there are any upload errors to stackdriver. You can also look at stats https://github.com/openzipkin/zipkin/blob/master/zipkin-server/README.md#collector to see if you have any drop metrics. Stats, you can either use normal endpoint or something like our prometheus example. https://github.com/openzipkin/docker-zipkin#prometheus

ex JAVA_OPTS="-Dlogging.level.zipkin=DEBUG -Dlogging.level.zipkin2=DEBUG" enables debug

Finally, if you can use a normal zipkin server temporarily, capture a trace and then send the v2 json back we can have a look. Ex http://host:9411/api/v2/trace/your_trace_id

codefromthecrypt avatar Apr 08 '18 02:04 codefromthecrypt

@adriancole Thanks for the tips. I just got it working. Some feedback that may be helpful for clearing up the documentation here and on google.

  • https://www.googleapis.com/auth/trace.append oauth scope is required
  • gcr.io/stackdriver-trace-docker/zipkin-collector works OOTB
  • openzipkin/zipkin-gcp only works if I pass STORAGE_TYPE=stackdriver (expected?)

For reference, my commands to get each to work look like

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

jsw avatar Apr 09 '18 19:04 jsw

Thanks for the notes. Yes STORAGE_TYPE=stackdriver is required as literally this is an extension of the normal server. For example, you can still use cassandra storage if you want plus any current and future google cloud service options. I'll try to make this more clear on the readme. Thanks tons for the feedback and congrats getting things working!

On Tue, Apr 10, 2018 at 3:05 AM, Jeff White [email protected] wrote:

@adriancole https://github.com/adriancole Thanks for the tips. I just got it working. Some feedback that may be helpful for clearing up the documentation here and on google https://cloud.google.com/trace/docs/zipkin#option_1_using_a_container_image_to_set_up_your_server .

  • https://www.googleapis.com/auth/trace.append oauth scope is required
  • gcr.io/stackdriver-trace-docker/zipkin-collector works OOTB
  • openzipkin/zipkin-gcp only works if I pass STORAGE_TYPE=stackdriver (expected?)

For reference, my commands to get each to work look like

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openzipkin/zipkin-gcp/issues/42#issuecomment-379859937, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD619kVZ8bkXB1HwGXQZK-O6MA-ggT6ks5tm7D1gaJpZM4OzgcQ .

codefromthecrypt avatar Apr 10 '18 00:04 codefromthecrypt

https://github.com/openzipkin/zipkin-gcp/issues/74 to follow-up on README

codefromthecrypt avatar Apr 10 '18 00:04 codefromthecrypt

Can you clarify the original intent of this issue, as it seems that v2 is supported by way of /api/v2/spans?

jsw avatar Apr 10 '18 00:04 jsw

Yep. We wandered a bit from that, but it is ok ;)

On Tue, 10 Apr 2018, 08:27 Jeff White, [email protected] wrote:

Can you clarify the original intent of this issue, as it seems that v2 is supported by way of /api/v2/spans?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openzipkin/zipkin-gcp/issues/42#issuecomment-379935258, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD613R-yolA9eOg4MrfYI5DiBY8t63Oks5tm_xWgaJpZM4OzgcQ .

codefromthecrypt avatar Apr 10 '18 00:04 codefromthecrypt

Now I'm really curious what Support the v2 upload format refers to, especially if it's something I might run into :-)

jsw avatar Apr 10 '18 00:04 jsw

oh. well this is done by virtue of the project re-org, as the default server build supports v2 format. v2 format is that swagger api you mentioned, and what all the new instrumentation use: https://github.com/openzipkin/zipkin-reporter-java

The "v1" format still exists also via translation

codefromthecrypt avatar Apr 10 '18 00:04 codefromthecrypt

Just tried image: gcr.io/stackdriver-trace-docker/zipkin-collector with GCP and Kubernetes and it didn't work. Replaced it with image: openzipkin/zipkin-gcp with env variable STORAGE_TYPE=stackdriver and immediately started to see traces in Stackdriver

artemyarulin avatar Nov 13 '18 15:11 artemyarulin

@artemyarulin the image you mention is the right one from https://github.com/openzipkin/docker-zipkin-gcp

Is there a doc still mentioning gcr.io/stackdriver-trace-docker/zipkin-collector?

codefromthecrypt avatar Nov 14 '18 00:11 codefromthecrypt

Yeah, reading https://cloud.google.com/trace/docs/zipkin#container-image-option it says docker pull gcr.io/stackdriver-trace-docker/zipkin-collector should be used

artemyarulin avatar Nov 14 '18 00:11 artemyarulin

Yeah, reading https://cloud.google.com/trace/docs/zipkin#container-image-option it says docker pull gcr.io/stackdriver-trace-docker/zipkin-collector should be used

@mtwo I think we meant to change this a while back.. probably forgot to close the loop. can you help?

codefromthecrypt avatar Nov 14 '18 00:11 codefromthecrypt

Shoot, thanks for the heads up. Have the setup steps changed substantially or can I just point to the new link and leave the docs unchanged? Alternatively, should I just have that page direct people to the setup steps on GitHub?

mtwo avatar Nov 14 '18 19:11 mtwo

the non docker instructions change a bit as it is a layer on the normal server https://github.com/openzipkin/zipkin-gcp/tree/master/autoconfigure/storage-stackdriver#quick-start On Thu, Nov 15, 2018 at 3:50 AM Morgan McLean [email protected] wrote:

Shoot, thanks for the heads up. Have the setup steps changed substantially or can I just point to the new link and leave the docs unchanged? Alternatively, should I just have that page direct people to the setup steps on GitHub?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

codefromthecrypt avatar Nov 15 '18 01:11 codefromthecrypt

Ok, I've written a draft of the updated instructions. From looking at the setup steps, docker-zipkin-gcp container will pull in service account credentials automatically on GCP with the following commands:

$ docker run -d -p 9411:9411 \
-e STORAGE_TYPE=stackdriver \
-e GOOGLE_APPLICATION_CREDENTIALS=/root/.gcp/credentials.json \
-e STACKDRIVER_PROJECT_ID=your_project \
-v $HOME/.gcp:/root/.gcp:ro \
openzipkin/zipkin-gcp

Can you confirm?

mtwo avatar Nov 15 '18 02:11 mtwo

just started for me.. of course I made a mistake and literally used the project your_project!

will add an issue, but yeah it works. I tried a trace from netflix

On Thu, Nov 15, 2018 at 10:22 AM Morgan McLean [email protected] wrote:

Ok, I've written a draft of the updated instructions. From looking at the setup steps, docker-zipkin-gcp container will pull in service account credentials automatically on GCP with the following commands:

$ docker run -d -p 9411:9411
-e STORAGE_TYPE=stackdriver
-e GOOGLE_APPLICATION_CREDENTIALS=/root/.gcp/credentials.json
-e STACKDRIVER_PROJECT_ID=your_project
-v $HOME/.gcp:/root/.gcp:ro
openzipkin/zipkin-gcp

Can you confirm?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openzipkin/zipkin-gcp/issues/42#issuecomment-438892399, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD611L4b6bL17VKviSgIv_sm4mUcwmMks5uvM_wgaJpZM4OzgcQ .

codefromthecrypt avatar Nov 15 '18 02:11 codefromthecrypt

Cheers, thanks! I started a CR for the docs, it should ship out sometime next week

mtwo avatar Nov 15 '18 03:11 mtwo

Ok, I've written a draft of the updated instructions. From looking at the setup steps, docker-zipkin-gcp container will pull in service account credentials automatically on GCP with the following commands:

$ docker run -d -p 9411:9411 \
-e STORAGE_TYPE=stackdriver \
-e GOOGLE_APPLICATION_CREDENTIALS=/root/.gcp/credentials.json \
-e STACKDRIVER_PROJECT_ID=your_project \
-v $HOME/.gcp:/root/.gcp:ro \
openzipkin/zipkin-gcp

Can you confirm?

Is this still valid ? I'm not able to get this working on GKE.

toredash avatar Jan 13 '21 14:01 toredash