Quarkus: Sentry logging not working when using application.yml (works OK with application.properties)

Created on 30 May 2020  路  3Comments  路  Source: quarkusio/quarkus

Describe the bug
Given an application.yml with configured properties for sentry logging, It does not send any error to the sentry application. The same configuration works OK when using application.properties instead.

Expected behavior
The application should start without warnings

Actual behavior
The application does not recognize the fields under quarkus.log.sentry ...

To Reproduce
Steps to reproduce the behavior:

  1. Configure the properties in the yml file
  2. Run mvn quarkus:dev

Configuration

# Configuration file
quarkus:
  # Sentry configuration
  log:
    sentry: true
    sentry.dsn: "https://[email protected]/5233744"
    sentry.level: ERROR
    sentry.environment: develop
    sentry.release: 1.0.0
    sentry.in-app-packages: org.duckdns.aqueipo.arqsw

Screenshots
(If applicable, add screenshots to help explain your problem.)
imagen

Environment (please complete the following information):

  • Output of uname -a or ver:
Linux aqueipo-desktop 5.3.0-53-generic #47~18.04.1-Ubuntu SMP Thu May 7 13:10:50 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Output of java -version:
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)
  • GraalVM version (if different from Java):
    Not used in this case
  • Quarkus version or git rev:
    1.4.2.Final
  • Build tool (ie. output of mvnw --version or gradlew --version):
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /home/aqueipo/.sdkman/candidates/maven/current
Java version: 11.0.7, vendor: AdoptOpenJDK, runtime: /home/aqueipo/.sdkman/candidates/java/11.0.7.hs-adpt
Default locale: es_ES, platform encoding: UTF-8
OS name: "linux", version: "5.3.0-53-generic", arch: "amd64", family: "unix"

Additional context
(Add any other context about the problem here.)

kinquestion

Most helpful comment

Hi,

Looks like the yml is incorrect. Try this configuration:
~
quarkus:
log:
sentry:
~: true
dsn: "https://[email protected]/5233744"
level: ERROR
environment: develop
release: 1.0.0
in-app-packages: org.duckdns.aqueipo.arqsw
~

Note that I used (~) because the quarkus.log.sentry is a prefix of quarkus.log.sentry.dsn and others.

Here you can see more about the configuration key conflicts.

All 3 comments

Hi,

Looks like the yml is incorrect. Try this configuration:
~
quarkus:
log:
sentry:
~: true
dsn: "https://[email protected]/5233744"
level: ERROR
environment: develop
release: 1.0.0
in-app-packages: org.duckdns.aqueipo.arqsw
~

Note that I used (~) because the quarkus.log.sentry is a prefix of quarkus.log.sentry.dsn and others.

Here you can see more about the configuration key conflicts.

@rhuan080 is right. Closing as this isn't a Quarkus issue.

I tried with nested properties like sentry.whatever_property because It was suggested by a properties to yaml online converter tool. @rhuan080 Thank you so much for the link to the configuration key conflicts guide.

Was this page helpful?
0 / 5 - 0 ratings