auth sufficient pam_u2f.so origin=pam://<hostname> appid=pam://<hostname> cue openasuser pinverification=1
auth include system-login
account include system-login
password include system-login
session include system-login
auth sufficient pam_u2f.so origin=pam://<hostname> appid=pam://<hostname> cue openasuser
auth include system-auth
account include system-auth
password include system-auth
session include system-auth
Samuelさんのクロージングキーノートも、作ってるものの幅の広さに圧倒される話だった。Fiberの改善から始めてあそこまでエコシステムを作り上げてるのは尋常じゃない。RubyKaigiで登壇されてた時に絶対Kaigi on Rails向きだよなーと思ってたんで、それが叶って良かった。自分もRails方面で手動かせる余裕があればTrilogy入れてFalcon化とかに突っ込んでみたいんだけどなあ……。(まあ言い訳ですね)
今は職場に大勢仲間が居る環境も珍しくないし、相談に乗ってくれる上司も居るので、今回のKaigi on Railsで受け取ったことを色々な人と話をして言葉にしていってもらえると、きっと役に立つ時が来るはずです。そういう飲み会で発生するイイ話みたいなものをカンファレンスの場に引っ張り出すというのが裏テーマの一つと言えたかもしれません。(別に酒を飲めという話ではないことに注意。酒は個人の趣味・嗜好なので)
and the Worldは非常にライブ感が強いセッションなのだが、今年はnobuさんのパッチ袋が火を吹いていて面白かった。やっぱパッチモンスターが猛威を奮っている回は面白い。k0kubunさんのセッションの感想でも書いたがStatic Barrierの議論が中々興味深かった。deoptimizeの話を聞いた後だとその意義というものがよく分かるし、斎藤さんがコミュニティの分断を招くからそう簡単に有効にできないと言ってたのもよく分かる。後、inline commentは結構欲しいですね。rbs-inline以外の文脈でもここに軽くコメントで注釈書きたいんだけど上の行に書くかーみたいな時はある。まあ、改行してしまえば書けるとかもあるんだが。
# If in a Rails app, this lives in config/initializers/opentelemetry.rbrequire"opentelemetry/sdk"OpenTelemetry::SDK.configure do |c|
c.service_name = '<YOUR_SERVICE_NAME>'end# 'Tracer' can be used throughout your code nowMyAppTracer = OpenTelemetry.tracer_provider.tracer('<YOUR_TRACER_NAME>')
require"opentelemetry/sdk"defparent_workMyAppTracer.in_span("parent") do |span|
# do some work that the 'parent' span tracks!
child_work
# do some more work afterwardsendenddefchild_workMyAppTracer.in_span("child") do |span|
# do some work that the 'child' span tracks!endend
# lib/opentelemetry/instrumentation/active_record/instrumentation.rbmoduleOpenTelemetrymoduleInstrumentationmoduleActiveRecord# The Instrumentation class contains logic to detect and install the ActiveRecord instrumentationclassInstrumentation < OpenTelemetry::Instrumentation::BaseMINIMUM_VERSION = Gem::Version.new('7')
install do |_config|
require_dependencies
patch_activerecord
end
present dodefined?(::ActiveRecord)
end
compatible do
gem_version >= MINIMUM_VERSIONendprivatedefgem_version
::ActiveRecord.version
enddefrequire_dependenciesrequire'active_support/lazy_load_hooks'require_relative'patches/querying'require_relative'patches/persistence'require_relative'patches/persistence_class_methods'require_relative'patches/persistence_insert_class_methods'require_relative'patches/transactions_class_methods'require_relative'patches/validations'require_relative'patches/relation_persistence'enddefpatch_activerecord
::ActiveSupport.on_load(:active_record) do# Modules to prepend to ActiveRecord::Base are grouped by the source# module that they are defined in as they are included into ActiveRecord::Base# Example: Patches::PersistenceClassMethods refers to https://github.com/rails/rails/blob/v7.0.0/activerecord/lib/active_record/persistence.rb#L10# which is included into ActiveRecord::Base in https://github.com/rails/rails/blob/914caca2d31bd753f47f9168f2a375921d9e91cc/activerecord/lib/active_record/base.rb#L283
::ActiveRecord::Base.prepend(Patches::Querying)
::ActiveRecord::Base.prepend(Patches::Persistence)
::ActiveRecord::Base.prepend(Patches::PersistenceClassMethods)
::ActiveRecord::Base.prepend(Patches::PersistenceInsertClassMethods)
::ActiveRecord::Base.prepend(Patches::TransactionsClassMethods)
::ActiveRecord::Base.prepend(Patches::Validations)
::ActiveRecord::Relation.prepend(Patches::RelationPersistence)
endendendendendend
# lib/opentelemetry/instrumentation/active_record/patches/querying.rbmoduleOpenTelemetrymoduleInstrumentationmoduleActiveRecordmodulePatches# Module to prepend to ActiveRecord::Base for instrumentationmoduleQueryingdefself.prepended(base)
class << base
prependClassMethodsendend# Contains ActiveRecord::Querying to be patchedmoduleClassMethods
method_name = ::ActiveRecord.version >= Gem::Version.new('7.0.0') ? :_query_by_sql : :find_by_sqldefine_method(method_name) do |*args, **kwargs, &block|
tracer.in_span("#{self} query") dosuper(*args, **kwargs, &block)
endendprivatedeftracerActiveRecord::Instrumentation.instance.tracer
endendendendendendend