• P0_500467
  • 770.2KB
  • zip
  • 0
  • VIP专享
  • 0
  • 2022-04-02 04:49
SignalFx分布式跟踪仪表 不可知仪器 SignalFx分布式跟踪旨在与仪器无关。 支持和提取各种流行的开放仪器库,包括 , 和 。 只要配置为将跨度发送到SignalFx接收端点的跟踪器使用Zipkin v1 / 2 JSON线格式或Jaeger Thrift格式,我们就将接受跨度,而不论如何对其进行检测-通过上述开放库之一或本地开放库。 我们的目标是在巨型社区的肩膀上立足,而不是通过专有的库/代理来重新发明轮子,让客户可以选择什么对他们有用,而不必担心供应商锁定。 对于尚未使用代码进行测试的客户,我们的默认建议是使用OpenTracing进行测试,因为它拥有不断增长的库所有者和框架生
[![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov] [![OpenTracing 1.0 Enabled][ot-img]][ot-url] # Jaeger Bindings for Go OpenTracing API Instrumentation library that implements an [OpenTracing]( Tracer for Jaeger ( **IMPORTANT**: The library's import path is based on its original location under ``. Do not try to import it as ``, it will not compile. We might revisit this in the next major release. * :white_check_mark: `import ""` * :x: `import ""` ## How to Contribute Please see []( ## Installation We recommended using a dependency manager like [glide]( and [semantic versioning]( when including this library into an application. For example, Jaeger backend imports this library like this: ```yaml - package: version: ^2.7.0 ``` If you instead want to use the latest version in `master`, you can pull it via `go get`. Note that during `go get` you may see build errors due to incompatible dependencies, which is why we recommend using semantic versions for dependencies. The error may be fixed by running `make install` (it will install `glide` if you don't have it): ```shell go get -u cd $GOPATH/src/ git submodule update --init --recursive make install ``` ## Initialization See tracer initialization examples in [godoc]( and [config/example_test.go](./config/example_test.go). ### Environment variables The tracer can be initialized with values coming from environment variables. None of the env vars are required and all of them can be overriden via direct setting of the property on the configuration object. Property| Description --- | --- JAEGER_SERVICE_NAME | The service name JAEGER_AGENT_HOST | The hostname for communicating with agent via UDP JAEGER_AGENT_PORT | The port for communicating with agent via UDP JAEGER_ENDPOINT | The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces JAEGER_USER | Username to send as part of "Basic" authentication to the collector endpoint JAEGER_PASSWORD | Password to send as part of "Basic" authentication to the collector endpoint JAEGER_REPORTER_LOG_SPANS | Whether the reporter should also log the spans JAEGER_REPORTER_MAX_QUEUE_SIZE | The reporter's maximum queue size JAEGER_REPORTER_FLUSH_INTERVAL | The reporter's flush interval, with units, e.g. "500ms" or "2s" ([valid units][timeunits]) JAEGER_SAMPLER_TYPE | The sampler type JAEGER_SAMPLER_PARAM | The sampler parameter (number) JAEGER_SAMPLER_MANAGER_HOST_PORT | The HTTP endpoint when using the remote sampler, i.e. http://jaeger-agent:5778/sampling JAEGER_SAMPLER_MAX_OPERATIONS | The maximum number of operations that the sampler will keep track of JAEGER_SAMPLER_REFRESH_INTERVAL | How often the remotely controlled sampler will poll jaeger-agent for the appropriate sampling strategy, with units, e.g. "1m" or "30s" ([valid units][timeunits]) JAEGER_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:default}`, where the `:default` is optional, and identifies a value to be used if the environment variable cannot be found JAEGER_DISABLED | Whether the tracer is disabled or not. If true, the default `opentracing.NoopTracer` is used. JAEGER_RPC_METRICS | Whether to store RPC metrics By default, the client sends traces via UDP to the agent at `localhost:6831`. Use `JAEGER_AGENT_HOST` and `JAEGER_AGENT_PORT` to send UDP traces to a different `host:port`. If `JAEGER_ENDPOINT` is set, the client sends traces to the endpoint via `HTTP`, making the `JAEGER_AGENT_HOST` and `JAEGER_AGENT_PORT` unused. If `JAEGER_ENDPOINT` is secured, HTTP basic authentication can be performed by setting the `JAEGER_USER` and `JAEGER_PASSWORD` environment variables. ### Closing the tracer via `io.Closer` The constructor function for Jaeger Tracer returns the tracer itself and an `io.Closer` instance. It is recommended to structure your `main()` so that it calls the `Close()` function on the closer before exiting, e.g. ```go tracer, closer, err := cfg.NewTracer(...) defer closer.Close() ``` This is especially useful for command-line tools that enable tracing, as well as for the long-running apps that support graceful shutdown. For example, if your deployment system sends SIGTERM instead of killing the process and you trap that signal to do a graceful exit, then having `defer closer.Closer()` ensures that all buffered spans are flushed. ### Metrics & Monitoring The tracer emits a number of different metrics, defined in [metrics.go](metrics.go). The monitoring backend is expected to support tag-based metric names, e.g. instead of `statsd`-style string names like ``, the metrics are defined by a short name and a collection of key/value tags, for example: `name:jaeger.traces, state:started, sampled:y`. See [metrics.go](./metrics.go) file for the full list and descriptions of emitted metrics. The monitoring backend is represented by the `metrics.Factory` interface from package [`""`]( An implementation of that interface can be passed as an option to either the Configuration object or the Tracer constructor, for example: ```go import ( "" "" ) metricsFactory := prometheus.New() tracer, closer, err := config.Configuration{ ServiceName: "your-service-name", }.NewTracer( config.Metrics(metricsFactory), ) ``` By default, a no-op `metrics.NullFactory` is used. ### Logging The tracer can be configured with an optional logger, which will be used to log communication errors, or log spans if a logging reporter option is specified in the configuration. The logging API is abstracted by the [Logger](logger.go) interface. A logger instance implementing this interface can be set on the `Config` object before calling the `New` method. Besides the [zap]( implementation bundled with this package there is also a [go-kit]( one in the [jaeger-lib]( repository. ## Instrumentation for Tracing Since this tracer is fully compliant with OpenTracing API 1.0, all code instrumentation should only use the API itself, as described in the [opentracing-go]( documentation. ## Features ### Reporters A "reporter" is a component that receives the finished spans and reports them to somewhere. Under normal circumstances, the Tracer should use the default `RemoteReporter`, which sends the spans out of process via configurable "transport". For testing purposes, one can use an `InMemoryReporter` that accumulates spans in a buffer and allows to retrieve them for later verification. Also available are `NullReporter`, a no-op reporter that does nothing, a `LoggingReporter` which logs all finished spans using their `String()` method, and a `CompositeReporter` that can be used to combine more than one reporter into one, e.g. to attach a logging reporter to the main remote reporter. ### Span Reporting Transports The remote reporter uses "transports" to actually send the spans out of process. Currently the supported transports include: * [Jaeger Thrift]( over UDP or HTTP, * [Zipkin Thrif
    • askreduce:分布式问题
      分布式问题 仅使用intro_python材料进行初始设置 intro_python.md是 CSQ(冒号分隔的问题) csq2fix.py以 JSON 格式转换为 Django 固定装置格式 该输出进入要加载的shufflesort/fixtures 设置新鲜: python ...
    • nsq:实时分布式消息传递平台
      来源: : ... 为了获得最大的灵活性,它与数据格式无关(消息可以是JSON,MsgPack,协议缓冲区或其他任何东西)。 官方提供了Go和Python库(以及许多其他),并且,如果您有兴趣构建自己的库,则有
    • dubbo-admin分布式工具
      dubbo-admin分布式工具,配合 zk使用,能够监控注册的服务及服务消费情况,方便分布式环境查错
    • D-JSON:[已弃用] 分布式 JSON
      D-JSON分布式 JSON 快速开始 npm install d-json 你也可以直接克隆 repo: git clone 或者 。
    • 分布式服务调用链客户端
    • Akka.net分布式实例
    • 分布式计算
    • aposd:分布式自适应投资组合选择(撇号)
      分布式自适应投资组合选择(撇号) 优化的APOSD自动优化方法。 在高性能计算集群的环境... Controusétroitementavecle求解器 ,用于在Internet上模拟互连网络之间的连接的基础,或用于JSON的通信进程间通信的仿真器。
    • DataXWeb分布式数据同步工具
      DataX Web是在DataX之上开发的分布式数据同步工具,提供简单易用的操作界面,降低用户使用DataX的学习成本,缩短任务配置时间,避免配置过程中出错。用户可通过页面选择数据源即可创
    • GaussDB_100_1.0.1-DATABASE-REDHAT-64bit.tar.gz