mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-28 07:52:10 +00:00
5855ba7b49
Replace the GCP trace agent with OpenTelemetry GitOrigin-RevId: 591410029349e4ef5a39a5b79868e57c7bd089b6
15 lines
536 B
Bash
Executable file
15 lines
536 B
Bash
Executable file
#!/bin/bash
|
|
|
|
/opt/envsubst < /envsubst_template.json > /conf/runtime.json
|
|
|
|
VERSION=$(date +%y%m%d%H%M%S)
|
|
|
|
if [ "x$GIT_BRIDGE_JVM_ARGS" == "x" ]; then
|
|
GIT_BRIDGE_JVM_ARGS="-XX:+UseContainerSupport -XX:MaxRAMPercentage=50.0"
|
|
fi
|
|
|
|
if [ "$ENABLE_PROFILE_AGENT" == "true" ]; then
|
|
GIT_BRIDGE_JVM_ARGS="-agentpath:/opt/cprof/profiler_java_agent.so=-cprof_service=git-bridge,-cprof_service_version=${VERSION},-cprof_enable_heap_sampling=true ${GIT_BRIDGE_JVM_ARGS}"
|
|
fi
|
|
|
|
exec java $GIT_BRIDGE_JVM_ARGS -jar /git-bridge.jar /conf/runtime.json
|