{"id":25808155,"url":"https://github.com/nullstone-io/go-telemetry","last_synced_at":"2026-06-05T21:31:54.012Z","repository":{"id":225506691,"uuid":"766161226","full_name":"nullstone-io/go-telemetry","owner":"nullstone-io","description":"A standard library for instrumenting golang apps with OpenTelemetry","archived":false,"fork":false,"pushed_at":"2024-03-08T23:15:34.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-21T14:23:16.022Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/nullstone-io.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":"2024-03-02T14:04:19.000Z","updated_at":"2024-03-02T14:15:19.000Z","dependencies_parsed_at":"2024-06-21T13:07:21.498Z","dependency_job_id":null,"html_url":"https://github.com/nullstone-io/go-telemetry","commit_stats":null,"previous_names":["nullstone-io/go-telemetry"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullstone-io%2Fgo-telemetry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullstone-io%2Fgo-telemetry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullstone-io%2Fgo-telemetry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullstone-io%2Fgo-telemetry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nullstone-io","download_url":"https://codeload.github.com/nullstone-io/go-telemetry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241064511,"owners_count":19903281,"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":"2025-02-27T21:59:23.934Z","updated_at":"2025-02-27T21:59:24.643Z","avatar_url":"https://github.com/nullstone-io.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-telemetry\n\nA standard library for instrumenting Go apps with OpenTelemetry\n\nThis library is a batteries-included setup to make it easy for Go apps to get up and running with 3 lines of code.\nIf you want to highly customize your OpenTelemetry setup, this library is a helpful reference for setup.\n\n## How to use\n\n```go\nfunc main() {\n    shutdownTelemetry := telemetry.Start(ctx)\n    defer shutdownTelemetry()\n    telemetry.WatchRuntime()\n\t\n\t// Start server, perform job, etc.\n}\n```\n\n## OpenTelemetry Configuration\n\nOpenTelemetry provides a set of standard environment variables that the official Golang libraries use to configure.\n(See [Environment Variable Specification](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/))\n\n### Tracer Exporters\n\nThis library uses automatic detection of tracer exporters using `OTEL_TRACES_EXPORTER` environment variable.\nBy default, this supports:\n- \"otlp\": [OTLP](https://opentelemetry.io/docs/specs/otel/protocol/otlp/)\n- \"console\": [Standard Output](https://opentelemetry.io/docs/specs/otel/trace/sdk_exporters/stdout/)\n- \"none\": No exporter\n\n#### OTLP Tracer (production)\n\n```dotenv\nOTEL_TRACES_EXPORTER: otlp\n```\n\n#### OTLP Tracer (local docker)\n\nConfigure OTLP exporter to emit traces to an OTLP server.\nThis example shows how to configure an OTLP endpoint from within a docker container to the host machine.\n\n```dotenv\nOTEL_TRACES_EXPORTER: otlp\nOTEL_EXPORTER_OTLP_ENDPOINT: host.docker.internal:4317\nOTEL_EXPORTER_OTLP_INSECURE: true\n```\n\n#### Console Tracer\n\nConfigure console exporter to emit traces to stdout.\n\n```dotenv\nOTEL_TRACES_EXPORTER: console\n```\n\n### Tracer Sampling\n\nConfigure trace sampling with `OTEL_TRACES_SAMPLER` environment variable.\nHere are the choices.\n- \"always_on\": AlwaysOnSampler\n- \"always_off\": AlwaysOffSampler\n- \"traceidratio\": TraceIdRatioBased\n- \"parentbased_always_on\": ParentBased(root=AlwaysOnSampler)\n- \"parentbased_always_off\": ParentBased(root=AlwaysOffSampler)\n- \"parentbased_traceidratio\": ParentBased(root=TraceIdRatioBased)\n- \"parentbased_jaeger_remote\": ParentBased(root=JaegerRemoteSampler)\n- \"jaeger_remote\": JaegerRemoteSampler\n- \"xray\": AWS X-Ray Centralized Sampling (third party)\n\n### Metric Readers\n\nThis library uses automatic detection of metric readers using `OTEL_METRICS_EXPORTER` environment variable.\nBy default, this supports:\n- \"otlp\": [OTLP](https://opentelemetry.io/docs/specs/otel/protocol/otlp/)\n- \"console\": [Standard Output](https://opentelemetry.io/docs/specs/otel/metrics/sdk_exporters/stdout/)\n- \"none\": No exporter\n- \"prometheus\": [Prometheus](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullstone-io%2Fgo-telemetry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnullstone-io%2Fgo-telemetry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullstone-io%2Fgo-telemetry/lists"}