analytics-java
analytics-java is a Java client for Astronomer
Documentation
Documentation is available at https://segment.com/libraries/java.
Add to pom.xml
:
<dependency>
<groupId>io.astronomer.analytics.java</groupId>
<artifactId>analytics</artifactId>
<version>LATEST</version>
</dependency>
or if you're using Gradle:
compile 'io.astronomer.analytics.java:analytics:+'
Snapshots
All changes committed to master are automatically released as snapshots.
To add a snapshot dependency to your builds, make sure you add the snapshot repository so your build system can look up the dependency.
Maven users can add the following to their pom.xml
:
<repository>
<id>ossrh</id>
<name>Sonatype Snapshot Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
Gradle users should declare this in their repositories block:
repositories {
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
Initialize SDK for Astronomer
final Analytics analytics = Analytics.builder("mti5N6FyJ2xd3wgKT")
.endpoint("https://api.astronomer.io")
.build();
Open-Source at Astronomer
One of our core values at Astronomer is "openness." We see this manifest in our dedication to open-source. We are relentless to only invent what we must invent; to use and contribute to the large and growing body of open-source software that countless developers have selflessly contributed to the world.
And it's not just about receiving value. Open-source is a two-way street. A core element of our business strategy is to open-source the Aries Framework, with the goal to reduce the amount of time developers waste re-writing integrations.
We also have many open-source projects in our main Github organization.
Special Notice re: Analytics.js and Segment
Early on, in order to get clickstream data collection capability quickly within our platform, and after a conversation with Peter Reinhart (an early Analytics.js contributor and CEO of Segment), we decided to adopt Analytics.js to support it as a standard for clickstream data collection. As Segment has built a successful commercial venture around the core library, they've open-sourced a number of supporting plugins and SDKs that we've also adopted.
Clickstream is one part of Astronomer, and an important one to our early customers. We publicly thank Segment for their open-source contributions, it made it easier to stand up that part of our platform. In appreciation and in the spirit of our cooperation, we open-source all of our Analytics.js-related code, contributing back to a growing ecosystem.
Running the Sample
Running analytics-sample requires Maven installed locally.
- Run
mvn package
- Run
java -cp analytics-sample/target/analytics-sample-2.0.0-RC5-SNAPSHOT-jar-with-dependencies.jar sample.Main
License
WWWWWW||WWWWWW
W W W||W W W
||
( OO )__________
/ | \
/o o| MIT \
\___/||_||__||_|| *
|| || || ||
_||_|| _||_||
(__|__|(__|__|
The MIT License (MIT)
Copyright (c) 2014 Segment, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.