pub struct ApolloTracing { /* private fields */ }
Expand description
Apollo Tracing Extension to send traces to Apollo Studio
The extension to include to your async_graphql
instance to connect with Apollo Studio.
Apollo Tracing works by creating traces from GraphQL calls, which contains extra data about the request being processed. These traces are then batched sent to Apollo Studio.
The extension will start a separate function on a separate thread which will aggregate traces and batch send them.
To add additional data to your metrics, you should add a ApolloTracingDataExt to your query_data when you process a query with async_graphql.
Implementations§
Source§impl ApolloTracing
impl ApolloTracing
Sourcepub fn new(
authorization_token: String,
hostname: String,
graph_id: String,
variant: String,
service_version: String,
) -> ApolloTracing
pub fn new( authorization_token: String, hostname: String, graph_id: String, variant: String, service_version: String, ) -> ApolloTracing
We initialize the ApolloTracing Extension by starting our aggregator async function which will receive every traces and send them to the Apollo Studio Ingress for processing
- autorization_token - Token to send metrics to apollo studio.
- hostname - Hostname like yourdomain-graphql-1.io
- graph_ref -
ref@variant
Graph reference with variant - release_name - Your release version or release name from Git for example
Trait Implementations§
Source§impl ExtensionFactory for ApolloTracing
impl ExtensionFactory for ApolloTracing
Auto Trait Implementations§
impl Freeze for ApolloTracing
impl !RefUnwindSafe for ApolloTracing
impl Send for ApolloTracing
impl Sync for ApolloTracing
impl Unpin for ApolloTracing
impl !UnwindSafe for ApolloTracing
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more