1
+ # TypeProf 0.21.7
2
+
3
+ module NewRelic
4
+ module VERSION
5
+ MAJOR: Integer
6
+ MINOR: Integer
7
+ TINY: Integer
8
+ STRING: String
9
+ end
10
+
11
+ module Agent
12
+ extend ::NewRelic::Agent
13
+
14
+ class LicenseException < StandardError
15
+ end
16
+
17
+ class ForceDisconnectException < StandardError
18
+ end
19
+
20
+ class AutomaticTracerParseException < StandardError
21
+ end
22
+
23
+ class AutomaticTracerTraceException < StandardError
24
+ end
25
+
26
+ class ForceRestartException < StandardError
27
+ def message : () -> String
28
+ end
29
+
30
+ class BusyCalculator
31
+ def self.busy_count : () -> Integer
32
+ end
33
+
34
+ class UnrecoverableError < StandardError
35
+ end
36
+
37
+ class BackgroundLoadingError < StandardError
38
+ end
39
+
40
+ class InternalAgentError < StandardError
41
+ end
42
+
43
+ TRACE_ID_KEY: String
44
+ SPAN_ID_KEY: String
45
+ ENTITY_NAME_KEY: String
46
+ ENTITY_TYPE_KEY: String
47
+ ENTITY_GUID_KEY: String
48
+ HOSTNAME_KEY: String
49
+ ENTITY_TYPE: String
50
+ LLM_FEEDBACK_MESSAGE: String
51
+ SUPPORTABILITY_INCREMENT_METRIC: String
52
+ EMPTY_STR: String
53
+
54
+ # Recording custom metrics
55
+ def record_metric : (String metric_name, (Numeric | Hash[Symbol, Numeric]) value) -> void
56
+
57
+ def increment_metric : (String metric_name, ?Integer amount) -> void
58
+
59
+ # Recording custom errors
60
+ def ignore_error_filter : () { (Exception) -> (Exception | nil ) } -> (^(Exception) -> (Exception | nil ))
61
+ | () -> (^(Exception) -> (Exception | nil ))?
62
+
63
+ def notice_error : (Exception exception, ?Hash[Symbol, untyped ] options) -> nil
64
+
65
+ def set_error_group_callback : (^(Hash[Symbol, untyped ]) -> String callback_proc) -> void
66
+
67
+ # Recording custom Insights events
68
+ def record_custom_event : ((Symbol | String) event_type, Hash[untyped , untyped ] event_attrs) -> nil
69
+
70
+ def record_llm_feedback_event : (
71
+ trace_id: String,
72
+ rating: (String | Integer),
73
+ ?category: String?,
74
+ ?message: String?,
75
+ ?metadata: Hash[untyped , untyped ]
76
+ ) -> void
77
+
78
+ # LLM callbacks
79
+ def set_llm_token_count_callback : (^(Hash[Symbol, untyped ]) -> Integer callback_proc) -> void
80
+
81
+ # Manual agent configuration and startup/shutdown
82
+ def manual_start : (?Hash[Symbol, untyped ] options) -> void
83
+
84
+ def after_fork : (?Hash[Symbol, untyped ] options) -> void
85
+
86
+ def shutdown : (?Hash[untyped , untyped ] options) -> void
87
+
88
+ def drop_buffered_data : () -> void
89
+
90
+ def add_instrumentation : (String file_pattern) -> void
91
+
92
+ def require_test_helper : () -> void
93
+
94
+ def set_sql_obfuscator : (?(:before | :replace | :after) type ) { (String) -> String } -> void
95
+
96
+ # Ignoring or excluding data
97
+ def ignore_transaction : () -> void
98
+
99
+ def ignore_apdex : () -> void
100
+
101
+ def ignore_enduser : () -> void
102
+
103
+ def disable_all_tracing : [T] () { () -> T } -> T
104
+
105
+ def disable_sql_recording : [T] () { () -> T } -> T
106
+
107
+ # Adding custom attributes to traces
108
+ def add_custom_attributes : (Hash[untyped , untyped ] params) -> void
109
+
110
+ def add_custom_span_attributes : (Hash[untyped , untyped ] params) -> void
111
+
112
+ def add_custom_log_attributes : (Hash[untyped , untyped ] params) -> void
113
+
114
+ def set_user_id : (String user_id) -> void
115
+
116
+ # Transaction naming
117
+ def set_transaction_name : (String name, ?Hash[Symbol, untyped ] options) -> void
118
+
119
+ def get_transaction_name : () -> String?
120
+
121
+ def with_database_metric_name : [T] (untyped model, ?String? method, ?String? product) { () -> T } -> T
122
+
123
+ # Trace and Entity metadata
124
+ def linking_metadata : () -> Hash[String, String]
125
+
126
+ # Manual browser monitoring configuration
127
+ def browser_timing_header : (?String? nonce) -> String
128
+
129
+
130
+ module MethodTracer
131
+ def trace_execution_scoped : [T] ((String | Array[String]) metric_names, ?Hash[Symbol, untyped ] options) { () -> T } -> T
132
+
133
+ def trace_execution_unscoped : [T] ((String | Array[String]) metric_names, ?Hash[Symbol, untyped ] options) { () -> T } -> T
134
+
135
+ module ClassMethods
136
+ def add_method_tracer : (Symbol method_name, ?String? metric_name, ?Hash[Symbol, untyped ] options) -> void
137
+
138
+ def remove_method_tracer : (Symbol method_name) -> void
139
+ end
140
+
141
+ def self.included : (Module klass) -> void
142
+
143
+ def self.extended : (Module klass) -> void
144
+ end
145
+
146
+ module Instrumentation
147
+ module ControllerInstrumentation
148
+ NR_DO_NOT_TRACE_KEY: Symbol
149
+ NR_IGNORE_APDEX_KEY: Symbol
150
+ NR_IGNORE_ENDUSER_KEY: Symbol
151
+ NR_DEFAULT_OPTIONS: Hash[untyped , untyped ]
152
+
153
+ module ClassMethods
154
+ def newrelic_ignore : (?Hash[Symbol, untyped ] specifiers) -> void
155
+
156
+ def newrelic_ignore_apdex : (?Hash[Symbol, untyped ] specifiers) -> void
157
+
158
+ def newrelic_ignore_enduser : (?Hash[Symbol, untyped ] specifiers) -> void
159
+
160
+ def add_transaction_tracer : (Symbol method, ?Hash[Symbol, untyped ] options) -> void
161
+ end
162
+
163
+ def perform_action_with_newrelic_trace : [T] (?Hash[Symbol, untyped ] options) { () -> T } -> T
164
+
165
+ def self.included : (Module clazz) -> void
166
+ end
167
+ end
168
+ end
169
+ end
0 commit comments