{"id":13563746,"url":"https://github.com/jaegertracing/jaeger-client-go","last_synced_at":"2026-01-15T01:45:18.315Z","repository":{"id":40605210,"uuid":"56550961","full_name":"jaegertracing/jaeger-client-go","owner":"jaegertracing","description":"🛑 This library is DEPRECATED!","archived":true,"fork":false,"pushed_at":"2023-04-24T23:53:04.000Z","size":1512,"stargazers_count":1385,"open_issues_count":7,"forks_count":288,"subscribers_count":427,"default_branch":"master","last_synced_at":"2025-09-21T03:57:10.520Z","etag":null,"topics":["distributed-tracing","microservices","monitoring","opentracing"],"latest_commit_sha":null,"homepage":"https://jaegertracing.io/","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/jaegertracing.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-19T00:09:28.000Z","updated_at":"2025-09-11T11:42:16.000Z","dependencies_parsed_at":"2024-06-18T10:59:11.278Z","dependency_job_id":"a2818f5c-9689-4c58-b2cd-aa017c6cf09f","html_url":"https://github.com/jaegertracing/jaeger-client-go","commit_stats":{"total_commits":429,"total_committers":84,"mean_commits":5.107142857142857,"dds":0.6946386946386947,"last_synced_commit":"8d8e8fcfd04de42b8482476abac6a902fca47c18"},"previous_names":["uber/jaeger-client-go"],"tags_count":52,"template":false,"template_full_name":null,"purl":"pkg:github/jaegertracing/jaeger-client-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaegertracing%2Fjaeger-client-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaegertracing%2Fjaeger-client-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaegertracing%2Fjaeger-client-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaegertracing%2Fjaeger-client-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaegertracing","download_url":"https://codeload.github.com/jaegertracing/jaeger-client-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaegertracing%2Fjaeger-client-go/sbom","scorecard":{"id":501892,"data":{"date":"2025-08-11","repo":{"name":"github.com/jaegertracing/jaeger-client-go","commit":"8d8e8fcfd04de42b8482476abac6a902fca47c18"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.7,"checks":[{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":4,"reason":"Found 14/30 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/codeql.yml:1","Warn: no topLevel permission defined: .github/workflows/crossdoc-integration-test.yml:1","Warn: no topLevel permission defined: .github/workflows/unit-tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/jaegertracing/jaeger-client-go/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/jaegertracing/jaeger-client-go/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/jaegertracing/jaeger-client-go/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/crossdoc-integration-test.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/jaegertracing/jaeger-client-go/crossdoc-integration-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/crossdoc-integration-test.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/jaegertracing/jaeger-client-go/crossdoc-integration-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/jaegertracing/jaeger-client-go/unit-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/jaegertracing/jaeger-client-go/unit-tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/jaegertracing/jaeger-client-go/unit-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/jaegertracing/jaeger-client-go/unit-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/jaegertracing/jaeger-client-go/unit-tests.yml/master?enable=pin","Warn: downloadThenRun not pinned by hash: travis/install-crossdock-deps.sh:12","Info:   0 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T22:08:07.879Z","repository_id":40605210,"created_at":"2025-08-19T22:08:07.879Z","updated_at":"2025-08-19T22:08:07.879Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28441031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"ssl_error","status_checked_at":"2026-01-15T00:55:20.945Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["distributed-tracing","microservices","monitoring","opentracing"],"created_at":"2024-08-01T13:01:22.860Z","updated_at":"2026-01-15T01:45:18.292Z","avatar_url":"https://github.com/jaegertracing.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"[![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov] [![OpenTracing 1.0 Enabled][ot-img]][ot-url]\n\n# 🛑 This library is DEPRECATED!\n\nNo new pull requests are accepted except for security fixes.\n\nWe urge all users to migrate to [OpenTelemetry](https://opentelemetry.io/). Please refer to the [notice in the documentation](https://www.jaegertracing.io/docs/latest/client-libraries/#deprecating-jaeger-clients) for details.\n\n# Jaeger Bindings for Go OpenTracing API\n\nInstrumentation library that implements an\n[OpenTracing Go](https://github.com/opentracing/opentracing-go) Tracer for Jaeger (https://jaegertracing.io).\n\n**IMPORTANT**: The library's import path is based on its original location under `github.com/uber`. Do not try to import it as `github.com/jaegertracing`, it will not compile. We might revisit this in the next major release.\n  * :white_check_mark: `import \"github.com/uber/jaeger-client-go\"`\n  * :x: `import \"github.com/jaegertracing/jaeger-client-go\"`\n\n## How to Contribute\n\nPlease see [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Installation\n\n### Preferred\n\nAdd `github.com/uber/jaeger-client-go` to `go.mod`.\n\n### Old way\n\nWe recommended using a dependency manager like [dep](https://golang.github.io/dep/)\nand [semantic versioning](http://semver.org/) when including this library into an application.\nFor example, Jaeger backend imports this library like this:\n\n```toml\n[[constraint]]\n  name = \"github.com/uber/jaeger-client-go\"\n  version = \"2.17\"\n```\n\nIf you instead want to use the latest version in `master`, you can pull it via `go get`.\nNote that during `go get` you may see build errors due to incompatible dependencies, which is why\nwe recommend using semantic versions for dependencies.  The error  may be fixed by running\n`make install` (it will install `dep` if you don't have it):\n\n```shell\ngo get -u github.com/uber/jaeger-client-go/\ncd $GOPATH/src/github.com/uber/jaeger-client-go/\ngit submodule update --init --recursive\nmake install\n```\n\n## Initialization\n\nSee tracer initialization examples in [godoc](https://pkg.go.dev/github.com/uber/jaeger-client-go/config#pkg-examples)\nand [config/example_test.go](./config/example_test.go).\n\nThere are two ways to create a tracer:\n  * Using [Configuration](https://pkg.go.dev/github.com/uber/jaeger-client-go/config#Configuration) struct that allows declarative configuration. For example, you can populate that struct from a YAML/JSON config, or ask it to initialize itself using environment variables (see next section).\n  * Using [NewTracer()](https://pkg.go.dev/github.com/uber/jaeger-client-go#NewTracer) function that allows for full programmatic control of configuring the tracer using TracerOptions.\n\n### Environment variables\n\nThe tracer can be initialized with values coming from environment variables, if it is\n[built from a config](https://pkg.go.dev/github.com/uber/jaeger-client-go/config?tab=doc#Configuration.NewTracer)\nthat was created via [FromEnv()](https://pkg.go.dev/github.com/uber/jaeger-client-go/config?tab=doc#FromEnv).\nNone of the env vars are required and all of them can be overridden via direct setting\nof the property on the configuration object.\n\nProperty| Description\n--- | ---\nJAEGER_SERVICE_NAME | The service name.\nJAEGER_AGENT_HOST | The hostname for communicating with agent via UDP (default `localhost`).\nJAEGER_AGENT_PORT | The port for communicating with agent via UDP (default `6831`).\nJAEGER_ENDPOINT | The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces. If specified, the agent host/port are ignored.\nJAEGER_USER | Username to send as part of \"Basic\" authentication to the collector endpoint.\nJAEGER_PASSWORD | Password to send as part of \"Basic\" authentication to the collector endpoint.\nJAEGER_REPORTER_LOG_SPANS | Whether the reporter should also log the spans\" `true` or `false` (default `false`).\nJAEGER_REPORTER_MAX_QUEUE_SIZE | The reporter's maximum queue size (default `100`).\nJAEGER_REPORTER_FLUSH_INTERVAL | The reporter's flush interval, with units, e.g. `500ms` or `2s` ([valid units][timeunits]; default `1s`).\nJAEGER_REPORTER_ATTEMPT_RECONNECTING_DISABLED | When true, disables udp connection helper that periodically re-resolves the agent's hostname and reconnects if there was a change (default `false`).\nJAEGER_REPORTER_ATTEMPT_RECONNECT_INTERVAL | Controls how often the agent client re-resolves the provided hostname in order to detect address changes ([valid units][timeunits]; default `30s`).\nJAEGER_SAMPLER_TYPE | The sampler type: `remote`, `const`, `probabilistic`, `ratelimiting` (default `remote`). See also https://www.jaegertracing.io/docs/latest/sampling/.\nJAEGER_SAMPLER_PARAM | The sampler parameter (number).\nJAEGER_SAMPLER_MANAGER_HOST_PORT | (deprecated) The HTTP endpoint when using the `remote` sampler.\nJAEGER_SAMPLING_ENDPOINT | The URL for the sampling configuration server when using sampler type `remote` (default `http://127.0.0.1:5778/sampling`).\nJAEGER_SAMPLER_MAX_OPERATIONS | The maximum number of operations that the sampler will keep track of (default `2000`).\nJAEGER_SAMPLER_REFRESH_INTERVAL | How often the `remote` sampler should poll the configuration server for the appropriate sampling strategy, e.g. \"1m\" or \"30s\" ([valid units][timeunits]; default `1m`).\nJAEGER_TAGS | A comma separated list of `name=value` tracer-level tags, which get added to all reported spans. The value can also refer to an environment variable using the format `${envVarName:defaultValue}`.\nJAEGER_TRACEID_128BIT | Whether to enable 128bit trace-id generation, `true` or `false`. If not enabled, the SDK defaults to 64bit trace-ids.\nJAEGER_DISABLED | Whether the tracer is disabled or not. If `true`, the `opentracing.NoopTracer` is used (default `false`).\nJAEGER_RPC_METRICS | Whether to store RPC metrics, `true` or `false` (default `false`).\n\nBy default, the client sends traces via UDP to the agent at `localhost:6831`. Use `JAEGER_AGENT_HOST` and\n`JAEGER_AGENT_PORT` to send UDP traces to a different `host:port`. If `JAEGER_ENDPOINT` is set, the client sends traces\nto the endpoint via `HTTP`, making the `JAEGER_AGENT_HOST` and `JAEGER_AGENT_PORT` unused. If `JAEGER_ENDPOINT` is\nsecured, HTTP basic authentication can be performed by setting the `JAEGER_USER` and `JAEGER_PASSWORD` environment\nvariables.\n\n### Closing the tracer via `io.Closer`\n\nThe constructor function for Jaeger Tracer returns the tracer itself and an `io.Closer` instance.\nIt is recommended to structure your `main()` so that it calls the `Close()` function on the closer\nbefore exiting, e.g.\n\n```go\ntracer, closer, err := cfg.NewTracer(...)\ndefer closer.Close()\n```\n\nThis is especially useful for command-line tools that enable tracing, as well as\nfor the long-running apps that support graceful shutdown. For example, if your deployment\nsystem sends SIGTERM instead of killing the process and you trap that signal to do a graceful\nexit, then having `defer closer.Close()` ensures that all buffered spans are flushed.\n\n### Metrics \u0026 Monitoring\n\nThe tracer emits a number of different metrics, defined in\n[metrics.go](metrics.go). The monitoring backend is expected to support\ntag-based metric names, e.g. instead of `statsd`-style string names\nlike `counters.my-service.jaeger.spans.started.sampled`, the metrics\nare defined by a short name and a collection of key/value tags, for\nexample: `name:jaeger.traces, state:started, sampled:y`. See [metrics.go](./metrics.go)\nfile for the full list and descriptions of emitted metrics.\n\nThe monitoring backend is represented by the `metrics.Factory` interface from package\n[`\"github.com/uber/jaeger-lib/metrics\"`](https://github.com/jaegertracing/jaeger-lib/tree/master/metrics).  An implementation\nof that interface can be passed as an option to either the Configuration object or the Tracer\nconstructor, for example:\n\n```go\nimport (\n    \"github.com/uber/jaeger-client-go/config\"\n    \"github.com/uber/jaeger-lib/metrics/prometheus\"\n)\n\n    metricsFactory := prometheus.New()\n    tracer, closer, err := config.Configuration{\n        ServiceName: \"your-service-name\",\n    }.NewTracer(\n        config.Metrics(metricsFactory),\n    )\n```\n\nBy default, a no-op `metrics.NullFactory` is used.\n\n### Logging\n\nThe tracer can be configured with an optional logger, which will be\nused to log communication errors, or log spans if a logging reporter\noption is specified in the configuration. The logging API is abstracted\nby the [Logger](logger.go) interface. A logger instance implementing\nthis interface can be set on the `Config` object before calling the\n`New` method.\n\nBesides the [zap](https://github.com/uber-go/zap) implementation\nbundled with this package there is also a [go-kit](https://github.com/go-kit/kit)\none in the [jaeger-lib](https://github.com/jaegertracing/jaeger-lib) repository.\n\n## Instrumentation for Tracing\n\nSince this tracer is fully compliant with OpenTracing API 1.0,\nall code instrumentation should only use the API itself, as described\nin the [opentracing-go](https://github.com/opentracing/opentracing-go) documentation.\n\n## Features\n\n### Reporters\n\nA \"reporter\" is a component that receives the finished spans and reports\nthem to somewhere. Under normal circumstances, the Tracer\nshould use the default `RemoteReporter`, which sends the spans out of\nprocess via configurable \"transport\". For testing purposes, one can\nuse an `InMemoryReporter` that accumulates spans in a buffer and\nallows to retrieve them for later verification. Also available are\n`NullReporter`, a no-op reporter that does nothing, a `LoggingReporter`\nwhich logs all finished spans using their `String()` method, and a\n`CompositeReporter` that can be used to combine more than one reporter\ninto one, e.g. to attach a logging reporter to the main remote reporter.\n\n### Span Reporting Transports\n\nThe remote reporter uses \"transports\" to actually send the spans out\nof process. Currently the supported transports include:\n  * [Jaeger Thrift](https://github.com/jaegertracing/jaeger-idl/blob/master/thrift/agent.thrift) over UDP or HTTP,\n  * [Zipkin Thrift](https://github.com/jaegertracing/jaeger-idl/blob/master/thrift/zipkincore.thrift) over HTTP.\n\n### Sampling\n\nThe tracer does not record all spans, but only those that have the\nsampling bit set in the `flags`. When a new trace is started and a new\nunique ID is generated, a sampling decision is made whether this trace\nshould be sampled. The sampling decision is propagated to all downstream\ncalls via the `flags` field of the trace context. The following samplers\nare available:\n  1. `RemotelyControlledSampler` uses one of the other simpler samplers\n     and periodically updates it by polling an external server. This\n     allows dynamic control of the sampling strategies.\n  1. `ConstSampler` always makes the same sampling decision for all\n     trace IDs. it can be configured to either sample all traces, or\n     to sample none.\n  1. `ProbabilisticSampler` uses a fixed sampling rate as a probability\n     for a given trace to be sampled. The actual decision is made by\n     comparing the trace ID with a random number multiplied by the\n     sampling rate.\n  1. `RateLimitingSampler` can be used to allow only a certain fixed\n     number of traces to be sampled per second.\n\n#### Delayed sampling\n\nVersion 2.20 introduced the ability to delay sampling decisions in the life cycle\nof the root span. It involves several features and architectural changes:\n  * **Shared sampling state**: the sampling state is shared across all local\n    (i.e. in-process) spans for a given trace.\n  * **New `SamplerV2` API** allows the sampler to be called at multiple points\n    in the life cycle of a span:\n    * on span creation\n    * on overwriting span operation name\n    * on setting span tags\n    * on finishing the span\n  * **Final/non-final sampling state**: the new `SamplerV2` API allows the sampler\n    to indicate if the negative sampling decision is final or not (positive sampling\n    decisions are always final). If the decision is not final, the sampler will be\n    called again on further span life cycle events, like setting tags.\n\nThese new features are used in the experimental `x.TagMatchingSampler`, which\ncan sample a trace based on a certain tag added to the root\nspan or one of its local (in-process) children. The sampler can be used with\nanother experimental `x.PrioritySampler` that allows multiple samplers to try\nto make a sampling decision, in a certain priority order.\n\n### Baggage Injection\n\nThe OpenTracing spec allows for [baggage][baggage], which are key value pairs that are added\nto the span context and propagated throughout the trace. An external process can inject baggage\nby setting the special HTTP Header `jaeger-baggage` on a request:\n\n```sh\ncurl -H \"jaeger-baggage: key1=value1, key2=value2\" http://myhost.com\n```\n\nBaggage can also be programatically set inside your service:\n\n```go\nif span := opentracing.SpanFromContext(ctx); span != nil {\n    span.SetBaggageItem(\"key\", \"value\")\n}\n```\n\nAnother service downstream of that can retrieve the baggage in a similar way:\n\n```go\nif span := opentracing.SpanFromContext(ctx); span != nil {\n    val := span.BaggageItem(\"key\")\n    println(val)\n}\n```\n\n### Debug Traces (Forced Sampling)\n\n#### Programmatically\n\nThe OpenTracing API defines a `sampling.priority` standard tag that\ncan be used to affect the sampling of a span and its children:\n\n```go\nimport (\n    \"github.com/opentracing/opentracing-go\"\n    \"github.com/opentracing/opentracing-go/ext\"\n)\n\nspan := opentracing.SpanFromContext(ctx)\next.SamplingPriority.Set(span, 1)\n```\n\n#### Via HTTP Headers\n\nJaeger Tracer also understands a special HTTP Header `jaeger-debug-id`,\nwhich can be set in the incoming request, e.g.\n\n```sh\ncurl -H \"jaeger-debug-id: some-correlation-id\" http://myhost.com\n```\n\nWhen Jaeger sees this header in the request that otherwise has no\ntracing context, it ensures that the new trace started for this\nrequest will be sampled in the \"debug\" mode (meaning it should survive\nall downsampling that might happen in the collection pipeline), and the\nroot span will have a tag as if this statement was executed:\n\n```go\nspan.SetTag(\"jaeger-debug-id\", \"some-correlation-id\")\n```\n\nThis allows using Jaeger UI to find the trace by this tag.\n\n### Zipkin HTTP B3 compatible header propagation\n\nJaeger Tracer supports Zipkin B3 Propagation HTTP headers, which are used\nby a lot of Zipkin tracers. This means that you can use Jaeger in conjunction with e.g. [these OpenZipkin tracers](https://github.com/openzipkin).\n\nHowever it is not the default propagation format, see [here](zipkin/README.md#NewZipkinB3HTTPHeaderPropagator) how to set it up.\n\n## SelfRef\n\nJaeger Tracer supports an additional [span reference][] type call `Self`, which was proposed\nto the OpenTracing Specification (https://github.com/opentracing/specification/issues/81)\nbut not yet accepted. This allows the caller to provide an already created `SpanContext`\nwhen starting a new span. The `Self` reference bypasses trace and span id generation,\nas well as sampling decisions (i.e. the sampling bit in the `SpanContext.flags` must be\nset appropriately by the caller).\n\nThe `Self` reference supports the following use cases:\n  * the ability to provide externally generated trace and span IDs\n  * appending data to the same span from different processes, such as loading and continuing spans/traces from offline (ie log-based) storage\n\nUsage requires passing in a `SpanContext` and the `jaeger.Self` reference type:\n```\nspan := tracer.StartSpan(\n    \"continued_span\",\n    jaeger.SelfRef(yourSpanContext),\n)\n...\ndefer span.Finish()\n```\n\n## License\n\n[Apache 2.0 License](LICENSE).\n\n\n[doc-img]: https://pkg.go.dev/badge/github.com/uber/jaeger-client-go.svg\n[doc]: https://pkg.go.dev/github.com/uber/jaeger-client-go\n[ci-img]: https://travis-ci.org/jaegertracing/jaeger-client-go.svg?branch=master\n[ci]: https://travis-ci.org/jaegertracing/jaeger-client-go\n[cov-img]: https://codecov.io/gh/jaegertracing/jaeger-client-go/branch/master/graph/badge.svg\n[cov]: https://codecov.io/gh/jaegertracing/jaeger-client-go\n[ot-img]: https://img.shields.io/badge/OpenTracing--1.0-enabled-blue.svg\n[ot-url]: http://opentracing.io\n[baggage]: https://github.com/opentracing/specification/blob/master/specification.md#set-a-baggage-item\n[timeunits]: https://golang.org/pkg/time/#ParseDuration\n[span reference]: https://github.com/opentracing/specification/blob/1.1/specification.md#references-between-spans\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaegertracing%2Fjaeger-client-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaegertracing%2Fjaeger-client-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaegertracing%2Fjaeger-client-go/lists"}