openzipkin / zipkin-gcp

Reporters and collectors for use in Google Cloud Platform
https://cloud.google.com/trace/docs/zipkin
Apache License 2.0
91 stars 54 forks source link

Support the v2 upload format #42

Open codefromthecrypt opened 7 years ago

codefromthecrypt commented 7 years ago

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

jsw commented 6 years ago

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?

codefromthecrypt commented 6 years ago

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

jsw commented 6 years ago

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.

codefromthecrypt commented 6 years ago

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

jsw commented 6 years ago

@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.

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
codefromthecrypt commented 6 years ago

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 notifications@github.com 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 .

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 commented 6 years ago

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

jsw commented 6 years ago

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

codefromthecrypt commented 6 years ago

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

On Tue, 10 Apr 2018, 08:27 Jeff White, notifications@github.com 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 .

jsw commented 6 years ago

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

codefromthecrypt commented 6 years ago

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

artemyarulin commented 6 years ago

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

codefromthecrypt commented 6 years ago

@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?

artemyarulin commented 6 years ago

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

codefromthecrypt commented 6 years ago

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?

mtwo commented 5 years ago

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?

codefromthecrypt commented 5 years ago

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 notifications@github.com 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.

mtwo commented 5 years ago

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?

codefromthecrypt commented 5 years ago

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 notifications@github.com 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 .

mtwo commented 5 years ago

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

toredash commented 3 years ago

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.