|
| 1 | +[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/newrelic/dotnet-agent")] |
| 2 | +[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName=".NET Standard 2.0")] |
| 3 | +namespace NewRelic.Api.Agent |
| 4 | +{ |
| 5 | + public static class Constants |
| 6 | + { |
| 7 | + public const string DistributedTracePayloadKey = "Newrelic"; |
| 8 | + } |
| 9 | + public interface IAgent |
| 10 | + { |
| 11 | + NewRelic.Api.Agent.ISpan CurrentSpan { get; } |
| 12 | + NewRelic.Api.Agent.ITransaction CurrentTransaction { get; } |
| 13 | + NewRelic.Api.Agent.ITraceMetadata TraceMetadata { get; } |
| 14 | + System.Collections.Generic.Dictionary<string, string> GetLinkingMetadata(); |
| 15 | + } |
| 16 | + public interface IDistributedTracePayload |
| 17 | + { |
| 18 | + string HttpSafe(); |
| 19 | + bool IsEmpty(); |
| 20 | + string Text(); |
| 21 | + } |
| 22 | + public interface ISpan |
| 23 | + { |
| 24 | + NewRelic.Api.Agent.ISpan AddCustomAttribute(string key, object value); |
| 25 | + NewRelic.Api.Agent.ISpan SetName(string name); |
| 26 | + } |
| 27 | + public interface ITraceMetadata |
| 28 | + { |
| 29 | + bool IsSampled { get; } |
| 30 | + string SpanId { get; } |
| 31 | + string TraceId { get; } |
| 32 | + } |
| 33 | + public interface ITransaction |
| 34 | + { |
| 35 | + NewRelic.Api.Agent.ISpan CurrentSpan { get; } |
| 36 | + void AcceptDistributedTraceHeaders<T>(T carrier, System.Func<T, string, System.Collections.Generic.IEnumerable<string>> getter, NewRelic.Api.Agent.TransportType transportType); |
| 37 | + NewRelic.Api.Agent.ITransaction AddCustomAttribute(string key, object value); |
| 38 | + void InsertDistributedTraceHeaders<T>(T carrier, System.Action<T, string, string> setter); |
| 39 | + NewRelic.Api.Agent.SegmentWrapper? RecordDatastoreSegment(string vendor, string model, string operation, string? commandText = null, string? host = null, string? portPathOrID = null, string? databaseName = null); |
| 40 | + void SetUserId(string userid); |
| 41 | + } |
| 42 | + public static class NewRelic |
| 43 | + { |
| 44 | + public static void DisableBrowserMonitoring(bool overrideManual = false) { } |
| 45 | + public static NewRelic.Api.Agent.IAgent GetAgent() { } |
| 46 | + public static string GetBrowserTimingHeader() { } |
| 47 | + public static string GetBrowserTimingHeader(string nonce) { } |
| 48 | + public static System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string>> GetRequestMetadata() { } |
| 49 | + public static System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string>> GetResponseMetadata() { } |
| 50 | + public static void IgnoreApdex() { } |
| 51 | + public static void IgnoreTransaction() { } |
| 52 | + public static void IncrementCounter(string name) { } |
| 53 | + public static void NoticeError(System.Exception exception) { } |
| 54 | + public static void NoticeError(System.Exception exception, System.Collections.Generic.IDictionary<string, object>? parameters) { } |
| 55 | + public static void NoticeError(System.Exception exception, System.Collections.Generic.IDictionary<string, string>? parameters) { } |
| 56 | + public static void NoticeError(string message, System.Collections.Generic.IDictionary<string, object>? parameters) { } |
| 57 | + public static void NoticeError(string message, System.Collections.Generic.IDictionary<string, string>? parameters) { } |
| 58 | + public static void NoticeError(string message, System.Collections.Generic.IDictionary<string, object>? parameters, bool isExpected) { } |
| 59 | + public static void NoticeError(string message, System.Collections.Generic.IDictionary<string, string>? parameters, bool isExpected) { } |
| 60 | + public static void RecordCustomEvent(string eventType, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>> attributes) { } |
| 61 | + public static void RecordLlmFeedbackEvent(string traceId, object rating, string category = "", string message = "", System.Collections.Generic.IDictionary<string, object>? metadata = null) { } |
| 62 | + public static void RecordMetric(string name, float value) { } |
| 63 | + public static void RecordResponseTimeMetric(string name, long millis) { } |
| 64 | + public static void SetApplicationName(string applicationName, string? applicationName2 = null, string? applicationName3 = null) { } |
| 65 | + public static void SetErrorGroupCallback(System.Func<System.Collections.Generic.IReadOnlyDictionary<string, object>, string> callback) { } |
| 66 | + public static void SetLlmTokenCountingCallback(System.Func<string, string, int> callback) { } |
| 67 | + public static void SetTransactionName(string? category, string name) { } |
| 68 | + public static void SetTransactionUri(System.Uri uri) { } |
| 69 | + public static void SetUserParameters(string? userName, string? accountName, string? productName) { } |
| 70 | + public static void StartAgent() { } |
| 71 | + } |
| 72 | + public class SegmentWrapper : System.IDisposable |
| 73 | + { |
| 74 | + public void Dispose() { } |
| 75 | + public static NewRelic.Api.Agent.SegmentWrapper GetDatastoreWrapper([System.Runtime.CompilerServices.Dynamic] object transaction, string vendor, string model, string operation, string? commandText, string? host, string? portPathOrID, string? databaseName) { } |
| 76 | + } |
| 77 | + [System.AttributeUsage(System.AttributeTargets.Method)] |
| 78 | + public class TraceAttribute : System.Attribute |
| 79 | + { |
| 80 | + public TraceAttribute() { } |
| 81 | + } |
| 82 | + [System.AttributeUsage(System.AttributeTargets.Method)] |
| 83 | + public class TransactionAttribute : NewRelic.Api.Agent.TraceAttribute |
| 84 | + { |
| 85 | + public TransactionAttribute() { } |
| 86 | + public bool Web { get; set; } |
| 87 | + } |
| 88 | + public enum TransportType |
| 89 | + { |
| 90 | + Unknown = 0, |
| 91 | + HTTP = 1, |
| 92 | + HTTPS = 2, |
| 93 | + Kafka = 3, |
| 94 | + JMS = 4, |
| 95 | + IronMQ = 5, |
| 96 | + AMQP = 6, |
| 97 | + Queue = 7, |
| 98 | + Other = 8, |
| 99 | + } |
| 100 | +} |
0 commit comments