예제 #1
0
 public async Task Connect(string instanceName, TracerValue tags)
 {
     if (_connectionId == null)
     {
         _connectionId = await _remoteServiceClient.Connect(instanceName, tags);
     }
 }
예제 #2
0
        public ScopeConfiguration ByTag(string tag, TracerValue value, Action <ScopePropertyConfiguration> properties)
        {
            var propertyConfiguration = new ScopePropertyConfiguration();

            properties?.Invoke(propertyConfiguration);
            return(new ScopeConfiguration()
            {
                TagFilter = new TagFilter()
                {
                    Tag = tag,
                    Value = value,
                    MatchOperation = MatchOperation.Equals
                }, PropertyConfiguration = propertyConfiguration
            });
        }
예제 #3
0
        public async Task <string> Connect(string instanceName, TracerValue value)
        {
            try
            {
                var data = new ConnectionData {
                    InstanceName = instanceName, Value = value
                };
                var content = AsJson(data);
                var result  = await _client.PostAsync("Receiver/Connect", content);

                result.EnsureSuccessStatusCode();
                return(await result.Content.ReadAsAsync <string>());
            }
            catch (Exception ex)
            {
                Trace.TraceError(ex.ToString());
                throw ex;
            }
        }
예제 #4
0
 public SetPropertyEvent(string scopeId, string propertyName, TracerValue value)
 {
     ScopeId      = scopeId;
     PropertyName = propertyName;
     Value        = value;
 }
예제 #5
0
 public ITracedScope SetProperty(string propertyName, TracerValue value)
 {
     return(this);
 }
예제 #6
0
        public void Write(string scopeId, string eventName, TracerValue content)
        {
            var message = new LogEvent(scopeId, eventName, content, DateTimeOffset.Now);

            _events.Add(message);
        }
예제 #7
0
        public void SetProperty(string scopeId, string propertyName, TracerValue value)
        {
            var message = new SetPropertyEvent(scopeId, propertyName, value);

            _events.Add(message);
        }
예제 #8
0
 public void Write(string scopeId, string eventName, TracerValue content)
 {
 }
예제 #9
0
 public void SetProperty(string scopeId, string propertyName, TracerValue tracerValue)
 {
 }
예제 #10
0
 public ITracedScope SetProperty(string propertyName, TracerValue value)
 {
     _connection.SetProperty(Id, propertyName, value);
     return(this);
 }