Slide 15
Slide 15 text
©MIXI
実装: バックエンド
Railsで組まれたバックエンドに
自動計装
Point GraphQLに対応
● graphql-rubyを利用しているので、
ActiveSupport::Notifications を用いてGraphQL
でのtraceも取得する
# graphql-rubyで発生するActiveSupport::Notificationsを利用する
# ref: https://graphql-ruby.org/queries/tracing#activesupportnotifications
trace_with(GraphQL::Tracing::ActiveSupportNotificationsTrace)
notifications = [
'lex.graphql',
'parse.graphql',
'validate.graphql',
'analyze_multiplex.graphql',
'analyze_query.graphql',
'execute_query.graphql',
'execute_query_lazy.graphql',
'execute_field_lazy.graphql',
'authorized_lazy.graphql',
'resolve_type.graphql',
]
# デフォルトのNotificationsと上記のNotificationsをマージし
て設定
config.google_cloud.trace.notifications =
Google::Cloud::Trace::Railtie::DEFAULT_NOTIFICATIONS
+ notifications