{"id":23235773,"url":"https://github.com/billmeyer/send-traces","last_synced_at":"2025-04-05T20:35:04.370Z","repository":{"id":89566463,"uuid":"404343606","full_name":"billmeyer/send-traces","owner":"billmeyer","description":"Send OpenTelemetry traces via a python script","archived":false,"fork":false,"pushed_at":"2021-09-09T16:27:05.000Z","size":2994,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-11T20:57:46.375Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/billmeyer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-08T12:42:36.000Z","updated_at":"2021-09-09T16:27:07.000Z","dependencies_parsed_at":"2023-06-29T03:00:29.930Z","dependency_job_id":null,"html_url":"https://github.com/billmeyer/send-traces","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billmeyer%2Fsend-traces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billmeyer%2Fsend-traces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billmeyer%2Fsend-traces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billmeyer%2Fsend-traces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/billmeyer","download_url":"https://codeload.github.com/billmeyer/send-traces/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399889,"owners_count":20932876,"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-12-19T03:29:30.724Z","updated_at":"2025-04-05T20:35:04.337Z","avatar_url":"https://github.com/billmeyer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# send-trace\n\nThis short python script is useful for sending OpenTelemetry traces to an OpenTelemetry collector.\n\n## Setup\n\nInstall the module dependencies with\n\n```bash\npip3 install -r requirements.txt\n```\n\n## Enable zPages in the OpenTelemetry Collector\n\nEnabling the zPages extension in the OpenTelemetry collector is a useful troubleshooting aid.  See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/troubleshooting.md for more details.\n\nOnce enabled, browsing to the `http://\u003cotelhostname\u003e:55679/debug/tracez` page will show a history of the spans that have been sent to and processed by the collector.  This is one mechanism to confirm traces are being received and processed by the collector.  See the *Viewing the results* section below for examples.\n\n## Execution\n\nExecute the script by running it with python and passing the hostname of the OpenTelemetry collector as an argument to the script:\n\n```bash\npython3 send-python.py \u003cotel collector hostname\u003e\n```\n```\nOTEL Host:  k8s-worker-intel2\nSending trace to k8s-worker-intel2...\nHello world from OpenTelemetry Python!\nDone.\n```\n\n## Viewing the results \n\n### Confirm the OpenTelemetry collector received the trace\n\nOpen a browser window and navigate to the OpenTelemetry collector to confirm the trace was received.  The URL uses this format:\n\n```\nhttp://\u003cotelhostname\u003e:55679/debug/tracez\n```\n\nOn this page, there should be a span named `receiver/jaeger/TraceDataReceived` and under the `Latency Samples`, there should be a least one span received:\n\n![Trace Spans](./imgs/trace-spans.png)\n\n### View the trace in Splunk Observability\n\nSign into Splunk Observability and navigate to __APM__ \u0026rarr; __Explore__.  After a few minutes, the trace should appear in the Service Map:\n\n![my-helloworld-service](./imgs/apm-my-helloworld-service.png)\n\nTo view the trace, under the __Service Requests \u0026 Errors__, click the purple spike that represents the trace that was sent:\n\n![Example Traces](./imgs/apm-example-traces.png)\n\nThis reveals a list of available traces for the time period that was clicked on.  View the trace by clicking on it's `Trace ID`.\n\nThe resulting trace and it's span information will be displayed similar to:\n\n![Trace Waterfall](./imgs/apm-trace-waterfall.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbillmeyer%2Fsend-traces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbillmeyer%2Fsend-traces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbillmeyer%2Fsend-traces/lists"}