openzipkin-attic / zipkin-azure

Reporters and collectors for use in Azure
Apache License 2.0
11 stars 9 forks source link
openzipkin

Gitter chat Build Status Download

zipkin-azure

Shared libraries that provide Zipkin integration with Azure services. Requires JRE 6 or later.

Usage

These components provide Zipkin Senders and Collectors which build off interfaces provided by the zipkin-reporter-java and zipkin projects.

Senders

Collectors

Zipkin collectors receives and decodes span messages from a source. These spans are later stored.

Collector Description
Event Hub An alternative to Kafka.

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:

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

Ex.

$ java -Dloader.path='eventhub.jar,eventhub.jar!/lib' -Dspring.profiles.active=eventhub -cp zipkin.jar org.springframework.boot.loader.PropertiesLauncher

Example integrating the Azure Event Hub Collector

If you cannot use our Docker image, you can still integrate yourself by downloading a couple jars. Here's an example of integrating the Azure Event Hub Collector.

For Windows users Powershell is recommended.

Step 1: Download zipkin-server jar

Download the latest released server as zipkin.jar:

cd /tmp
curl -sSL https://zipkin.io/quickstart.sh | bash -s

Step 2: Download the latest eventhub-module jar

Download the latest released Event Hub module as eventhub.jar:

cd /tmp
curl -sSL https://zipkin.io/quickstart.sh | bash -s io.zipkin.azure:zipkin-autoconfigure-collector-eventhub:LATEST:module eventhub.jar

Step 3: Run the server with the "eventhub" profile active

When you enable the "eventhub" profile, you can configure eventhub with short environment variables similar to other Zipkin integrations.

cd /tmp
EVENTHUB_CONNECTION_STRING=Endpoint=sb://< EventHub Address>;SharedAccessKeyName=<name>;SharedAccessKey=<key> \
EVENTHUB_STORAGE_CONNECTION_STRING=<connection string>;DefaultEndpointsProtocol=https;AccountName=<yourAccountName>;AccountKey=<yourAccountKey> \
java -Dloader.path='eventhub.jar,eventhub.jar!/lib' -Dspring.profiles.active=eventhub -cp zipkin.jar org.springframework.boot.loader.PropertiesLauncher

NOTE: Make sure the parameters are defined in the same line or use environment variables

Below command for powershell users:

cd /tmp
EVENTHUB_CONNECTION_STRING=Endpoint=sb://< EventHub Address>;SharedAccessKeyName=<name>;SharedAccessKey=<key>
EVENTHUB_STORAGE_CONNECTION_STRING=<connection string>;DefaultEndpointsProtocol=https;AccountName=<yourAccountName>;AccountKey=<yourAccountKey>
java '-Dloader.path=eventhub.jar,eventhub.jar!/lib' '-Dspring.profiles.active=eventhub' -cp zipkin.jar org.springframework.boot.loader.PropertiesLauncher