mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-17 20:16:14 +00:00
Feature more otel customization (#31998)
This commit is contained in:
parent
ed90d9342e
commit
11eae691ba
|
@ -56,12 +56,13 @@ if ENV.keys.any? { |name| name.match?(/OTEL_.*_ENDPOINT/) }
|
|||
},
|
||||
})
|
||||
|
||||
prefix = ENV.fetch('OTEL_SERVICE_NAME_PREFIX', 'mastodon')
|
||||
prefix = ENV.fetch('OTEL_SERVICE_NAME_PREFIX', 'mastodon')
|
||||
separator = ENV.fetch('OTEL_SERVICE_NAME_SEPARATOR', '/')
|
||||
|
||||
c.service_name = case $PROGRAM_NAME
|
||||
when /puma/ then "#{prefix}/web"
|
||||
when /puma/ then "#{prefix}#{separator}web"
|
||||
else
|
||||
"#{prefix}/#{$PROGRAM_NAME.split('/').last}"
|
||||
"#{prefix}#{separator}#{$PROGRAM_NAME.split('/').last}"
|
||||
end
|
||||
c.service_version = Mastodon::Version.to_s
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue