github.com/braveheart12/just@v0.8.7/configuration/tracer.go (about)

     1  /*
     2   *    Copyright 2019 Insolar Technologies
     3   *
     4   *    Licensed under the Apache License, Version 2.0 (the "License");
     5   *    you may not use this file except in compliance with the License.
     6   *    You may obtain a copy of the License at
     7   *
     8   *        http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   *    Unless required by applicable law or agreed to in writing, software
    11   *    distributed under the License is distributed on an "AS IS" BASIS,
    12   *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   *    See the License for the specific language governing permissions and
    14   *    limitations under the License.
    15   */
    16  
    17  package configuration
    18  
    19  // Tracer configures tracer.
    20  type Tracer struct {
    21  	Jaeger JaegerConfig
    22  	// TODO: add SamplingRules configuration
    23  	SamplingRules struct{}
    24  }
    25  
    26  // JaegerConfig holds Jaeger settings.
    27  type JaegerConfig struct {
    28  	CollectorEndpoint string
    29  	AgentEndpoint     string
    30  	ProbabilityRate   float64
    31  }
    32  
    33  // NewTracer creates new default Tracer configuration.
    34  func NewTracer() Tracer {
    35  	return Tracer{
    36  		Jaeger: JaegerConfig{
    37  			AgentEndpoint:   "",
    38  			ProbabilityRate: 1,
    39  		},
    40  	}
    41  }