{"id":18767767,"url":"https://github.com/lightstep/telemetry-generator","last_synced_at":"2025-04-13T06:32:31.232Z","repository":{"id":58175271,"uuid":"528169626","full_name":"lightstep/telemetry-generator","owner":"lightstep","description":"An opentelemetry receiver that generates configurable metrics \u0026 traces to emulate live services","archived":false,"fork":false,"pushed_at":"2024-09-13T14:29:58.000Z","size":456,"stargazers_count":18,"open_issues_count":4,"forks_count":8,"subscribers_count":44,"default_branch":"main","last_synced_at":"2025-03-26T23:21:55.042Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lightstep.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-23T21:33:58.000Z","updated_at":"2024-09-13T14:16:37.000Z","dependencies_parsed_at":"2023-02-04T08:30:50.354Z","dependency_job_id":"6e17b6b6-2d98-4840-a14b-34e876b548e3","html_url":"https://github.com/lightstep/telemetry-generator","commit_stats":{"total_commits":184,"total_committers":24,"mean_commits":7.666666666666667,"dds":0.8532608695652174,"last_synced_commit":"ab5483b7722adc7cc9d7739b53837e58fa90f720"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Ftelemetry-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Ftelemetry-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Ftelemetry-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Ftelemetry-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightstep","download_url":"https://codeload.github.com/lightstep/telemetry-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248674678,"owners_count":21143760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T19:08:30.142Z","updated_at":"2025-04-13T06:32:27.052Z","avatar_url":"https://github.com/lightstep.png","language":"Go","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Telemetry generator\n\n## Prerequisites \u0026 setup\n\n### Non-development Workflow: Run a published image\n\nIf you just want to run (vs build or develop), you can run the most recent image published to this repository's container registry. \n\nFor defaults, see `Dockerfile`.\n\n```shell\n$ export LS_ACCESS_TOKEN=your token\n# can override to any other OTLP endpoint\n$ export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=ingest.lightstep.com:443\n$ docker run -e LS_ACCESS_TOKEN --rm ghcr.io/lightstep/telemetry-generator:latest\n```\n### OpenTelemetry collector builder\nInstall the [OpenTelemetry Collector Builder](https://github.com/open-telemetry/opentelemetry-collector/tree/main/cmd/builder):\n   1. `$ go install go.opentelemetry.io/collector/cmd/builder@v0.69.1`\n\n### Get the code\n1. Clone the [telemetry generator repo](https://github.com/lightstep/telemetry-generator) to a directory of your choosing:\n   1.  `$ cd ~/Code` (or wherever)\n   2. `$ git clone https://github.com/lightstep/telemetry-generator`\n   3. `$ cd telemetry-generator`\n2. Copy `hipster_shop.yaml` to `dev.yaml` for local development. Not strictly necessary (you can point the `TOPO_FILE` environment variable to any config file) but will potentially save heartache and hassle 😅 This file is in .gitignore, so it won't be included in your commits. If you want to share config changes, add them to a new example config file.\n   `$ cp examples/hipster_shop.yaml examples/dev.yaml`\n\n## Environment variables\n* LS_ACCESS_TOKEN = Access token used for sending DEMO telemetry \n* LS_ACCESS_TOKEN_INTERNAL = Access token used for sending META (self monitoring) telemetry\n* OTEL_EXPORTER_OTLP_TRACES_ENDPOINT = Endpoint for ingesting DEMO telemetry\n* OTEL_EXPORTER_OTLP_TRACES_ENDPOINT_INTERNAL = Endpoint for ingesting META telemetry.\n\n### Access token\n\nTo send demo telemetry data to Lightstep, you'll need an access token associated with the lightstep project you want to use. Go to ⚙ -\u003e Access Tokens to copy an existing one or create a new one. Then:\n\n```shell\n$ export LS_ACCESS_TOKEN=\"\u003cyour token\u003e\"\n$ export LS_ACCESS_TOKEN_INTERNAL=\"\u003cyour token\u003e\"\n```\n\n### Collector endpoint\n\nThe env var `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` determines the endpoint for demo traces and metrics. To send data to Lightstep, use:\n\n```shell\n$ export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=ingest.lightstep.com:443\n$ export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT_INTERNAL=ingest.lightstep.com:443\n```\n\n### Topo file (generatorreceiver config)\n\nThe env var `TOPO_FILE` determines which config file the generatorreceiver uses.\n\nIf you're using the `builder` you'll want to point to `examples/\u003cfilename.yaml\u003e`:\n\n```shell\n$ export TOPO_FILE=examples/dev.yaml\n```\n\nFor Docker builds, these files are copied to `/otel/examples`, so set `TOPO_FILE` like this:\n\n```shell\n$ export TOPO_FILE=/otel/examples/dev.yaml\n```\n\n# Development Workflows\n\u003e These steps build the collector from the source in this repo.\n\n## Build and run the collector\n\nThere are two options here, but if possible we recommend using the OpenTelemetry Collector Builder, which is much faster and lets you test config changes without rebuilding. With the Docker build method, you need to rebuild the image for all changes, code or config, and the build process takes much longer.\n\n### 1. Build and run with the OpenTelemetry Collector Builder (recommended)\n\n(You must first install the `builder`; see Prerequisites above.)\n```shell\n# Running this local will output the collector Go files into dist/\n$ make build\n$ make run-local\n```\n\nWhen using the `builder`, you only need to re-run the first command for code changes; for config changes just re-run the second command. To run with a different topo file, change the `TOPO_FILE` environment variable.\n\nIf you run into errors while building, please open [an issue](https://github.com/lightstep/telemetry-generator).\n\n### 2. Build and run with Docker (alternative)\n```shell\n$ docker build -t lightstep/local-telemetry-generator:latest .\n$ export LS_ACCESS_TOKEN=\u003caccess-token-for-demo-telemetry\u003e\n$ export LS_ACCESS_TOKEN_INTERNAL=\u003caccess-token-for-meta-telemetry\u003e\n$ export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=\u003cingest-endpoint-for-demo-telemetry\u003e\n$ export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT_INTERNAL=\u003cingest-endpoint-for-meta-telemetry\u003e\n$ docker run --rm -e LS_ACCESS_TOKEN -e LS_ACCESS_TOKEN_INTERNAL -e OTEL_EXPORTER_OTLP_TRACES_ENDPOINT -e OTEL_EXPORTER_TRACES_ENDPOINT_INTERNAL --env TOPO_FILE=/etc/otel/hipster_shop.yaml lightstep/local-telemetry-generator:latest\n```\n\nWhen building with Docker, you need to re-run both steps for any code *or* config changes. If you run into errors while building, please open [an issue](https://github.com/lightstep/telemetry-generator).\n\n## Publishing a Release\nThese steps enable a new Docker image to be available with `docker pull ghcr.io/lightstep/telemetry-generator:\u003ctag\u003e`\n\n1. Make your code changes and add to a new PR, ensure to include an:\n   * Update to VERSION in the file `VERSION`\n   * Update to `CHANGELOG.md`\n   * Update to [Compatibility Matrix](#compatibility-matrix) below.\n2. Create PR, get approvals, merge changes\n3. Run `make add-tag` \n    * (This will run `git tag` under the hood using the version number in VERSION)\n4. Run `make push-tag`\n    * (This will push the tags to Github. **THIS** is the operation that will kick off the GHA workflow, build  and push a new image out to GHCR.io)\n\n## Compatibility Matrix\nTelemetry generator should be built with the compatible open-telemetry Collector \nbuilder binary, with [collector](https://github.com/open-telemetry/opentelemetry-collector)\nand [collector-contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib) \ncomponents of the same version. Below is a matrix showing the correct collector \nversion for the 10 most recent telemetry-generator versions.\n\n\n| Telemetry Generator | OpenTelemetry Collector |\n|---------------------|-------------------------|\n| v0.15.0             | v0.88.0                 |\n| v0.14.2             | v0.83.0                 |\n| v0.14.1             | v0.83.0                 |\n| v0.14.0             | v0.83.0                 |\n| v0.13.0             | v0.83.0                 |\n| v0.12.0             | v0.78.1                 |\n| v0.11.13            | v0.69.1                 |\n| v0.11.12            | v0.69.1                 |\n| v0.11.11            | v0.69.1                 |\n| v0.11.10            | v0.69.1                 |\n| v0.11.9             | v0.68.0                 |\n| v0.11.8             | v0.67.0                 |\n| v0.11.7             | v0.60.0                 |\n| v0.11.6             | v0.60.0                 |\n| v0.11.5             | v0.60.0                 |\n| v0.11.4             | v0.60.0                 |\n| v0.11.3             | v0.60.0                 |\n| v0.11.2             | v0.60.0                 |\n| v0.11.1             | v0.60.0                 |\n| v0.11.0             | v0.60.0                 |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightstep%2Ftelemetry-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightstep%2Ftelemetry-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightstep%2Ftelemetry-generator/lists"}