public MediatrDiagnosticListener(IApmAgent apmAgent) { _apmAgent = apmAgent; _apmLogger = apmAgent.Logger; }
protected HttpDiagnosticListenerImplBase(IApmAgent components) { _logger = components.Logger?.Scoped("HttpDiagnosticListenerImplBase"); _configurationReader = components.ConfigurationReader; }
public EfCoreDiagnosticListener(IApmAgent agent) => _agent = agent;
public AspNetCoreDiagnosticListener(IApmAgent agent) { _agent = agent; _logger = agent.Logger?.Scoped(nameof(AspNetCoreDiagnosticListener)); _confgurationReader = agent.ConfigurationReader; }
public AspNetCoreDiagnosticListener(IApmAgent agent) => _logger = agent.Logger;
internal Span StartSpan(IApmAgent agent, IDbCommand dbCommand) => (Span)ExecutionSegmentCommon.GetCurrentExecutionSegment(agent).StartSpan(dbCommand.CommandText.Replace(Environment.NewLine, " ") , ApiConstants.TypeDb);
public AspNetCoreDiagnosticListener(IApmAgent agent) => _agent = agent;
public MongoDiagnosticListener(IApmAgent apmAgent) : base(apmAgent) { }
public SqlClientDiagnosticListener(IApmAgent apmAgent) { _apmAgent = (ApmAgent)apmAgent; _logger = _apmAgent.Logger.Scoped(nameof(SqlClientDiagnosticListener)); }
internal Span StartSpan(IApmAgent agent, IDbCommand dbCommand, InstrumentationFlag instrumentationFlag, string subType = null) { var spanName = dbCommand.CommandText.Replace(Environment.NewLine, " "); return(ExecutionSegmentCommon.StartSpanOnCurrentExecutionSegment(agent, spanName, ApiConstants.TypeDb, subType, instrumentationFlag)); }
public HttpDiagnosticListenerFullFrameworkImpl(IApmAgent agent) : base(agent) { }
// This constructor is used only by tests that don't care about sampling and distributed tracing internal Transaction(IApmAgent agent, string name, string type) : this(agent.Logger, name, type, new Sampler(1.0), null, agent.PayloadSender) { }
public SqlClientDiagnosticListener(IApmAgent apmAgent) : base(apmAgent) => _agent = apmAgent as ApmAgent;
public RequestPipelineDiagnosticsListener(IApmAgent agent) : base(agent) =>
public RequestPipelineDiagnosticsListener(IApmAgent agent) : base(agent, DiagnosticSources.RequestPipeline.SourceName) =>
public ISpan StartSpan(IApmAgent agent, string method, Uri requestUrl, Func <string, string> headerGetter) { var blobUrl = new BlobUrl(requestUrl); string action = null; switch (method) { case "DELETE": action = "Delete"; break; case "GET": if (requestUrl.Query.Contains("restype=container")) { if (requestUrl.Query.Contains("comp=list")) { action = "ListBlobs"; } else if (requestUrl.Query.Contains("comp=acl")) { action = "GetAcl"; } else { action = "GetProperties"; } } else { if (requestUrl.Query.Contains("comp=metadata")) { action = "GetMetadata"; } else if (requestUrl.Query.Contains("comp=list")) { action = "ListContainers"; } else if (requestUrl.Query.Contains("comp=tags")) { action = requestUrl.Query.Contains("where=") ? "FindTags" : "GetTags"; } else { action = "Download"; } } break; case "HEAD": if (requestUrl.Query.Contains("comp=metadata")) { action = "GetMetadata"; } else if (requestUrl.Query.Contains("comp=acl")) { action = "GetAcl"; } else { action = "GetProperties"; } break; case "POST": if (requestUrl.Query.Contains("comp=batch")) { action = "Batch"; } else if (requestUrl.Query.Contains("comp=query")) { action = "Query"; } break; case "PUT": if (!string.IsNullOrEmpty(headerGetter("x-ms-copy-source"))) { action = "Copy"; } else if (requestUrl.Query.Contains("comp=copy")) { action = "Abort"; } else if (!string.IsNullOrEmpty(headerGetter("x-ms-blob-type")) || requestUrl.Query.Contains("comp=block") || requestUrl.Query.Contains("comp=blocklist") || requestUrl.Query.Contains("comp=page") || requestUrl.Query.Contains("comp=appendblock")) { action = "Upload"; } else if (requestUrl.Query.Contains("comp=metadata")) { action = "SetMetadata"; } else if (requestUrl.Query.Contains("comp=acl")) { action = "SetAcl"; } else if (requestUrl.Query.Contains("comp=properties")) { action = "SetProperties"; } else if (requestUrl.Query.Contains("comp=lease")) { action = "Lease"; } else if (requestUrl.Query.Contains("comp=snapshot")) { action = "Snapshot"; } else if (requestUrl.Query.Contains("comp=undelete")) { action = "Undelete"; } else if (requestUrl.Query.Contains("comp=tags")) { action = "SetTags"; } else if (requestUrl.Query.Contains("comp=tier")) { action = "SetTier"; } else if (requestUrl.Query.Contains("comp=expiry")) { action = "SetExpiry"; } else if (requestUrl.Query.Contains("comp=seal")) { action = "Seal"; } else { action = "Create"; } break; } if (action is null) { return(null); } var name = $"{AzureBlobStorage.SpanName} {action} {blobUrl.ResourceName}"; var span = ExecutionSegmentCommon.StartSpanOnCurrentExecutionSegment(agent, name, ApiConstants.TypeStorage, AzureBlobStorage.SubType, InstrumentationFlag.Azure, true, true); span.Action = action; span.Context.Destination = new Destination { Address = blobUrl.FullyQualifiedNamespace, Service = new Destination.DestinationService { Resource = $"{AzureBlobStorage.SubType}/{blobUrl.StorageAccountName}", } }; if (span is Span realSpan) { realSpan.InstrumentationFlag = InstrumentationFlag.Azure; } return(span); }
internal static IExecutionSegment GetCurrentExecutionSegment(this IApmAgent agent) => agent.Tracer.CurrentSpan ?? (IExecutionSegment)agent.Tracer.CurrentTransaction;
public ApmErrorLogger(IApmAgent agent) => (_agent, _nullScope) = (agent, new NullScope());
public HostedService(IApmAgent apmAgent) => _apmAgent = apmAgent;
public GrpcClientDiagnosticListener(IApmAgent apmAgent) => _agent = apmAgent;
public HttpDiagnosticListener(IApmAgent components) => (Logger, ConfigurationReader) = (components.Logger, components.ConfigurationReader);
public TestListener(IApmAgent apmAgent) : base(apmAgent) { }
protected HttpDiagnosticListenerImplBase(IApmAgent agent) { _agent = agent; Logger = _agent.Logger?.Scoped("HttpDiagnosticListenerImplBase"); }
public RabbitMqDiagnosticListener(IApmAgent apmAgent, RabbitMqDiagnosticsOptions options) { _ApmAgent = apmAgent; _Options = options; }
public HttpDiagnosticListener(IApmAgent components) => (Logger, ConfigurationReader) = (components.Logger?.Scoped(nameof(HttpDiagnosticListener)), components.ConfigurationReader);
public HttpDiagnosticListenerCoreImpl(IApmAgent agent) : base(agent) { }
public EfCoreDiagnosticListener(IApmAgent agent) => Logger = agent.Logger?.Scoped(nameof(EfCoreDiagnosticListener));
protected ElasticsearchDiagnosticsListenerBase(IApmAgent agent) : base(agent) { }
public AzureFileShareStorageDiagnosticListener(IApmAgent agent) : base(agent) { }
public GrpcClientDiagnosticListener(IApmAgent apmAgent) : base(apmAgent) { }