added elastic apm and fixed session updated_at bug

This commit is contained in:
admin 2021-02-03 10:12:05 -05:00
parent 3196dfbda9
commit 82bdbbcb5f
2 changed files with 12 additions and 1 deletions

View File

@ -19,6 +19,6 @@ module SessionTrackingConcern
end
def session_needs_update?
!current_session.nil? && current_session.updated_at < UPDATE_SIGN_IN_HOURS.hours.ago
!current_session.nil? && current_session.updated_at > UPDATE_SIGN_IN_HOURS.hours.ago
end
end

11
config/elastic_apm.yml Normal file
View File

@ -0,0 +1,11 @@
# config/elastic_apm.yml:
# Set service name - allowed characters: a-z, A-Z, 0-9, -, _ and space
# Defaults to the name of your Rails app
service_name: <%= ENV['ELASTIC_APM_URL'] || 'gabsocial' %>
# Use if APM Server requires a token
secret_token: <%= ENV['ELASTIC_APM_SECRET_TOKEN'] || '' %>
# Set custom APM Server URL (default: http://localhost:8200)
server_url: <%= ENV['ELASTIC_APM_URL'] || 'http://localhost:8200'%>