Esempio n. 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);
     }
 }
Esempio n. 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.");
 }
Esempio n. 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);
 }
 public LocalSpanAndEndpoint(IServerClientAndLocalSpanState state)
 {
     State = state;
 }
Esempio n. 5
0
 public LocalTracer(IServerClientAndLocalSpanState state, ISpanCollector spanCollector, Sampler traceSampler)
     : this(new LocalSpanAndEndpoint(state), spanCollector, traceSampler)
 {
 }