misc: add support for sentry logging

pull/1108/head^2
Paul Tiedtke 3 years ago committed by GitHub
parent be1da0e2be
commit 537fcd532b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      docker-compose.yml
  2. 13
      env.example
  3. 5
      jicofo/rootfs/defaults/logging.properties
  4. 7
      jicofo/rootfs/etc/cont-init.d/10-config
  5. 3
      jigasi.yml
  6. 5
      jigasi/rootfs/defaults/logging.properties
  7. 8
      jigasi/rootfs/etc/cont-init.d/10-config
  8. 7
      jvb/rootfs/defaults/logging.properties
  9. 6
      jvb/rootfs/etc/cont-init.d/10-config

@ -233,6 +233,9 @@ services:
- JVB_BREWERY_MUC - JVB_BREWERY_MUC
- MAX_BRIDGE_PARTICIPANTS - MAX_BRIDGE_PARTICIPANTS
- OCTO_BRIDGE_SELECTION_STRATEGY - OCTO_BRIDGE_SELECTION_STRATEGY
- SENTRY_DSN="${JICOFO_SENTRY_DSN:-0}"
- SENTRY_ENVIRONMENT
- SENTRY_RELEASE
- TZ - TZ
- XMPP_DOMAIN - XMPP_DOMAIN
- XMPP_AUTH_DOMAIN - XMPP_AUTH_DOMAIN
@ -276,6 +279,9 @@ services:
- JVB_OCTO_PUBLIC_ADDRESS - JVB_OCTO_PUBLIC_ADDRESS
- JVB_OCTO_BIND_PORT - JVB_OCTO_BIND_PORT
- JVB_OCTO_REGION - JVB_OCTO_REGION
- SENTRY_DSN="${JVB_SENTRY_DSN:-0}"
- SENTRY_ENVIRONMENT
- SENTRY_RELEASE
- TZ - TZ
depends_on: depends_on:
- prosody - prosody

@ -390,3 +390,16 @@ RESTART_POLICY=unless-stopped
# Authenticate using external service or just focus external auth window if there is one already. # Authenticate using external service or just focus external auth window if there is one already.
# TOKEN_AUTH_URL=https://auth.meet.example.com/{room} # TOKEN_AUTH_URL=https://auth.meet.example.com/{room}
# Sentry Error Tracking
# Sentry Data Source Name (Endpoint for Sentry project)
# Example: https://public:private@host:port/1
#JVB_SENTRY_DSN=
#JICOFO_SENTRY_DSN=
#JIGASI_SENTRY_DSN=
# Optional environment info to filter events
#SENTRY_ENVIRONMENT=production
# Optional release info to filter events
#SENTRY_RELEASE=1.0.0

@ -1,4 +1,8 @@
{{ if .Env.SENTRY_DSN | default "0" | toBool }}
handlers=java.util.logging.ConsoleHandler,io.sentry.jul.SentryHandler
{{ else }}
handlers= java.util.logging.ConsoleHandler handlers= java.util.logging.ConsoleHandler
{{ end }}
java.util.logging.ConsoleHandler.level = ALL java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = net.java.sip.communicator.util.ScLogFormatter java.util.logging.ConsoleHandler.formatter = net.java.sip.communicator.util.ScLogFormatter
@ -10,6 +14,7 @@ net.sf.level=SEVERE
net.java.sip.communicator.plugin.reconnectplugin.level=FINE net.java.sip.communicator.plugin.reconnectplugin.level=FINE
org.ice4j.level=SEVERE org.ice4j.level=SEVERE
org.jitsi.impl.neomedia.level=SEVERE org.jitsi.impl.neomedia.level=SEVERE
io.sentry.jul.SentryHandler.level=WARNING
# Do not worry about missing strings # Do not worry about missing strings
net.java.sip.communicator.service.resources.AbstractResourcesService.level=SEVERE net.java.sip.communicator.service.resources.AbstractResourcesService.level=SEVERE

@ -1,5 +1,7 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
export SENTRY_RELEASE="${SENTRY_RELEASE:-$(apt-cache policy jicofo | sed -n '/Installed/p' | sed -e 's/[^:]*: //')}"
if [[ -z $JICOFO_AUTH_PASSWORD ]]; then if [[ -z $JICOFO_AUTH_PASSWORD ]]; then
echo 'FATAL ERROR: Jicofo auth password must be set' echo 'FATAL ERROR: Jicofo auth password must be set'
exit 1 exit 1
@ -11,10 +13,7 @@ if [[ "$JICOFO_AUTH_PASSWORD" == "$OLD_JICOFO_AUTH_PASSWORD" ]]; then
exit 1 exit 1
fi fi
tpl /defaults/logging.properties > /config/logging.properties
tpl /defaults/jicofo.conf > /config/jicofo.conf tpl /defaults/jicofo.conf > /config/jicofo.conf
if [[ ! -f /config/logging.properties ]]; then
cp /defaults/logging.properties /config
fi
chown -R jicofo:jitsi /config chown -R jicofo:jitsi /config

@ -43,6 +43,9 @@ services:
- GC_CLIENT_EMAIL - GC_CLIENT_EMAIL
- GC_CLIENT_ID - GC_CLIENT_ID
- GC_CLIENT_CERT_URL - GC_CLIENT_CERT_URL
- SENTRY_DSN="${JIGASI_SENTRY_DSN:-0}"
- SENTRY_ENVIRONMENT
- SENTRY_RELEASE
- TZ - TZ
depends_on: depends_on:
- prosody - prosody

@ -1,4 +1,8 @@
{{ if .Env.SENTRY_DSN }}
handlers=java.util.logging.ConsoleHandler,io.sentry.jul.SentryHandler
{{ else }}
handlers= java.util.logging.ConsoleHandler handlers= java.util.logging.ConsoleHandler
{{ end }}
java.util.logging.ConsoleHandler.level = ALL java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = net.java.sip.communicator.util.ScLogFormatter java.util.logging.ConsoleHandler.formatter = net.java.sip.communicator.util.ScLogFormatter
@ -10,6 +14,7 @@ net.sf.level=SEVERE
net.java.sip.communicator.plugin.reconnectplugin.level=FINE net.java.sip.communicator.plugin.reconnectplugin.level=FINE
org.ice4j.level=SEVERE org.ice4j.level=SEVERE
org.jitsi.impl.neomedia.level=SEVERE org.jitsi.impl.neomedia.level=SEVERE
io.sentry.jul.SentryHandler.level=WARNING
# Do not worry about missing strings # Do not worry about missing strings
net.java.sip.communicator.service.resources.AbstractResourcesService.level=SEVERE net.java.sip.communicator.service.resources.AbstractResourcesService.level=SEVERE

@ -1,5 +1,7 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
export SENTRY_RELEASE="${SENTRY_RELEASE:-$(apt-cache policy jigasi | sed -n '/Installed/p' | sed -e 's/[^:]*: //')}"
if [[ -z $JIGASI_XMPP_PASSWORD ]]; then if [[ -z $JIGASI_XMPP_PASSWORD ]]; then
echo 'FATAL ERROR: Jigasi auth password must be set' echo 'FATAL ERROR: Jigasi auth password must be set'
exit 1 exit 1
@ -11,15 +13,13 @@ if [[ "$JIGASI_XMPP_PASSWORD" == "$OLD_JIGASI_XMPP_PASSWORD" ]]; then
exit 1 exit 1
fi fi
tpl /defaults/logging.properties > /config/logging.properties
tpl /defaults/sip-communicator.properties > /config/sip-communicator.properties tpl /defaults/sip-communicator.properties > /config/sip-communicator.properties
if [[ -f /config/custom-sip-communicator.properties ]]; then if [[ -f /config/custom-sip-communicator.properties ]]; then
cat /config/custom-sip-communicator.properties >> /config/sip-communicator.properties cat /config/custom-sip-communicator.properties >> /config/sip-communicator.properties
fi fi
if [[ ! -f /config/logging.properties ]]; then
cp /defaults/logging.properties /config
fi
mkdir -pm777 /tmp/transcripts mkdir -pm777 /tmp/transcripts
chown jigasi:jitsi /tmp/transcripts chown jigasi:jitsi /tmp/transcripts

@ -1,4 +1,8 @@
{{ if .Env.SENTRY_DSN | default "0" | toBool }}
handlers=java.util.logging.ConsoleHandler,io.sentry.jul.SentryHandler
{{ else }}
handlers= java.util.logging.ConsoleHandler handlers= java.util.logging.ConsoleHandler
{{ end }}
java.util.logging.ConsoleHandler.level = ALL java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = net.java.sip.communicator.util.ScLogFormatter java.util.logging.ConsoleHandler.formatter = net.java.sip.communicator.util.ScLogFormatter
@ -6,9 +10,8 @@ java.util.logging.ConsoleHandler.formatter = net.java.sip.communicator.util.ScLo
net.java.sip.communicator.util.ScLogFormatter.programname=JVB net.java.sip.communicator.util.ScLogFormatter.programname=JVB
.level=INFO .level=INFO
org.jitsi.videobridge.xmpp.ComponentImpl.level=FINE org.jitsi.videobridge.xmpp.ComponentImpl.level=FINE
io.sentry.jul.SentryHandler.level=WARNING
# All of the INFO level logs from MediaStreamImpl are unnecessary in the context of jitsi-videobridge. # All of the INFO level logs from MediaStreamImpl are unnecessary in the context of jitsi-videobridge.
org.jitsi.impl.neomedia.MediaStreamImpl.level=WARNING org.jitsi.impl.neomedia.MediaStreamImpl.level=WARNING

@ -1,6 +1,7 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
export LOCAL_ADDRESS=$(ip addr show dev "$(ip route|awk '/^default/ { print $5 }')" | grep -oP '(?<=inet\s)\d+(\.\d+){3}') export LOCAL_ADDRESS=$(ip addr show dev "$(ip route|awk '/^default/ { print $5 }')" | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
export SENTRY_RELEASE="${SENTRY_RELEASE:-$(apt-cache policy jitsi-videobridge2 | sed -n '/Installed/p' | sed -e 's/[^:]*: //')}"
if [[ -z $JVB_AUTH_PASSWORD ]]; then if [[ -z $JVB_AUTH_PASSWORD ]]; then
echo 'FATAL ERROR: JVB auth password must be set' echo 'FATAL ERROR: JVB auth password must be set'
@ -18,10 +19,7 @@ if [[ -f /config/custom-sip-communicator.properties ]]; then
cat /config/custom-sip-communicator.properties >> /config/sip-communicator.properties cat /config/custom-sip-communicator.properties >> /config/sip-communicator.properties
fi fi
tpl /defaults/logging.properties > /config/logging.properties
tpl /defaults/jvb.conf > /config/jvb.conf tpl /defaults/jvb.conf > /config/jvb.conf
if [[ ! -f /config/logging.properties ]]; then
cp /defaults/logging.properties /config
fi
chown -R jvb:jitsi /config chown -R jvb:jitsi /config

Loading…
Cancel
Save