Instrumentation
Pour instrumenter votre application GraphQL à l’aide d’AppSignal, chargez le middleware AppSignal dans votre schéma.- Référence : Documentation AppSignal GraphQL.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
# TODO: Change the schema class to your schema class
class MySchema < GraphQL::Schema
trace_with(GraphQL::Tracing::AppsignalTrace)
end
class GraphqlController < ApplicationController
def create
result = MySchema.execute(params[:query], :variables => params[:variables], :context => {})
render :json => result
ensure
# Customize the namespace
Appsignal::Transaction.current.set_namespace("graphql")
# Customize the action name based on the operationName, if any
Appsignal::Transaction.current.set_action(params[:operationName] || "Unknown")
end
Cette page vous a-t-elle été utile ?