https://github.com/fiam/apollo-server-otel-demo
GraphQL server with OTEL demo using ApolloServer
https://github.com/fiam/apollo-server-otel-demo
Last synced: 12 days ago
JSON representation
GraphQL server with OTEL demo using ApolloServer
- Host: GitHub
- URL: https://github.com/fiam/apollo-server-otel-demo
- Owner: fiam
- Created: 2023-09-06T14:51:47.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-06T17:17:34.000Z (almost 3 years ago)
- Last Synced: 2025-03-01T01:43:50.887Z (over 1 year ago)
- Language: TypeScript
- Size: 53.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Demo with Apollo Server running with OTEL
=========================================
This repository contains a minimal demo that starts a GraphQL
server using ApolloServer automatically instrumented with OTEL.
## Running the server
The server can be built started with `npm start`. By default it will
send traces to an OTLP compatible HTTP endpoint at `http://localhost:4138`.
## Configure OTEL
To configure an alternate OTEL endpoint or authentication, use the following variables:
- `OTEL_SERVICE_NAME`: Sets the service name, defaults `apollo-server-otel-demo`
- `OTEL_HTTP_ENDPOINT`: Sets the OTEL endpoint, defaults to `http://localhost:4138`
- `OTEL_AUTH_TOKEN`: Uses the token as a bearer token by setting the HTTP Authentication header