Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: iopipe/iopipe-java
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.11.0
Choose a base ref
...
head repository: iopipe/iopipe-java
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Dec 4, 2018

  1. Copy the full SHA
    5000d63 View commit details
  2. Merge pull request #220 from XerTheSquirrel/bump-to-1120

    Bump version to 1.12.0.
    XerTheSquirrel authored Dec 4, 2018
    Copy the full SHA
    75314f2 View commit details

Commits on Dec 17, 2018

  1. Update README.

    XerTheSquirrel committed Dec 17, 2018
    Copy the full SHA
    7892753 View commit details
  2. Copy the full SHA
    9ecafae View commit details

Commits on Dec 18, 2018

  1. Merge pull request #223 from XerTheSquirrel/extra-gep-bar

    Add extra environment variable for GEP.
    XerTheSquirrel authored Dec 18, 2018
    Copy the full SHA
    bb38560 View commit details
  2. Copy the full SHA
    76fe845 View commit details

Commits on Dec 20, 2018

  1. Copy the full SHA
    c00e963 View commit details
  2. Copy the full SHA
    66cd83b View commit details
  3. ZIP everything up.

    XerTheSquirrel committed Dec 20, 2018
    Copy the full SHA
    3f6c08b View commit details
  4. Copy the full SHA
    ac60327 View commit details
  5. Copy the full SHA
    8e10768 View commit details
  6. Add CircleCI stuff.

    XerTheSquirrel committed Dec 20, 2018
    Copy the full SHA
    2e9b084 View commit details

Commits on Dec 21, 2018

  1. Copy the full SHA
    67b6aa1 View commit details
  2. Merge pull request #224 from XerTheSquirrel/lambda-layer-publish

    Lambda Layer Publishing
    XerTheSquirrel authored Dec 21, 2018
    Copy the full SHA
    57a447d View commit details

Commits on Dec 28, 2018

  1. Copy the full SHA
    ef6c067 View commit details

Commits on Dec 31, 2018

  1. Merge pull request #225 from XerTheSquirrel/correctlayerscript

    Correct layer publishing script.
    XerTheSquirrel authored Dec 31, 2018
    Copy the full SHA
    f1e7708 View commit details

Commits on Feb 11, 2019

  1. Explicitely set the source/target version to 1.8 so JavaDoc 11 does n…

    …ot assume we are generating docs for Java 11.
    XerTheSquirrel committed Feb 11, 2019
    Copy the full SHA
    f22c475 View commit details

Commits on Feb 12, 2019

  1. Merge pull request #227 from XerTheSquirrel/issue-226-javadoc11

    Explicitly set source/target version so JavaDoc 11 does not assume version 11
    XerTheSquirrel authored Feb 12, 2019
    Copy the full SHA
    68e6360 View commit details

Commits on Feb 24, 2019

  1. maven-compiler-plugin 3.8.0

    sullis committed Feb 24, 2019
    Copy the full SHA
    20a692a View commit details
  2. aws-lambda-java-events 2.2.5

    sullis committed Feb 24, 2019
    Copy the full SHA
    73caf20 View commit details

Commits on Feb 25, 2019

  1. Merge pull request #228 from sullis/maven-compiler-plugin-3.8.0

    maven-compiler-plugin 3.8.0
    XerTheSquirrel authored Feb 25, 2019
    Copy the full SHA
    9c97795 View commit details
  2. Copy the full SHA
    f8c5e13 View commit details
  3. Merge pull request #229 from sullis/aws-lambda-java-events-2.2.5

    aws-lambda-java-events 2.2.5
    XerTheSquirrel authored Feb 25, 2019
    Copy the full SHA
    73d8026 View commit details
  4. Update versions.

    XerTheSquirrel committed Feb 25, 2019
    Copy the full SHA
    fe1e695 View commit details
  5. Poke for CircleCI.

    XerTheSquirrel committed Feb 25, 2019
    Copy the full SHA
    bb27629 View commit details
  6. Merge pull request #230 from XerTheSquirrel/update-versions-20190225

    Update versions of dependencies.
    XerTheSquirrel authored Feb 25, 2019
    Copy the full SHA
    ce7b8d6 View commit details
  7. Copy the full SHA
    f322a0a View commit details

Commits on Mar 25, 2019

  1. Copy the full SHA
    b100900 View commit details
  2. Merge pull request #1 from adjohn/adjohn-patch-1

    Add instructions for enabling Logging
    adjohn authored Mar 25, 2019
    Copy the full SHA
    edcc3e3 View commit details

Commits on Mar 26, 2019

  1. Merge pull request #231 from adjohn/master

    Add logging setup instructions
    adjohn authored Mar 26, 2019
    Copy the full SHA
    d8c0481 View commit details

Commits on Nov 1, 2019

  1. update readme

    katiebayes committed Nov 1, 2019
    Copy the full SHA
    0a1ccab View commit details
  2. Merge pull request #233 from katiebayes/master

    update readme
    kolanos authored Nov 1, 2019
    Copy the full SHA
    f5ac709 View commit details
Showing with 169 additions and 17 deletions.
  1. +32 −0 .circleci/config.yml
  2. +28 −0 .circleci/latestlayerversion.sh
  3. +70 −0 .circleci/layers.sh
  4. +16 −1 README.md
  5. +19 −14 pom.xml
  6. +4 −2 src/main/java/com/iopipe/generic/EntryPoint.java
32 changes: 32 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -41,6 +41,28 @@ jobs:
- run:
name: Maven release
command: .circleci/release.sh
publish:
docker:
- image: circleci/openjdk:8-jdk
working_directory: ~/repo
environment:
MAVEN_OPTS: -Xmx3200m
steps:
- checkout
- run:
name: Install Python PIP
command: sudo apt-get update && sudo apt-get install python-pip
- run:
name: Install publish dependencies
command: sudo pip install -U awscli
- run:
name: Override AWS Credentials
command: |
echo 'export AWS_ACCESS_KEY_ID="$LAYER_AWS_ACCESS_KEY_ID"' >> $BASH_ENV
echo 'export AWS_SECRET_ACCESS_KEY="$LAYER_SECRET_ACCESS_KEY"' >> $BASH_ENV
- run:
name: Publish layers
command: .circleci/layers.sh

workflows:
version: 2
@@ -57,4 +79,14 @@ workflows:
branches:
ignore:
- /.*/
publish:
jobs:
- publish:
filters:
tags:
only:
- /^\d{1,}\.\d{1,}\.\d{1,}\w{0,}$/
branches:
ignore:
- /.*/

28 changes: 28 additions & 0 deletions .circleci/latestlayerversion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash -e

REGIONS=(
ap-northeast-1
ap-northeast-2
ap-south-1
ap-southeast-1
ap-southeast-2
ca-central-1
eu-central-1
eu-west-1
eu-west-2
eu-west-3
#sa-east-1
us-east-1
us-east-2
us-west-1
us-west-2
)

echo ""
echo "java8:"
echo ""

for region in "${REGIONS[@]}"; do
latest_arn=$(aws --region $region lambda list-layer-versions --layer-name IOpipeJava8 --output text --query "LayerVersions[0].LayerVersionArn")
echo "* ${region}: \`${latest_arn}\`"
done
70 changes: 70 additions & 0 deletions .circleci/layers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/bin/sh -e

# Need this to publish
if ! which aws
then
echo "No AWS command"
exit 1
fi

# Package JAR and place all dependencies into the target
mvn clean
mvn package -Dmaven.test.skip=true
mvn dependency:copy-dependencies -DincludeScope=runtime -DoutputDirectory=target

# Copy target JARs to library directory
rm -rvf java
mkdir -p java/lib/
cp -v target/*.jar java/lib/
rm -vf java/lib/*-sources.jar java/lib/*-javadoc.jar

# ZIP it up
rm -f java8.zip
zip -rq java8.zip java

# Unique identification for this release
__gh="$(git rev-parse HEAD)"

# The S3 file key
__s3="iopipe-java8/$__gh.zip"

# Upload for each region
for __region in ap-northeast-1 ap-northeast-2 ap-south-1 ap-southeast-1 ap-southeast-2 ca-central-1 eu-central-1 eu-west-1 eu-west-2 eu-west-3 us-east-1 us-east-2 us-west-1 us-west-2
do
# The destination bucket, since it is region specific
__bn="iopipe-layers-$__region"

# Upload to S3 bucket first
echo "Uploading to S3 in region $__region..."
aws --region "$__region" s3 cp java8.zip "s3://$__bn/$__s3"

# Publish layer, but we need the version
echo "Publishing..."
__ver="`aws lambda publish-layer-version \
--layer-name IOpipeJava8 \
--content "S3Bucket=$__bn,S3Key=$__s3" \
--description 'IOpipe Layer Java 8' \
--compatible-runtimes java8 \
--license-info 'Apache 2.0' \
--region $__region \
--output text \
--query Version`"
if [ -z "$__ver" ]
then
echo "Failed to publish!"
exit 2
fi
echo "Published version $__ver"

# Set permissions
echo "Setting permissions..."
aws lambda add-layer-version-permission \
--layer-name IOpipeJava8 \
--version-number "$__ver" \
--statement-id public \
--action lambda:GetLayerVersion \
--principal "*" \
--region "$__region"
echo "Permissions set"
done

17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
**✨Special Announcement: We've Joined New Relic Serverless!**
**Get ready to function faster with full visibility into your serverless applications—and everything else. [Read our founders' note to learn more.](https://read.iopipe.com/founders-note-iopipe-new-relic-acquisition-c15eeda47151)**

IOpipe Telemetry Agent for Java
--------------------------------------------
[![Download](https://api.bintray.com/packages/iopipe/iopipe/iopipe/images/download.svg) ](https://bintray.com/iopipe/iopipe/iopipe/_latestVersion)[![Build status](https://circleci.com/gh/iopipe/iopipe-java.svg?style=shield&circle-token=b9a08049964f555f38ab316ba535369aa5fe8252
@@ -27,6 +30,7 @@ It is licensed under the Apache 2.0.
* [Labels](#labels)
* [Profiling](#profiling)
* [Tracing](#tracing)
* [Logging](#logging)
* [Resources](#resources)

# Building With IOpipe
@@ -222,7 +226,8 @@ environment variables.
* If set to `false` then the plugin will be disabled.
* If this is not set for a plugin then it will use the setting from the
plugin if it should be enabled by default or not.
* `com.iopipe.generichandler` or `IOPIPE_GENERIC_HANDLER`
* `com.iopipe.handler`/`com.iopipe.generichandler` or
`IOPIPE_HANDLER`/`IOPIPE_GENERIC_HANDLER`
* This specifies the class (and optionally the method) to be used by the
generic handler to wrap with IOpipe.
* `com.example`, implies that the `requestHandler` method be used.
@@ -368,6 +373,16 @@ Disabling the plugin can be done as followed:
* Setting the system property `com.iopipe.plugin.trace` to `false`.
* Setting the environment variable `IOPIPE_TRACE_ENABLED` to `false`.

## Logging

You send synchronous logs to IOpipe, bypassing Cloudwatch. Note that this will incur additional overhead in your invocations. This can be useful for doing local development, or if you're unable to connect Cloudwatch logs to IOpipe for async no-overhead logging.

If you are using Log4j2 you may read the setup instructions ![here](https://github.com/iopipe/iopipe-java-logger-log4j2).

If you are using TinyLog you may read the setup instructions ![here](https://github.com/iopipe/https://github.com/iopipe/iopipe-java-logger-tinylog).

Once you’re setup, you will need to configure IOpipe to enable the logging plugin. You can do this by setting the `IOPIPE_LOGGER_ENABLED` environment variable to `true` in the AWS Lambda configuration.

# Resources

For this agent:
33 changes: 19 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -3,14 +3,14 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.iopipe</groupId>
<artifactId>iopipe</artifactId>
<version>1.11.0</version>
<version>1.12.0</version>
<packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<url>https://www.iopipe.com/</url>
<scm>
<connection>scm:git:https://github.com/iopipe/iopipe-java.git</connection>
<url>https://github.com/iopipe/iopipe-java</url>
<tag>1.11.0</tag>
<tag>1.12.0</tag>
</scm>
<developers>
<developer>
@@ -53,6 +53,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<showDeprecation>true</showDeprecation>
<source>1.8</source>
<target>1.8</target>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
@@ -119,7 +124,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<version>3.8.0</version>
<configuration>
<showDeprecation>true</showDeprecation>
<source>1.8</source>
@@ -182,25 +187,25 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.2.0</version>
<version>5.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-runner</artifactId>
<version>1.2.0</version>
<version>1.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.2.0</version>
<version>5.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.2.0</version>
<version>5.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -214,7 +219,7 @@
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.1.2</version>
<version>1.1.4</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
@@ -224,32 +229,32 @@
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-events</artifactId>
<version>2.2.2</version>
<version>2.2.5</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-kinesis</artifactId>
<version>1.11.398</version>
<version>1.11.505</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>1.11.398</version>
<version>1.11.505</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>3.11.0</version>
<version>3.13.1</version>
</dependency>
<dependency>
<groupId>org.tinylog</groupId>
<artifactId>tinylog</artifactId>
<version>1.3.5</version>
<version>1.3.6</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>2.9.6</version>
<version>2.9.8</version>
</dependency>
</dependencies>
<!-- Note that there are no build steps for deployment because this is a
6 changes: 4 additions & 2 deletions src/main/java/com/iopipe/generic/EntryPoint.java
Original file line number Diff line number Diff line change
@@ -224,10 +224,12 @@ public final Type[] parameters()
public static final EntryPoint defaultAWSEntryPoint()
{
// This variable is very important
String pair = IOpipeConfiguration.getVariable("com.iopipe.generichandler",
"IOPIPE_GENERIC_HANDLER", null);
String pair = pair = IOpipeConfiguration.getVariable(
"com.iopipe.handler", "IOPIPE_HANDLER", IOpipeConfiguration.getVariable(
"com.iopipe.generichandler", "IOPIPE_GENERIC_HANDLER", null));
if (pair == null)
throw new InvalidEntryPointException("The environment variable " +
"IOPIPE_HANDLER or " +
"IOPIPE_GENERIC_HANDLER has not been set, execution cannot " +
"continue.");