Skip to content

Commit

Permalink
Merge branch 'master' into 4005_cxf
Browse files Browse the repository at this point in the history
  • Loading branch information
dufoli authored Dec 4, 2019
2 parents 0ac7ded + 34d6308 commit d19765c
Show file tree
Hide file tree
Showing 171 changed files with 11,269 additions and 84 deletions.
16 changes: 16 additions & 0 deletions bom/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,11 @@
<artifactId>quarkus-logging-json-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-logging-sentry-deployment</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>io.quarkus</groupId>
Expand All @@ -518,6 +523,17 @@
<artifactId>quarkus-scala-deployment</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-qute-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-qute-deployment</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Quarkus test dependencies -->

Expand Down
41 changes: 39 additions & 2 deletions bom/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
<mongo-reactivestreams-client.version>1.11.0</mongo-reactivestreams-client.version>
<artemis.version>2.10.1</artemis.version>
<okhttp.version>3.12.6</okhttp.version>
<sentry.version>1.7.28</sentry.version>
<!-- Used for integration tests, to make sure webjars work-->
<bootstrap.version>3.1.0</bootstrap.version>
<subethasmtp.version>3.1.7</subethasmtp.version>
Expand All @@ -170,7 +171,7 @@
<jna.version>5.3.1</jna.version>
<antlr.version>4.7.2</antlr.version>
<quarkus-security.version>1.0.0.Final</quarkus-security.version>
<keycloak.version>7.0.1</keycloak.version>
<keycloak.version>8.0.1</keycloak.version>
<javax.interceptor-api.version>1.2</javax.interceptor-api.version>
<cxf.version>3.3.4</cxf.version>
<jaxws.version>2.0.0.Final</jaxws.version>
Expand Down Expand Up @@ -720,6 +721,11 @@
<artifactId>quarkus-logging-json</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-logging-sentry</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Quarkus test dependencies -->
<dependency>
Expand Down Expand Up @@ -747,6 +753,16 @@
<artifactId>quarkus-test-kubernetes-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-qute</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-qute</artifactId>
<version>${project.version}</version>
</dependency>

<!-- External dependencies -->

Expand Down Expand Up @@ -1394,7 +1410,11 @@
<artifactId>okhttp</artifactId>
<version>${okhttp.version}</version>
</dependency>

<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry</artifactId>
<version>${sentry.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
Expand Down Expand Up @@ -2522,6 +2542,23 @@
<artifactId>quarkus-vertx-graphql</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Qute -->
<dependency>
<groupId>io.quarkus.qute</groupId>
<artifactId>qute-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus.qute</groupId>
<artifactId>qute-generator</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus.qute</groupId>
<artifactId>qute-rxjava</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
2 changes: 1 addition & 1 deletion build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@

<!-- The image to use for tests that run Keycloak -->
<!-- IMPORTANT: If this is changed you must also update native-build-steps.yaml to match the version -->
<keycloak.docker.image>quay.io/keycloak/keycloak:7.0.1</keycloak.docker.image>
<keycloak.docker.image>quay.io/keycloak/keycloak:8.0.1</keycloak.docker.image>
</properties>

<dependencyManagement>
Expand Down
2 changes: 1 addition & 1 deletion ci-templates/native-build-steps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- script: docker run --rm --publish 8000:8000 --name build-dynamodb -d amazon/dynamodb-local:1.11.477
displayName: 'start dynamodb'
- ${{ if eq(parameters.keycloak, 'true') }}:
- script: docker run --rm --publish 8180:8080 --name build-keycloak -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -e JAVA_OPTS="-server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dkeycloak.profile.feature.upload_scripts=enabled" -d quay.io/keycloak/keycloak:7.0.1
- script: docker run --rm --publish 8180:8080 --name build-keycloak -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -e JAVA_OPTS="-server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dkeycloak.profile.feature.upload_scripts=enabled" -d quay.io/keycloak/keycloak:8.0.1
displayName: 'start keycloak'
- ${{ if eq(parameters.mysql, 'true') }}:
- bash: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import io.quarkus.creator.CuratedTask;
import io.quarkus.creator.curator.CurateOutcome;
import io.quarkus.deployment.ExtensionLoader;
import io.quarkus.deployment.QuarkusConfig;
import io.quarkus.deployment.builditem.ArchiveRootBuildItem;
import io.quarkus.deployment.builditem.ConfigDescriptionBuildItem;
import io.quarkus.deployment.builditem.ExtensionClassLoaderBuildItem;
Expand Down Expand Up @@ -115,7 +114,6 @@ public Path run(CurateOutcome appState, CuratedApplicationCreator creator) throw
chainBuilder.loadProviders(runnerClassLoader);

chainBuilder
.addInitial(QuarkusConfig.class)
.addInitial(ShutdownContextBuildItem.class)
.addInitial(LaunchModeBuildItem.class)
.addInitial(ArchiveRootBuildItem.class)
Expand All @@ -126,7 +124,6 @@ public Path run(CurateOutcome appState, CuratedApplicationCreator creator) throw
BuildChain chain = chainBuilder
.build();
BuildExecutionBuilder execBuilder = chain.createExecutionBuilder("main")
.produce(QuarkusConfig.INSTANCE)
.produce(new LaunchModeBuildItem(LaunchMode.NORMAL))
.produce(new ShutdownContextBuildItem())
.produce(new LiveReloadBuildItem())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ public BuildResult run() throws Exception {
chainBuilder.loadProviders(classLoader);

chainBuilder
.addInitial(QuarkusConfig.class)
.addInitial(ArchiveRootBuildItem.class)
.addInitial(ShutdownContextBuildItem.class)
.addInitial(LaunchModeBuildItem.class)
Expand All @@ -115,7 +114,6 @@ public BuildResult run() throws Exception {
rootFs = FileSystems.newFileSystem(root, null);
}
BuildExecutionBuilder execBuilder = chain.createExecutionBuilder("main")
.produce(QuarkusConfig.INSTANCE)
.produce(liveReloadBuildItem)
.produce(new ArchiveRootBuildItem(root, rootFs == null ? root : rootFs.getPath("/"), excludedFromIndexing))
.produce(new ShutdownContextBuildItem())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ public final class FeatureBuildItem extends MultiBuildItem {
public static final String REACTIVE_MYSQL_CLIENT = "reactive-mysql-client";
public static final String NEO4J = "neo4j";
public static final String OIDC = "oidc";
public static final String QUTE = "qute";
public static final String RESTEASY = "resteasy";
public static final String RESTEASY_JACKSON = "resteasy-jackson";
public static final String RESTEASY_JAXB = "resteasy-jaxb";
public static final String RESTEASY_JSONB = "resteasy-jsonb";
public static final String RESTEASY_QUTE = "resteasy-qute";
public static final String REST_CLIENT = "rest-client";
public static final String SCALA = "scala";
public static final String SCHEDULER = "scheduler";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ void build(SslContextConfigurationRecorder sslContextConfigurationRecorder,
} else {
// On MacOS, the SunEC library is directly in jre/lib/
// This is useful for testing or if you have a similar environment in production
systemProperty.produce(new SystemPropertyBuildItem("java.library.path", graalVmLibDirectory.toString()));
javaLibraryPathAdditionalPath
.produce(new JavaLibraryPathAdditionalPathBuildItem(graalVmLibDirectory.toString()));
}

// This is useful for testing but the user will have to override it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import java.io.Writer;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;
Expand Down Expand Up @@ -460,16 +459,21 @@ private Path getClassInApplicationClassPaths(String name) {

private URL findApplicationResource(String name) {
Path resourcePath = null;

// Resource names are always separated by the "/" character.
// Here we are trying to resolve those resources using a filesystem
// Path, so we replace the "/" character with the filesystem
// specific separator before resolving
if (File.separatorChar != '/') {
name = name.replace('/', File.separatorChar);
}
for (Path i : applicationClassDirectories) {
resourcePath = i.resolve(name);
if (Files.exists(resourcePath)) {
break;
}
}
try {
return resourcePath != null && Files.exists(resourcePath) ? resourcePath.toUri()
.toURL() : null;
return resourcePath != null && Files.exists(resourcePath) ? resourcePath.toUri().toURL() : null;
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
Expand Down Expand Up @@ -522,14 +526,15 @@ private ProtectionDomain createDefaultProtectionDomain(Path applicationClasspath
URL url = null;
if (applicationClasspath != null) {
try {
URI uri = new URI("file", null, applicationClasspath.toString(), null);
URI uri = applicationClasspath.toUri();
url = uri.toURL();
} catch (URISyntaxException | MalformedURLException e) {
log.error("URL codeSource location for path " + applicationClasspath + " could not be created.");
} catch (MalformedURLException e) {
log.error("URL codeSource location for path " + applicationClasspath + " could not be created.", e);
}
}
CodeSource codesource = new CodeSource(url, (Certificate[]) null);
ProtectionDomain protectionDomain = new ProtectionDomain(codesource, null, this, null);
return protectionDomain;
}

}
27 changes: 0 additions & 27 deletions core/runtime/src/main/java/io/quarkus/runtime/ConfigHelper.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# docker run -i --rm -p 8080:8080 quarkus/${project_artifactId}-jvm
#
###
FROM fabric8/java-alpine-openjdk8-jre
FROM fabric8/java-alpine-openjdk8-jre:1.6.5
ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
ENV AB_ENABLED=jmx_exporter
COPY ${build_dir}/lib/* /deployments/lib/
Expand Down
80 changes: 80 additions & 0 deletions docs/src/main/asciidoc/logging-sentry.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
////
This guide is maintained in the main Quarkus repository
and pull requests should be submitted there:
https://github.com/quarkusio/quarkus/tree/master/docs/src/main/asciidoc
////
= Quarkus - Configuring Sentry Logging

include::./attributes.adoc[]

This guide explains sentry logging and how to configure it.

== Run Time Configuration

Run time configuration of logging is done through the normal `application.properties` file.

include::{generated-dir}/config/quarkus-logging-sentry.adoc[opts=optional, leveloffset=+1]

== Description

Sentry is a really easy way to be notified of errors happening on you Quarkus application.

It is a Open Source, Self-hosted and cloud-based error monitoring that helps software teams discover, triage, and prioritize errors in real-time.

They offer a free starter price for cloud-based or you can self host it for free.

== Configuration

To start of, you need to get a Sentry DSN either by https://sentry.io/signup/[creating a Sentry account] or https://docs.sentry.io/server/[installing your self-hosted Sentry].

In order to configure Sentry logging, the `quarkus-logging-sentry` extension should be employed. Add this extension to your
application POM as the following snippet illustrates.

.Modifications to POM file to add the Sentry logging extension
[source,xml]
----
<build>
<dependencies>
<!-- ... your other dependencies are here ... -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-logging-sentry</artifactId>
</dependency>
</dependencies>
</build>
----

[id="in-app-packages"]
=== “In Application” Stack Frames
Sentry differentiates stack frames that are directly related to your application (“in application”) from stack frames that come from other packages such as the standard library, frameworks, or other dependencies. The difference is visible in the Sentry web interface where only the “in application” frames are displayed by default.

You can configure which package prefixes your application uses with the stacktrace.app.packages option, which takes a comma separated list.
[source, properties]
----
quarkus.log.sentry.in-app-packages=com.mycompany,com.other.name
----
If you don’t want to use this feature but want to disable the warning, simply set it to "*":

[source, properties]
----
quarkus.log.sentry.in-app-packages=*
----

== Example

.All errors and warnings occuring in any the packages will be sent to Sentry with DSN `https://[email protected]/1234`
[source, properties]
`
quarkus.log.sentry=true
quarkus.log.sentry.dsn=https://[email protected]/1234
quarkus.log.sentry.in-app-packages=*
----
.All errors occuring in the package `org.example` will be sent to Sentry with DSN `https://[email protected]/1234`
[source, properties]
----
quarkus.log.sentry=true
quarkus.log.sentry.dsn=https://[email protected]/1234
quarkus.log.sentry.level=ERROR
quarkus.log.sentry.in-app-packages=org.example
----
Loading

0 comments on commit d19765c

Please sign in to comment.