Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

Commit

Permalink
Merge pull request #1 from openzipkin/master
Browse files Browse the repository at this point in the history
updating recent commit in openzipkin:zipkin-azure
  • Loading branch information
praveenbarli authored May 10, 2017
2 parents d474558 + 72f5d9a commit de546ef
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ simply download modules. Until then, users will have to build locally.

## Building locally

Here's an example of building and integrating the Azure Event Hub Collector:
Here's an example of building and integrating the Azure Event Hub Collector. For Windows users Powershell is recommended.

### Step 1: Download zipkin-server jar
Download the [latest released server](https://search.maven.org/remote_content?g=io.zipkin.java&a=zipkin-server&v=LATEST&c=exec) as zipkin.jar:
Expand All @@ -69,7 +69,7 @@ It is easiest to create a directory named "eventhub" relative to zipkin.jar
``` bash
cd /tmp
mkdir eventhub
(cd eventhub && jar -xf ../zipkin-azure/autoconfigure/collector-eventhub/target/*module.jar)
(cd eventhub && jar -xf zipkin-collector-eventhub-autoconfig-x.x.x-SNAPSHOT-module.jar)
```

### Step 4: Run the server with the "eventhub" profile active
Expand All @@ -80,6 +80,15 @@ short environment variables similar to other [Zipkin integrations](https://githu
``` bash
cd /tmp
EVENTHUB_CONNECTION_STRING=Endpoint=sb://< EventHub Address>;SharedAccessKeyName=<name>;SharedAccessKey=<key>
EVENTHUB_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=<yourAccountName>;AccountKey=<yourAccountKey>
EVENTHUB_STORAGE_CONNECTION_STRING=<connection string>;DefaultEndpointsProtocol=https;AccountName=<yourAccountName>;AccountKey=<yourAccountKey>
java -Dloader.path=eventhub -Dspring.profiles.active=eventhub -cp zipkin.jar org.springframework.boot.loader.PropertiesLauncher
```

Below command for powershell users:

``` bash
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' '-Dspring.profiles.active=eventhub' -cp zipkin.jar org.springframework.boot.loader.PropertiesLauncher
```
8 changes: 8 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
environment:
JAVA_HOME: C:\Program Files\Java\jdk1.8.0

install:
- mvnw.cmd --version

build_script:
- mvnw.cmd install
2 changes: 1 addition & 1 deletion autoconfigure/collector-eventhub/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>io.zipkin.azure</groupId>
<version>0.1.4-SNAPSHOT</version>
<version>0.1.6-SNAPSHOT</version>
<artifactId>zipkin-autoconfigure-parent</artifactId>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import zipkin.storage.StorageComponent;

import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.boot.test.EnvironmentTestUtils.addEnvironment;
import static org.springframework.boot.test.util.EnvironmentTestUtils.addEnvironment;

public class ZipkinEventHubCollectorAutoConfigurationTest {
static final String CONNECTION_STRING =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import zipkin.autoconfigure.collector.eventhub.ZipkinEventHubCollectorProperties;

import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.boot.test.EnvironmentTestUtils.addEnvironment;
import static org.springframework.boot.test.util.EnvironmentTestUtils.addEnvironment;

@RunWith(Parameterized.class)
public class ZipkinEventHubCollectorPropertiesTest {
Expand Down
2 changes: 1 addition & 1 deletion autoconfigure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.zipkin.azure</groupId>
<artifactId>zipkin-azure-parent</artifactId>
<version>0.1.4-SNAPSHOT</version>
<version>0.1.6-SNAPSHOT</version>
</parent>

<artifactId>zipkin-autoconfigure-parent</artifactId>
Expand Down
2 changes: 2 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ dependencies:
- ./build-support/go-offline.sh

test:
override:
- ./mvnw integration-test
post:
# parameters used during release
# allocate commits to CI, not the owner of the deploy key
Expand Down
8 changes: 4 additions & 4 deletions collector/eventhub/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>io.zipkin.azure</groupId>
<version>0.1.4-SNAPSHOT</version>
<version>0.1.6-SNAPSHOT</version>
<artifactId>zipkin-collector-parent</artifactId>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand All @@ -33,17 +33,17 @@
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-eventhubs</artifactId>
<version>0.10.0</version>
<version>0.13.1</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-eventhubs-eph</artifactId>
<version>0.10.0</version>
<version>0.13.1</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.7.3</version>
<version>2.7.22</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion collector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.zipkin.azure</groupId>
<artifactId>zipkin-azure-parent</artifactId>
<version>0.1.4-SNAPSHOT</version>
<version>0.1.6-SNAPSHOT</version>
</parent>

<artifactId>zipkin-collector-parent</artifactId>
Expand Down
36 changes: 19 additions & 17 deletions mvnw
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,27 @@ case "`uname`" in
#
# Look for the Apple JDKs first to preserve the existing behaviour, and then look
# for the new JDKs provided by Oracle.
#
#
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
#
# Apple JDKs
#
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
fi

if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
#
# Apple JDKs
#
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
fi

if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
#
# Oracle JDKs
#
export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
fi
fi

if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then
#
Expand Down Expand Up @@ -184,16 +184,6 @@ fi

CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher

# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --path --windows "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
fi

# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
Expand All @@ -219,16 +209,28 @@ concat_lines() {
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"

# Provide a "standardized" way to retrieve the CLI args that will
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --path --windows "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi

# Provide a "standardized" way to retrieve the CLI args that will
# work with both Windows and non-Windows executions.
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
export MAVEN_CMD_LINE_ARGS

WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

# avoid using MAVEN_CMD_LINE_ARGS below since that would loose parameter escaping in $@
exec "$JAVACMD" \
$MAVEN_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CMD_LINE_ARGS

${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
3 changes: 2 additions & 1 deletion mvnw.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR=""%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar""
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
# avoid using MAVEN_CMD_LINE_ARGS below since that would loose parameter escaping in %*
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end

Expand Down
17 changes: 9 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<groupId>io.zipkin.azure</groupId>
<artifactId>zipkin-azure-parent</artifactId>
<version>0.1.4-SNAPSHOT</version>
<version>0.1.6-SNAPSHOT</version>
<packaging>pom</packaging>

<modules>
Expand All @@ -37,9 +37,9 @@

<main.basedir>${project.basedir}</main.basedir>

<zipkin.version>1.20.0</zipkin.version>
<zipkin-reporter.version>0.6.12</zipkin-reporter.version>
<spring-boot.version>1.4.4.RELEASE</spring-boot.version>
<zipkin.version>1.23.2</zipkin.version>
<zipkin-reporter.version>0.7.0</zipkin-reporter.version>
<spring-boot.version>1.5.3.RELEASE</spring-boot.version>
</properties>

<name>Zipkin Azure (Parent)</name>
Expand Down Expand Up @@ -149,11 +149,11 @@
<build>
<pluginManagement>
<plugins>
<!-- mvn -N io.takari:maven:wrapper -Dmaven=3.3.9 -->
<!-- mvn -N io.takari:maven:wrapper -Dmaven=3.5.0 -->
<plugin>
<groupId>io.takari</groupId>
<artifactId>maven</artifactId>
<version>0.3.3</version>
<version>0.3.4</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down Expand Up @@ -188,15 +188,15 @@
<plugin>
<groupId>net.orfjackal.retrolambda</groupId>
<artifactId>retrolambda-maven-plugin</artifactId>
<version>2.4.0</version>
<version>2.5.1</version>
<executions>
<execution>
<goals>
<goal>process-main</goal>
</goals>
<configuration>
<target>${main.java.version}</target>
<fork>false</fork>
<fork>true</fork>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -239,6 +239,7 @@
<header>${main.basedir}/src/etc/header.txt</header>
<excludes>
<exclude>.travis.yml</exclude>
<exclude>appveyor.yml</exclude>
<exclude>.gitignore</exclude>
<exclude>.mvn/**</exclude>
<exclude>mvnw*</exclude>
Expand Down

0 comments on commit de546ef

Please sign in to comment.