hyperprobe-agent 1.12.19__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,73 @@
1
+ import time
2
+ import threading
3
+
4
+
5
+ class QuotaReservation:
6
+ def __init__(self, bucket, count: float):
7
+ self._bucket = bucket
8
+ self._count = count
9
+ self._closed = False
10
+ self._lock = threading.Lock()
11
+
12
+ def commit(self):
13
+ with self._lock:
14
+ self._closed = True
15
+
16
+ def release(self):
17
+ with self._lock:
18
+ if self._closed:
19
+ return
20
+ self._closed = True
21
+ self._bucket.refund(self._count)
22
+
23
+
24
+ class TokenBucket:
25
+ def __init__(self, capacity: float, refill_rate_per_sec: float):
26
+ self.capacity = capacity
27
+ self.refill_rate = refill_rate_per_sec # tokens per second
28
+ self.tokens = capacity
29
+ self.last_refill = time.monotonic()
30
+ self.lock = threading.Lock()
31
+
32
+ def try_consume(self, count: float = 1.0) -> bool:
33
+ reservation = self.reserve(count)
34
+ if reservation is None:
35
+ return False
36
+ reservation.commit()
37
+ return True
38
+
39
+ def reserve(self, count: float = 1.0):
40
+ with self.lock:
41
+ self._refill()
42
+ if self.tokens >= count:
43
+ self.tokens -= count
44
+ return QuotaReservation(self, count)
45
+ return None
46
+
47
+ def refund(self, count: float):
48
+ with self.lock:
49
+ self._refill()
50
+ self.tokens = min(self.capacity, self.tokens + count)
51
+
52
+ def _refill(self):
53
+ now = time.monotonic()
54
+ delta = now - self.last_refill
55
+ amount = delta * self.refill_rate
56
+ self.tokens = min(self.capacity, self.tokens + amount)
57
+ self.last_refill = now
58
+
59
+
60
+ class QuotaManager:
61
+ def __init__(self, hits_per_sec: float = 10.0, bytes_per_sec: float = 200.0 * 1024.0):
62
+ # Burst capacity of hits_per_sec and bytes_per_sec (1 second worth)
63
+ self.eval_bucket = TokenBucket(hits_per_sec, hits_per_sec)
64
+ self.bandwidth_bucket = TokenBucket(bytes_per_sec, bytes_per_sec)
65
+
66
+ def can_evaluate(self) -> bool:
67
+ return self.eval_bucket.try_consume(1.0)
68
+
69
+ def can_send(self, bytes_count: float) -> bool:
70
+ return self.bandwidth_bucket.try_consume(bytes_count)
71
+
72
+ def reserve_bandwidth(self, bytes_count: float):
73
+ return self.bandwidth_bucket.reserve(bytes_count)
@@ -0,0 +1,136 @@
1
+ import time
2
+ import threading
3
+
4
+ class AgentHealth:
5
+ GREEN = 'GREEN' # All good
6
+ YELLOW = 'YELLOW' # Rate limited (Reactive Shedding)
7
+ RED = 'RED' # Critical Lag (Proactive Shedding - Detach)
8
+
9
+
10
+ class SafetyMonitor:
11
+ def __init__(self, on_state_change, max_lag_ms=50.0, pause_budget_ms=15.0):
12
+ self.on_state_change = on_state_change
13
+ self.max_lag_ms = max_lag_ms
14
+ self.pause_budget_ms = pause_budget_ms
15
+
16
+ self.health = AgentHealth.GREEN
17
+ self.cumulative_pause_time = 0.0
18
+ self.last_window_reset = time.monotonic()
19
+ self.last_thread_lag_ms = 0.0
20
+
21
+ self.lock = threading.RLock()
22
+ self._notification_lock = threading.RLock()
23
+
24
+ self.is_running = False
25
+ self.thread = None
26
+ self.stop_event = threading.Event()
27
+
28
+ def start(self):
29
+ self.stop_event.clear()
30
+ self.is_running = True
31
+ self.thread = threading.Thread(target=self._run_loop, name="hyperprobe-safety")
32
+ self.thread.daemon = True
33
+ self.thread.start()
34
+
35
+ def stop(self):
36
+ self.is_running = False
37
+ self.stop_event.set()
38
+ if self.thread and self.thread is not threading.current_thread():
39
+ self.thread.join(timeout=2.0)
40
+ self.thread = None
41
+
42
+ def report_pause_duration(self, ms: float):
43
+ with self.lock:
44
+ self.cumulative_pause_time += ms
45
+ transition = self._evaluate_health_locked(self.last_thread_lag_ms)
46
+
47
+ self._notify_state_change(transition)
48
+
49
+ def _run_loop(self):
50
+ last_heartbeat = time.monotonic()
51
+
52
+ while self.is_running and not self.stop_event.wait(0.1):
53
+ now = time.monotonic()
54
+ thread_lag_ms = (now - last_heartbeat - 0.1) * 1000.0
55
+ last_heartbeat = now
56
+
57
+ with self.lock:
58
+ self.last_thread_lag_ms = thread_lag_ms
59
+ if now - self.last_window_reset > 1.0:
60
+ self.cumulative_pause_time = 0.0
61
+ self.last_window_reset = now
62
+
63
+ transition = self._evaluate_health_locked(thread_lag_ms)
64
+
65
+ self._notify_state_change(transition)
66
+
67
+ def _check_health(self, thread_lag_ms: float = 0.0):
68
+ """
69
+ Preserves the existing method signature while ensuring that
70
+ callbacks execute outside the state lock.
71
+ """
72
+ with self.lock:
73
+ transition = self._evaluate_health_locked(thread_lag_ms)
74
+
75
+ self._notify_state_change(transition)
76
+
77
+ def _evaluate_health_locked(self, thread_lag_ms: float = 0.0):
78
+ previous_health = self.health
79
+ reason = None
80
+
81
+ if thread_lag_ms > self.max_lag_ms:
82
+ self.health = AgentHealth.RED
83
+ reason = (
84
+ f"Execution Thread Lag ({thread_lag_ms:.1f}ms) exceeded "
85
+ f"limit ({self.max_lag_ms}ms)"
86
+ )
87
+ elif self.cumulative_pause_time > self.pause_budget_ms:
88
+ self.health = AgentHealth.RED
89
+ reason = (
90
+ f"Cumulative Pause Budget ({self.cumulative_pause_time:.1f}ms) "
91
+ f"exceeded limit ({self.pause_budget_ms}ms)"
92
+ )
93
+ elif thread_lag_ms > self.max_lag_ms / 2.0:
94
+ self.health = AgentHealth.YELLOW
95
+ reason = (
96
+ f"Moderate impact: Execution Thread Lag "
97
+ f"({thread_lag_ms:.1f}ms) reached 50% of limit "
98
+ f"({self.max_lag_ms}ms)"
99
+ )
100
+ elif self.cumulative_pause_time > self.pause_budget_ms / 2.0:
101
+ self.health = AgentHealth.YELLOW
102
+ reason = (
103
+ f"Moderate impact: Cumulative Pause Budget "
104
+ f"({self.cumulative_pause_time:.1f}ms) reached 50% of limit "
105
+ f"({self.pause_budget_ms}ms)"
106
+ )
107
+ else:
108
+ self.health = AgentHealth.GREEN
109
+ if previous_health != AgentHealth.GREEN:
110
+ reason = "System stabilized."
111
+
112
+ if self.health != previous_health:
113
+ return self.health, reason
114
+
115
+ return None
116
+
117
+ def _notify_state_change(self, transition):
118
+ if transition is None:
119
+ return
120
+
121
+ health, reason = transition
122
+
123
+ with self._notification_lock:
124
+ with self.lock:
125
+ if self.health != health:
126
+ return
127
+
128
+ try:
129
+ self.on_state_change(health, reason)
130
+ except Exception:
131
+ # Safety callbacks must never break application execution.
132
+ pass
133
+
134
+ def get_health(self) -> str:
135
+ with self.lock:
136
+ return self.health
@@ -0,0 +1,214 @@
1
+ import math
2
+
3
+
4
+ def _type_summary(obj):
5
+ type_name = type(obj).__name__
6
+ if isinstance(obj, (bytes, bytearray, memoryview)):
7
+ try:
8
+ return f"[{type_name}: {len(obj)} bytes]"
9
+ except Exception:
10
+ return f"[{type_name}]"
11
+ if isinstance(obj, dict):
12
+ try:
13
+ return f"[Dict: {len(obj)} keys]"
14
+ except Exception:
15
+ return "[Dict]"
16
+ if isinstance(obj, (list, tuple, set)):
17
+ try:
18
+ return f"[List: {len(obj)} items]"
19
+ except Exception:
20
+ return "[List]"
21
+ return f"[Obj: {type_name}]"
22
+
23
+
24
+ def _safe_key(key):
25
+ if isinstance(key, (str, int, float, bool)) or key is None:
26
+ return str(key)
27
+ return f"[{type(key).__name__} key]"
28
+
29
+
30
+ def _safe_length(value):
31
+ try:
32
+ return len(value)
33
+ except Exception:
34
+ return None
35
+
36
+
37
+ def serialize(
38
+ obj,
39
+ max_depth=3,
40
+ max_array_length=3,
41
+ max_object_properties=50,
42
+ max_string_length=1024,
43
+ redact_keys_re=None,
44
+ redact_values_re=None,
45
+ visited=None,
46
+ depth=0,
47
+ path="$",
48
+ ):
49
+ """Serialize a bounded object graph without invoking arbitrary repr()."""
50
+ if visited is None:
51
+ visited = {}
52
+
53
+ if obj is None:
54
+ return None
55
+ if isinstance(obj, bool):
56
+ return obj
57
+ if isinstance(obj, int):
58
+ return obj
59
+ if isinstance(obj, float):
60
+ if not math.isfinite(obj):
61
+ return str(obj)
62
+ return obj
63
+ if isinstance(obj, str):
64
+ value = obj
65
+ if len(value) > max_string_length:
66
+ value = (
67
+ value[:max_string_length]
68
+ + f"... [Truncated: +{len(value) - max_string_length} more chars]"
69
+ )
70
+ if redact_values_re and redact_values_re.search(value):
71
+ value = redact_values_re.sub("[REDACTED Value]", value)
72
+ return value
73
+ if isinstance(obj, (bytes, bytearray, memoryview)):
74
+ return _type_summary(obj)
75
+
76
+ obj_id = id(obj)
77
+ previous = visited.get(obj_id)
78
+ if previous is not None:
79
+ previous_obj, previous_path = previous
80
+ if previous_obj is obj:
81
+ return f"[REF - {previous_path}]"
82
+
83
+ if depth > max_depth:
84
+ return _type_summary(obj)
85
+
86
+ # Retain the object for the whole serialization operation. This preserves
87
+ # aliases and prevents stale id() reuse while traversing generators.
88
+ visited[obj_id] = (obj, path)
89
+
90
+ if isinstance(obj, dict):
91
+ result = {}
92
+ processed = 0
93
+ try:
94
+ iterator = iter(obj.items())
95
+ while processed < max_object_properties:
96
+ try:
97
+ key, value = next(iterator)
98
+ except StopIteration:
99
+ break
100
+
101
+ key_string = _safe_key(key)
102
+ if redact_keys_re and redact_keys_re.search(key_string):
103
+ result[key_string] = "[REDACTED Key]"
104
+ else:
105
+ child_path = f"{path}.{key_string}" if path else key_string
106
+ result[key_string] = serialize(
107
+ value,
108
+ max_depth=max_depth,
109
+ max_array_length=max_array_length,
110
+ max_object_properties=max_object_properties,
111
+ max_string_length=max_string_length,
112
+ redact_keys_re=redact_keys_re,
113
+ redact_values_re=redact_values_re,
114
+ visited=visited,
115
+ depth=depth + 1,
116
+ path=child_path,
117
+ )
118
+ processed += 1
119
+
120
+ total = _safe_length(obj)
121
+ if total is not None and total > processed:
122
+ result["__probe_meta"] = (
123
+ f"+ {total - processed} more properties truncated"
124
+ )
125
+ elif total is None:
126
+ try:
127
+ next(iterator)
128
+ except StopIteration:
129
+ pass
130
+ else:
131
+ result["__probe_meta"] = "+ more properties truncated"
132
+ except Exception:
133
+ result["__probe_meta"] = "[Dictionary traversal failed]"
134
+ return result
135
+
136
+ if isinstance(obj, (list, tuple, set)):
137
+ result = []
138
+ processed = 0
139
+ try:
140
+ iterator = iter(obj)
141
+ while processed < max_array_length:
142
+ try:
143
+ value = next(iterator)
144
+ except StopIteration:
145
+ break
146
+ result.append(
147
+ serialize(
148
+ value,
149
+ max_depth=max_depth,
150
+ max_array_length=max_array_length,
151
+ max_object_properties=max_object_properties,
152
+ max_string_length=max_string_length,
153
+ redact_keys_re=redact_keys_re,
154
+ redact_values_re=redact_values_re,
155
+ visited=visited,
156
+ depth=depth + 1,
157
+ path=f"{path}[{processed}]",
158
+ )
159
+ )
160
+ processed += 1
161
+
162
+ total = _safe_length(obj)
163
+ if total is not None and total > processed:
164
+ result.append(f"[+ {total - processed} more items truncated]")
165
+ elif total is None:
166
+ try:
167
+ next(iterator)
168
+ except StopIteration:
169
+ pass
170
+ else:
171
+ result.append("[+ more items truncated]")
172
+ except Exception:
173
+ result.append("[Iterable traversal failed]")
174
+ return result
175
+
176
+ try:
177
+ properties = vars(obj)
178
+ except Exception:
179
+ return _type_summary(obj)
180
+
181
+ result = {}
182
+ try:
183
+ keys = [key for key in properties if not key.startswith("_")]
184
+ except Exception:
185
+ return _type_summary(obj)
186
+
187
+ for index, key in enumerate(keys[:max_object_properties]):
188
+ if redact_keys_re and redact_keys_re.search(key):
189
+ result[key] = "[REDACTED Key]"
190
+ continue
191
+
192
+ child_path = f"{path}.{key}" if path else key
193
+ try:
194
+ value = properties[key]
195
+ result[key] = serialize(
196
+ value,
197
+ max_depth=max_depth,
198
+ max_array_length=max_array_length,
199
+ max_object_properties=max_object_properties,
200
+ max_string_length=max_string_length,
201
+ redact_keys_re=redact_keys_re,
202
+ redact_values_re=redact_values_re,
203
+ visited=visited,
204
+ depth=depth + 1,
205
+ path=child_path,
206
+ )
207
+ except Exception:
208
+ result[key] = "[Inaccessible]"
209
+
210
+ if len(keys) > max_object_properties:
211
+ result["__probe_meta"] = (
212
+ f"+ {len(keys) - max_object_properties} more properties truncated"
213
+ )
214
+ return result
@@ -0,0 +1,93 @@
1
+ import sys
2
+ import os
3
+ import importlib
4
+ from hyperprobe.core.logger import get_logger
5
+
6
+ logger = get_logger("hyperprobe:trace")
7
+
8
+ def extract_trace_context(custom_get_trace_id=None):
9
+ """
10
+ Safely extract the active trace ID from standard APMs via sys.modules reflection
11
+ or utilize a custom user-defined hook.
12
+ """
13
+ # 1. User-defined custom hook (Highest Priority - passed via code)
14
+ if custom_get_trace_id and callable(custom_get_trace_id):
15
+ try:
16
+ trace_id = custom_get_trace_id()
17
+ if trace_id:
18
+ return str(trace_id)
19
+ except Exception as e:
20
+ logger.info(f"[HyperProbe] Custom trace extractor failed: {e}")
21
+
22
+ # 1.5. Environment variable hook
23
+ hook_path = os.getenv("HYPERPROBE_TRACE_HOOK")
24
+ if hook_path and ":" in hook_path:
25
+ try:
26
+ module_name, func_name = hook_path.split(":", 1)
27
+ # Safely ensure CWD is in the import path
28
+ cwd = os.getcwd()
29
+ added_to_path = False
30
+
31
+ if cwd not in sys.path:
32
+ sys.path.insert(0, cwd)
33
+ added_to_path = True
34
+
35
+ try:
36
+ user_module = importlib.import_module(module_name)
37
+ user_func = getattr(user_module, func_name)
38
+ trace_id = user_func()
39
+ if trace_id:
40
+ return str(trace_id)
41
+ finally:
42
+ # Clean up if we modified sys.path
43
+ if added_to_path:
44
+ sys.path.remove(cwd)
45
+
46
+ except Exception as e:
47
+ logger.info(f"[HyperProbe] Failed to execute HYPERPROBE_TRACE_HOOK: {e}")
48
+
49
+ # 2. OpenTelemetry
50
+ try:
51
+ if 'opentelemetry.trace' in sys.modules:
52
+ otel_trace = sys.modules['opentelemetry.trace']
53
+ span = otel_trace.get_current_span()
54
+ if span:
55
+ ctx = span.get_span_context()
56
+ if ctx and ctx.is_valid:
57
+ return format(ctx.trace_id, '032x')
58
+ except Exception:
59
+ pass
60
+
61
+ # 3. Datadog (ddtrace)
62
+ try:
63
+ if 'ddtrace' in sys.modules:
64
+ ddtrace = sys.modules['ddtrace']
65
+ span = ddtrace.tracer.current_span()
66
+ if span and span.trace_id:
67
+ return str(span.trace_id)
68
+ except Exception:
69
+ pass
70
+
71
+ # 4. New Relic
72
+ try:
73
+ if 'newrelic.agent' in sys.modules:
74
+ nr = sys.modules['newrelic.agent']
75
+ if hasattr(nr, 'current_trace_id'):
76
+ trace_id = nr.current_trace_id()
77
+ if trace_id:
78
+ return str(trace_id)
79
+ except Exception:
80
+ pass
81
+
82
+ # 5. Elastic APM
83
+ try:
84
+ if 'elasticapm' in sys.modules:
85
+ elasticapm = sys.modules['elasticapm']
86
+ trace_id = elasticapm.get_trace_id()
87
+ if trace_id:
88
+ return str(trace_id)
89
+ except Exception:
90
+ pass
91
+
92
+ logger.info("[HyperProbe] trace id could not be extracted.")
93
+ return None
@@ -0,0 +1,7 @@
1
+ import sys
2
+ import os
3
+
4
+ # Inject current directory into sys.path temporarily so generated protobuf imports resolve correctly
5
+ current_dir = os.path.dirname(os.path.abspath(__file__))
6
+ if current_dir not in sys.path:
7
+ sys.path.insert(0, current_dir)
@@ -0,0 +1,57 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: agent.proto
4
+ # Protobuf Python Version: 4.25.1
5
+ """Generated protocol buffer code."""
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ from google.protobuf.internal import builder as _builder
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+
16
+
17
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0b\x61gent.proto\x12\x13hyperprobe.agent.v1\"\x9c\x01\n\x10GetProbesRequest\x12\x10\n\x08\x61gent_id\x18\x01 \x01(\t\x12\x12\n\nservice_id\x18\x02 \x01(\t\x12\x13\n\x0b\x65nvironment\x18\x03 \x01(\t\x12\x12\n\ncommit_sha\x18\x04 \x01(\t\x12\x10\n\x08language\x18\x05 \x01(\t\x12\x15\n\ragent_version\x18\x06 \x01(\t\x12\x10\n\x08hostname\x18\x07 \x01(\t\"\xbc\x01\n\x11GetProbesResponse\x12*\n\x06probes\x18\x01 \x03(\x0b\x32\x1a.hyperprobe.agent.v1.Probe\x12\"\n\x15next_sync_interval_ms\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12=\n\rglobal_config\x18\x03 \x01(\x0b\x32&.hyperprobe.agent.v1.AgentGlobalConfigB\x18\n\x16_next_sync_interval_ms\"U\n\x16SourceMapStatusRequest\x12\x12\n\nservice_id\x18\x01 \x01(\t\x12\x13\n\x0b\x65nvironment\x18\x02 \x01(\t\x12\x12\n\ncommit_sha\x18\x03 \x01(\t\"C\n\x17SourceMapStatusResponse\x12\x13\n\x0bis_uploader\x18\x01 \x01(\x08\x12\x13\n\x0bis_complete\x18\x02 \x01(\x08\"n\n\x0eSourceMapChunk\x12\x12\n\nservice_id\x18\x01 \x01(\t\x12\x13\n\x0b\x65nvironment\x18\x02 \x01(\t\x12\x12\n\ncommit_sha\x18\x03 \x01(\t\x12\x11\n\tfile_name\x18\x04 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\"!\n\x0eUploadResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"[\n\x1cMarkSourceMapCompleteRequest\x12\x12\n\nservice_id\x18\x01 \x01(\t\x12\x13\n\x0b\x65nvironment\x18\x02 \x01(\t\x12\x12\n\ncommit_sha\x18\x03 \x01(\t\"0\n\x1dMarkSourceMapCompleteResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"\xd1\x02\n\x11\x41gentGlobalConfig\x12\x13\n\x0bredact_keys\x18\x01 \x03(\t\x12\x15\n\rredact_values\x18\x02 \x03(\t\x12\x1d\n\x10max_object_depth\x18\x03 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_array_length\x18\x04 \x01(\x05H\x01\x88\x01\x01\x12\x1e\n\x11stack_frame_depth\x18\x05 \x01(\x05H\x02\x88\x01\x01\x12\"\n\x15max_object_properties\x18\x06 \x01(\x05H\x03\x88\x01\x01\x12\x1e\n\x11max_string_length\x18\x07 \x01(\x05H\x04\x88\x01\x01\x42\x13\n\x11_max_object_depthB\x13\n\x11_max_array_lengthB\x14\n\x12_stack_frame_depthB\x18\n\x16_max_object_propertiesB\x14\n\x12_max_string_length\"\xfb\x05\n\x05Probe\x12\n\n\x02id\x18\x01 \x01(\t\x12,\n\x04type\x18\x02 \x01(\x0e\x32\x1e.hyperprobe.agent.v1.ProbeType\x12\x18\n\x10runtime_location\x18\x03 \x01(\t\x12\x14\n\x0cruntime_line\x18\x04 \x01(\x05\x12\"\n\x1asecondary_runtime_location\x18\x05 \x01(\t\x12\x1e\n\x16secondary_runtime_line\x18\x06 \x01(\x05\x12\x11\n\tcondition\x18\x07 \x01(\t\x12\x10\n\x08template\x18\x08 \x01(\t\x12\x13\n\x0bmetric_name\x18\t \x01(\t\x12\x19\n\x11metric_expression\x18\n \x01(\t\x12\x19\n\x11watch_expressions\x18\x0b \x03(\t\x12\x11\n\thit_limit\x18\x0c \x01(\x05\x12\x13\n\x0b\x65xpiry_time\x18\r \x01(\x03\x12\x16\n\x0eruntime_column\x18\x0e \x01(\x05\x12 \n\x18secondary_runtime_column\x18\x0f \x01(\x05\x12\x1e\n\x16\x63orrelation_expression\x18\x10 \x01(\t\x12\x1d\n\x10max_object_depth\x18\x11 \x01(\x05H\x00\x88\x01\x01\x12\x1d\n\x10max_array_length\x18\x12 \x01(\x05H\x01\x88\x01\x01\x12\x1e\n\x11stack_frame_depth\x18\x13 \x01(\x05H\x02\x88\x01\x01\x12\"\n\x15max_object_properties\x18\x14 \x01(\x05H\x03\x88\x01\x01\x12\x1e\n\x11max_string_length\x18\x15 \x01(\x05H\x04\x88\x01\x01\x12$\n\x17should_capture_trace_id\x18\x16 \x01(\x08H\x05\x88\x01\x01\x42\x13\n\x11_max_object_depthB\x13\n\x11_max_array_lengthB\x14\n\x12_stack_frame_depthB\x18\n\x16_max_object_propertiesB\x14\n\x12_max_string_lengthB\x1a\n\x18_should_capture_trace_id\"W\n\x0eTelemetryBatch\x12\x10\n\x08\x61gent_id\x18\x01 \x01(\t\x12\x33\n\x06\x65vents\x18\x02 \x03(\x0b\x32#.hyperprobe.agent.v1.TelemetryEvent\"\x8a\x01\n\nStackFrame\x12\x15\n\rfunction_name\x18\x01 \x01(\t\x12\x11\n\tfile_name\x18\x02 \x01(\t\x12\x13\n\x0bline_number\x18\x03 \x01(\x05\x12\x15\n\rcolumn_number\x18\x04 \x01(\x05\x12\x17\n\nclass_name\x18\x05 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_class_name\"\x8f\x02\n\x0eTelemetryEvent\x12\x10\n\x08probe_id\x18\x01 \x01(\t\x12\x14\n\x0ctimestamp_ms\x18\x02 \x01(\x03\x12\x35\n\x0cstack_frames\x18\x03 \x03(\x0b\x32\x1f.hyperprobe.agent.v1.StackFrame\x12\x1a\n\x12\x63\x61ptured_vars_json\x18\x04 \x01(\t\x12\x1a\n\x12watch_results_json\x18\x05 \x01(\t\x12\x15\n\revaluated_log\x18\x06 \x01(\t\x12\x14\n\x0cmetric_value\x18\x07 \x01(\x01\x12\x15\n\rcapture_error\x18\x08 \x01(\t\x12\x15\n\x08trace_id\x18\t \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_trace_id\"/\n\x11TelemetryResponse\x12\x1a\n\x12\x66inished_probe_ids\x18\x01 \x03(\t*\x9c\x01\n\tProbeType\x12\x1a\n\x16PROBE_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13PROBE_TYPE_SNAPSHOT\x10\x01\x12\x12\n\x0ePROBE_TYPE_LOG\x10\x02\x12\x16\n\x12PROBE_TYPE_COUNTER\x10\x03\x12\x15\n\x11PROBE_TYPE_METRIC\x10\x04\x12\x17\n\x13PROBE_TYPE_DURATION\x10\x05\x32\x99\x04\n\x0b\x41gentBroker\x12Z\n\tGetProbes\x12%.hyperprobe.agent.v1.GetProbesRequest\x1a&.hyperprobe.agent.v1.GetProbesResponse\x12^\n\x0fReportTelemetry\x12#.hyperprobe.agent.v1.TelemetryBatch\x1a&.hyperprobe.agent.v1.TelemetryResponse\x12o\n\x12GetSourceMapStatus\x12+.hyperprobe.agent.v1.SourceMapStatusRequest\x1a,.hyperprobe.agent.v1.SourceMapStatusResponse\x12]\n\x0fUploadSourceMap\x12#.hyperprobe.agent.v1.SourceMapChunk\x1a#.hyperprobe.agent.v1.UploadResponse(\x01\x12~\n\x15MarkSourceMapComplete\x12\x31.hyperprobe.agent.v1.MarkSourceMapCompleteRequest\x1a\x32.hyperprobe.agent.v1.MarkSourceMapCompleteResponseB\tB\x05\x41gentP\x00\x62\x06proto3')
18
+
19
+ _globals = globals()
20
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
21
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'agent_pb2', _globals)
22
+ if _descriptor._USE_C_DESCRIPTORS == False:
23
+ _globals['DESCRIPTOR']._options = None
24
+ _globals['DESCRIPTOR']._serialized_options = b'B\005AgentP\000'
25
+ _globals['_PROBETYPE']._serialized_start=2492
26
+ _globals['_PROBETYPE']._serialized_end=2648
27
+ _globals['_GETPROBESREQUEST']._serialized_start=37
28
+ _globals['_GETPROBESREQUEST']._serialized_end=193
29
+ _globals['_GETPROBESRESPONSE']._serialized_start=196
30
+ _globals['_GETPROBESRESPONSE']._serialized_end=384
31
+ _globals['_SOURCEMAPSTATUSREQUEST']._serialized_start=386
32
+ _globals['_SOURCEMAPSTATUSREQUEST']._serialized_end=471
33
+ _globals['_SOURCEMAPSTATUSRESPONSE']._serialized_start=473
34
+ _globals['_SOURCEMAPSTATUSRESPONSE']._serialized_end=540
35
+ _globals['_SOURCEMAPCHUNK']._serialized_start=542
36
+ _globals['_SOURCEMAPCHUNK']._serialized_end=652
37
+ _globals['_UPLOADRESPONSE']._serialized_start=654
38
+ _globals['_UPLOADRESPONSE']._serialized_end=687
39
+ _globals['_MARKSOURCEMAPCOMPLETEREQUEST']._serialized_start=689
40
+ _globals['_MARKSOURCEMAPCOMPLETEREQUEST']._serialized_end=780
41
+ _globals['_MARKSOURCEMAPCOMPLETERESPONSE']._serialized_start=782
42
+ _globals['_MARKSOURCEMAPCOMPLETERESPONSE']._serialized_end=830
43
+ _globals['_AGENTGLOBALCONFIG']._serialized_start=833
44
+ _globals['_AGENTGLOBALCONFIG']._serialized_end=1170
45
+ _globals['_PROBE']._serialized_start=1173
46
+ _globals['_PROBE']._serialized_end=1936
47
+ _globals['_TELEMETRYBATCH']._serialized_start=1938
48
+ _globals['_TELEMETRYBATCH']._serialized_end=2025
49
+ _globals['_STACKFRAME']._serialized_start=2028
50
+ _globals['_STACKFRAME']._serialized_end=2166
51
+ _globals['_TELEMETRYEVENT']._serialized_start=2169
52
+ _globals['_TELEMETRYEVENT']._serialized_end=2440
53
+ _globals['_TELEMETRYRESPONSE']._serialized_start=2442
54
+ _globals['_TELEMETRYRESPONSE']._serialized_end=2489
55
+ _globals['_AGENTBROKER']._serialized_start=2651
56
+ _globals['_AGENTBROKER']._serialized_end=3188
57
+ # @@protoc_insertion_point(module_scope)