Skip to content

Commit

Permalink
Merge branch 'release/0.12.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
mscwilson committed Mar 25, 2022
2 parents 117995a + f4dbc06 commit b3c6b11
Show file tree
Hide file tree
Showing 59 changed files with 2,121 additions and 973 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/gradle.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ jobs:
- name: Test with Gradle Wrapper
run: ./gradlew test

- name: Build simple-console example
run: |
./gradlew publishToMavenLocal
cd examples/simple-console
./gradlew build
- name: Upload report if failed
if: ${{ failure() }}
uses: actions/upload-artifact@v2
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Documentation

on:
push:
branches: [ master ]

jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 8

- name: Build
run: ./gradlew build

- name: Deploy to GitHub Pages
if: success()
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/docs/javadoc
17 changes: 17 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
Java 0.12.0 (2022-03-24)
-----------------------
Choose HTTP response codes not to retry (#316)
Add Javadoc generation (#137)
Deprecate SimpleEmitter (#309)
Update junit and jackson-databind (#294)
Update copyright notices to 2022 (#312)
Return eventId from Tracker.track() (#304)
Add retry to in-memory storage system (#156)
Rename bufferSize to batchSize (#306)
Add benchmarking tests (#300)
Update simple-console example (#295)
Provide method for stopping Tracker executorService (#297)
Refactor TrackerEvents for event payload creation (#291)
Extract event storage from Emitter (#290)
Attribute community contributions in changelog (#289)

Java 0.11.0 (2021-12-14)
-----------------------
Remove logging of user supplied values (#286)
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2021 Snowplow Analytics Ltd.
Copyright 2022 Snowplow Analytics Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -199,4 +199,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ With this tracker you can collect event data from your Java-based desktop and se

## Find out more

| Snowplow Docs | Contributing |
|---------------------------------|-----------------------------------|
| ![i1][techdocs-image] | ![i4][contributing-image] |
| **[Snowplow Docs][techdocs]** | **[Contributing](CONTRIBUTING.md)** |
| Snowplow Docs | API Docs | Contributing |
|-------------------------------|-----------|-----------------------------------|
| ![i1][techdocs-image] | ![i1][techdocs-image] | ![i4][contributing-image] |
| **[Snowplow Docs][techdocs]** | **[Javadoc Docs][apidocs]** | **[Contributing](CONTRIBUTING.md)** |

## Maintainer Quickstart

Expand All @@ -33,15 +33,22 @@ To run the tests using your installed JDK, run:
$ ./gradlew build
```

We have also included a simple demo, found in the `examples/simple-console` folder. You will need a JDK installed to run it. When run, it sends several events to your event collector.
We have also included a simple demo, found in the `examples/simple-console` folder. You will need a JDK installed to run it. When run, it sends several events to your event collector. For a simple event collector, we advise using the [Snowplow Micro][micro] testing pipeline.

To run simple-console using the current Maven Central version of the Java tracker:
```bash
$ cd examples/simple-console
$ ./gradlew jar
$ java -jar ./build/libs/simple-console-all-0.0.1.jar "http://<your-collector-domain>"
```

To run simple-console using a local version of the Java tracker:
```bash
$ ./gradlew publishToMavenLocal
$ cd examples/simple-console
$ ./gradlew jar
$ java -jar ./build/libs/simple-console-all-0.0.1.jar "http://<your-collector-domain>"
```
For a simple event collector, we advise using the [Snowplow Micro][micro] testing pipeline.

## Copyright and license

Expand Down Expand Up @@ -78,6 +85,7 @@ limitations under the License.
[contributing-image]: https://d3i6fms1cm1j0i.cloudfront.net/github/images/contributing.png

[techdocs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/java-tracker/
[apidocs]: https://snowplow.github.io/snowplow-java-tracker/index.html?overview-summary.html

[tracker-classification]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/tracker-maintenance-classification/
[early-release]: https://img.shields.io/static/v1?style=flat&label=Snowplow&message=Early%20Release&color=014477&labelColor=9ba0aa&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAeFBMVEVMaXGXANeYANeXANZbAJmXANeUANSQAM+XANeMAMpaAJhZAJeZANiXANaXANaOAM2WANVnAKWXANZ9ALtmAKVaAJmXANZaAJlXAJZdAJxaAJlZAJdbAJlbAJmQAM+UANKZANhhAJ+EAL+BAL9oAKZnAKVjAKF1ALNBd8J1AAAAKHRSTlMAa1hWXyteBTQJIEwRgUh2JjJon21wcBgNfmc+JlOBQjwezWF2l5dXzkW3/wAAAHpJREFUeNokhQOCA1EAxTL85hi7dXv/E5YPCYBq5DeN4pcqV1XbtW/xTVMIMAZE0cBHEaZhBmIQwCFofeprPUHqjmD/+7peztd62dWQRkvrQayXkn01f/gWp2CrxfjY7rcZ5V7DEMDQgmEozFpZqLUYDsNwOqbnMLwPAJEwCopZxKttAAAAAElFTkSuQmCC
16 changes: 10 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2021 Snowplow Analytics Ltd. All rights reserved.
* Copyright (c) 2014-2022 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
Expand All @@ -25,7 +25,7 @@ wrapper.gradleVersion = '6.5.0'

group = 'com.snowplowanalytics'
archivesBaseName = 'snowplow-java-tracker'
version = '0.11.0'
version = '0.12.0'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'

Expand Down Expand Up @@ -73,16 +73,16 @@ dependencies {
testImplementation 'org.slf4j:slf4j-simple:1.7.30'

// Jackson JSON processor
api 'com.fasterxml.jackson.core:jackson-databind:2.11.0'
api 'com.fasterxml.jackson.core:jackson-databind:2.13.1'

// Preconditions
api 'com.google.guava:guava:31.0-jre'

// Testing libraries
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
testCompileOnly 'junit:junit:4.13.2'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine'

testImplementation 'org.hamcrest:hamcrest:2.2'
testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.2'
}

Expand All @@ -98,7 +98,7 @@ task generateSources {
srcFile.parentFile.mkdirs()
srcFile.write(
"""/*
* Copyright (c) 2014-2021 Snowplow Analytics Ltd. All rights reserved.
* Copyright (c) 2014-2022 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
Expand All @@ -111,6 +111,9 @@ task generateSources {
*/
package com.snowplowanalytics.snowplow.tracker;
// DO NOT EDIT. AUTO-GENERATED.
/**
* The release version of the Snowplow Java tracker.
*/
public class Version {
static final String TRACKER = "java-$project.version";
static final String VERSION = "$project.version";
Expand Down Expand Up @@ -218,3 +221,4 @@ signing {
println 'Used useInMemoryPgpKeys()'
}
}

24 changes: 24 additions & 0 deletions examples/benchmarking/BenchmarkingREADME.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Benchmarking results

This benchmarking module is provided for maintainers, allowing them to check that their changes have not degraded performance. It uses the Java microbenchmarking harness, JMH.

The benchmark test measures the time taken to track one event. Note that this does not include the time for the event to be processed and sent, which happens asynchronously.

To run the test, navigate to this folder and run:

```bash
$ ./gradlew build
$ ./gradlew jmh
```

The tracker version is set in the `build.gradle` file. Change the specified version to benchmark a different tracker version.
```groovy
dependencies {
jmh 'com.snowplowanalytics:snowplow-java-tracker:0.11.0'
}
```
Note that you may also need to edit the `TrackerBenchmark` `closeThreads()` code. Versions from 0.12.0 onwards must call a different method. This is explained in in-line comments.

### Results
See this PR for discussion of benchmarking results: https://github.com/snowplow/snowplow-java-tracker/pull/301

36 changes: 36 additions & 0 deletions examples/benchmarking/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2014-2022 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the Apache License Version 2.0 is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
*/

import org.gradle.api.tasks.JavaExec

plugins {
id 'java'
id "me.champeau.jmh" version "0.6.6"
}

group 'com.snowplowanalytics'
version '1.0'

repositories {
mavenLocal {
content {
includeGroup "com.snowplowanalytics"
}
}
mavenCentral()
}


dependencies {
jmh 'com.snowplowanalytics:snowplow-java-tracker:0.10.1'
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit b3c6b11

Please sign in to comment.