GraphQL is an immensely powerful tool and while there are tons of resources out there on how to leverage it, there doesn't seem to be much open discussion around Day 2 (maintenance in production) operations of GraphQL. In this talk, we'll be focusing around observability and the various techniques and tools we can use to get a better understanding of how our graphQL services are running in production. More specifically we'll be focusing on combining ApolloServer and OpenTelemetry.
AI Generated Video Summary
This Talk discusses how to tool Apollo server with open tracing for observability. OpenTracing is a vendor-agnostic format that works well with distributed systems in microservices. It allows for converting GraphQL tracing data to a vendor-agnostic format and enriching information from GraphQL servers. If providers support OpenTracing, it can be easily integrated.
1. Introduction to Apollo Studio and Observability
My name is Ashley Narcisse. I'm an engineer at Apollo GraphQL. We're going to dive into how to tool our Apollo server with open tracing. Observability boils down to really getting all the right data at the right level of abstractions to get the right context as a request that occurs to your system propagates throughout your entire infrastructure.
Oh, hey guys. How's everyone doing? Thank you for being here. My name is Ashley Narcisse. I'm an engineer at Apollo GraphQL. And I work with an awesome team of individuals that are building tools to help you developers make data more accessible.
Now speaking of information accessibility, I have a question for you. Have you ever wondered what's really happening in production, especially for your GraphQL services? I don't know about you, but I certainly have. It's something that I couldn't shake for a long time, the fact that GraphQL oftentimes felt like a black box. At least until I discovered a lot of the toolings that are in Apollo Studio. And that really, really, really helped me start to paint a better picture of all the different aspects of your graph.
Now there are a lot of features in Apollo Studios that I won't go within. But there's one feature that I will go into. So I'm like, mm. GraphQL comes with a tracing spec that, by this little nifty configuration right here, you can ship that information over into Apollo Studio. Now this was really the starting point of saying, wow, all right, cool. I'm starting to understand what's happening. I no longer have this black box imagination that it just works and can't really paint a picture as to the sheer breadth of different operations and the concentrations of what data my clients are requesting. We're going to dive into how to tool our Apollo server with open tracing. You're not just going to skip over the observability part, right? I know you. I mean, I feel like they can Google the definition for it. Nah, man, they can't just Google that. Yeah, you're right. Don't worry, I got it. Observability is a term borrowed from mechanical engineer or control theory, and it pretty much boils down to can you understand what's happening inside your system or any particular state that it can arrive to. A lot of APMs out there describe observability as having three pillars, logs, metrics, and tracing. And while the first two do fall kind of the category of things that you can predict, you can describe them as known, unknowns, right? Things that you know can potentially go wrong. But tracing is getting a bit closer. Observability boils down to really getting all the right data at the right level of abstractions to get the right context as a request that occurs to your system propagates throughout your entire infrastructure. Observability can really be boiled down to understanding the unknown unknowns. I appreciate you, you know that? My dog.
2. Introduction to OpenTracing
OpenTracing is a spec that provides a vendor-agnostic format for creating tracing data. It works well with distributed systems in microservices, which aligns with GraphQL's abstraction capabilities. By going beyond the GraphQL tracing spec, we can convert to a vendor-agnostic format and enrich the information published from our GraphQL servers. If your providers support OpenTracing, it's plug and play.
Now, OpenTracing is a spec published by the Cloud Native Computing Foundation, which is a way to help provide a vendor-agnostic format of creating this tracing data. Now, it works really, really, what? Really, ahh! Really, really. It works really, really well with distributed systems in microservices, which is one of the things that GraphQL also does a really, really good job of helping abstract for our end clients. This is perfect, and here's why. We're able to go beyond the GraphQL tracing spec and convert over to a vendor-agnostic format while also enriching the information that is being published from our GraphQL servers, and if you have any providers that already supports OpenTracing, it's plug and play.