Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kesin11/github_actions_otel_trace
Export Github Actions job data as tracing with OpenTelemetly
https://github.com/kesin11/github_actions_otel_trace
Last synced: about 2 months ago
JSON representation
Export Github Actions job data as tracing with OpenTelemetly
- Host: GitHub
- URL: https://github.com/kesin11/github_actions_otel_trace
- Owner: Kesin11
- License: mit
- Created: 2023-02-04T15:44:38.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-14T15:31:17.000Z (4 months ago)
- Last Synced: 2024-09-15T09:19:56.800Z (4 months ago)
- Language: TypeScript
- Size: 611 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Github Actions OpenTelemetly trace
Export GitHub Actions workflow data to OpenTelemetry.- [npm(GitHub Packages)](https://github.com/Kesin11/github_actions_otel_trace/pkgs/npm/github_actions_otel_trace)
# Architecture
![Architecture](https://user-images.githubusercontent.com/1324862/275295553-bdf6e12b-d0a1-4c19-9de5-bdc9e706b8ba.png)# all-in-one image for Google Cloud Trace (production sample)
all-in-one image includes OpenTelemetry(OTEL) collector binary and our nodejs server that receives GitHub webhook and exports trace data to OTEL collector in a one container image.This image is an example of production use. You can deploy it to a managed container service like Cloud Run or run it directly on the machine with `docker compose`.
If you want to run the all-in-one image on your local machine for debugging, you need to do some setup for authorized Google Cloud before running `docker compose`.
```bash
# Create application default credentials
gcloud auth application-default login
# Add "project_id" keyvalue to json
vim ~/.config/gcloud/application_default_credentials.jsonexport GITHUB_PAT=xxxx
export COLLECTOR_CONFIG_YAML="./otel-collector-config-gcloud.yaml"docker compose -f compose-all-in-one.yml up --build
```If you want to deploy all-in-one image to your container registry, build from Dockerfile and set the tag.
```bash
docker buildx build -t YOUR_CONTAINER_REGISTRY_TAG:latest .
```# `docker compose` for developing packages (github_actions_otel_trace and server)
Both packages github_actions_otel_trace and server can only send trace data to OpenTelemetry collector, so these need some collector that can receive OpenTelemetry protocol and web server that provides display the trace data for development.We provide [compose.yml](./compose.yml) which includes OpenTelemetry collector and [jaeger](https://www.jaegertracing.io/). You should run containers before developing js packages.
```bash
docker compose up -d
```# Required scope for GitHub Token
Fine-grained token:- Actions: Read-only
Classic Token:
- repo