예제 #1
0
 /**
  * Builder.
  * <p>
  * When using this builder constructor we will try to 'guess' ip address by using java.net.* utility classes.
  * This might be convenient but not necessary what you want.
  * It is preferred to use constructor that takes ip, port and service name instead.
  * </p>
  *
  * @param serviceName Name of service. Is only relevant when we do server side tracing.
  */
 public Builder(string serviceName)
 {
     try
     {
         int ip = Util.GetLocalIPInt();
         state = new ThreadLocalServerClientAndLocalSpanState(ip, 0, serviceName);
     }
     catch (System.Net.Sockets.SocketException e)
     {
         throw new Exception("Unable to get Inet address", e);
     }
 }
예제 #2
0
 /**
  * Use for control of how tracing state propagates across threads.
  */
 public Builder(IServerClientAndLocalSpanState state)
 {
     this.state = Ensure.ArgumentNotNull(state, "state must be specified.");
 }
예제 #3
0
 /**
  * Builder.
  *
  * @param ip          ipv4 host address as int. Ex for the ip 1.2.3.4, it would be (1 << 24) | (2 << 16) | (3 << 8) | 4
  * @param port        Port for service
  * @param serviceName Name of service. Is only relevant when we do server side tracing.
  */
 public Builder(int ip, int port, string serviceName)
 {
     state = new ThreadLocalServerClientAndLocalSpanState(ip, port, serviceName);
 }
예제 #4
0
 public LocalSpanAndEndpoint(IServerClientAndLocalSpanState state)
 {
     State = state;
 }
예제 #5
0
 public LocalTracer(IServerClientAndLocalSpanState state, ISpanCollector spanCollector, Sampler traceSampler)
     : this(new LocalSpanAndEndpoint(state), spanCollector, traceSampler)
 {
 }