Giter VIP home page Giter VIP logo

zipkin-gcp's Introduction

Gitter chat Build Status Download

zipkin-gcp

Shared libraries that provide Zipkin integration with the Google Cloud Platform. Requires JRE 6 or later.

Usage

These components integrate traced applications and servers through Google Cloud services via interfaces defined in Zipkin and zipkin-reporter-java.

Senders

The component in an traced application that sends timing data (spans) out of process is called a Sender. Senders are called on interval by an async reporter.

NOTE: Applications can be written in any language, while we currently only have senders in Java, senders in other languages are welcome.

Sender Description
Stackdriver Trace Free cloud service provider

Collectors

The component in a zipkin server that receives trace data is called a collector. This decodes spans reported by applications and persists them to a configured storage component.

Collector Description

Storage

The component in a zipkin server that persists and queries collected data is called StorageComponent. This primarily supports the Zipkin Api and all collector components.

Storage Description
Stackdriver Trace Free cloud service provider

Server integration

In order to integrate with zipkin-server, you need to use properties launcher to load your collector (or sender) alongside the zipkin-server process.

To integrate a module with a Zipkin server, you need to:

  • add a module jar to the loader.path
  • enable the profile associated with that module
  • launch Zipkin with PropertiesLauncher

Each module will also have different minimum variables that need to be set.

Ex.

$ curl -sSL https://zipkin.io/quickstart.sh | bash -s
$ curl -sSL https://zipkin.io/quickstart.sh | bash -s io.zipkin.java:zipkin-autoconfigure-storage-stackdriver:LATEST:module stackdriver.jar
$ STORAGE_TYPE=stackdriver STACKDRIVER_PROJECT_ID=zipkin-demo \
    java \
    -Dloader.path='stackdriver.jar,stackdriver.jar!/lib' \
    -Dspring.profiles.active=stackdriver \
    -cp zipkin.jar \
    org.springframework.boot.loader.PropertiesLauncher

Example integrating Stackdriver Storage

If you cannot use our Docker image, you can still integrate yourself by downloading a couple jars.

Here's an example of integrating Stackdriver storage.

Troubleshooting translation issues

When using a component that sends data to Stackdriver, if you see nothing in the console, try enabling DEBUG logging on the translation component. If using Spring Boot (ex normal app or zipkin server integration), add the following system property:

-Dlogging.level.zipkin2.translation.stackdriver=DEBUG

Note: If using our docker image or anything that uses JAVA_OPTS, you can add this there.

With this in place, you'll see the input and output of translation like below. Keep a copy of this when contacting us on gitter for support.

2018-04-09 13:58:44.112 DEBUG [/] 11325 --- [   XNIO-2 I/O-3] z.t.stackdriver.SpanTranslator           : >> translating zipkin span: {"traceId":"d42316227862f939","parentId":"d42316227862f939","id":"dfbb21f9cf4c52b3","kind":"CLIENT","name":"get","timestamp":1523253523054380,"duration":4536,"localEndpoint":{"serviceName":"frontend","ipv4":"192.168.1.113"},"tags":{"http.method":"GET","http.path":"/api"}}
2018-04-09 13:58:44.113 DEBUG [/] 11325 --- [   XNIO-2 I/O-3] z.t.stackdriver.SpanTranslator           : << translated to stackdriver span: span_id: 16199746076534411288
kind: RPC_CLIENT
name: "get"
start_time {
  seconds: 1523253523
  nanos: 54380000
}
end_time {
  seconds: 1523253523
  nanos: 58916000
}
parent_span_id: 15286085897530046777
labels {
  key: "/http/method"
  value: "GET"
}
labels {
  key: "zipkin.io/http.path"
  value: "/api"
}
labels {
  key: "/component"
  value: "frontend"
}

zipkin-gcp's People

Contributors

abesto avatar adriancole avatar ankurcha avatar anuraaga avatar benhass avatar denyska avatar dzou avatar elefeint avatar erikmcc avatar joaoandremartins avatar kevinmdavis avatar meltsufin avatar mtwo avatar tommyulfsparre avatar wjoel avatar zeagord avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.