Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/geekeast/opentelemetry-typescript-mircoservice
The opentelemetry demo on typescript-based micorservices, graphql, restful and lambda event consumer.
https://github.com/geekeast/opentelemetry-typescript-mircoservice
event-driven graphql lambda microservice opentelemetry restful-api
Last synced: 26 days ago
JSON representation
The opentelemetry demo on typescript-based micorservices, graphql, restful and lambda event consumer.
- Host: GitHub
- URL: https://github.com/geekeast/opentelemetry-typescript-mircoservice
- Owner: GeekEast
- Created: 2022-08-21T08:01:41.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-21T08:51:15.000Z (over 2 years ago)
- Last Synced: 2025-01-09T22:58:18.127Z (about 1 month ago)
- Topics: event-driven, graphql, lambda, microservice, opentelemetry, restful-api
- Homepage:
- Size: 92.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# opentelemetry-typescript-microservice
The opentelemetry demo on typescript-based microservice: **sync** and **async** communication included.## Context
- We need a industry-standard tool to increase the **observability** of our backend services while keep the trace **data portable** for analysis.### Targets
- **http-based synchronous** call could be traced properly - achieve this by [@opentelemetry/auto-instrumentations-node](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node)
- **event-based asynchronous** signals could be traced well - achieve this by [Span Link](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/overview.md#links-between-spans).## Architecture
## Step Guidance
### Start the Jaeger Service
```sh
docker-compose up -d
```
### Graphql Service
```sh
git clone [email protected]:GeekEast/opentelemetry-graphql-server.gitcd opentelemetry-graphql-server
yarn && yarn dev
```### Restful Service
```sh
git clone [email protected]:GeekEast/opentelemetry-restful-server.gitcd opentelemetry-restful-server
yarn && yarn dev
```### Lambda Event Consumer
```sh
git clone [email protected]/GeekEast/opentelemetry-lambda-consumer.gitcd opentelemetry-lambda-consumer
yarn && yarn stack up && yarn dev
```## Generate Traces
- go to http://localhost:9901/api/graphql/v1 to send a graphql request, for example
```graphql
query Query {
ORGExistUser(filter: "anything")
}
```
- then you should view the traces at http://localhost:16686## Reference
- [opentelemetry.io](https://opentelemetry.io/)