debugbundle-python 1.2.0__py3-none-any.whl → 1.4.0__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.
- debugbundle/__init__.py +3 -0
- debugbundle/acknowledgement.py +71 -0
- debugbundle/before_send.py +218 -0
- debugbundle/core.py +139 -323
- debugbundle/event_support.py +281 -0
- debugbundle/transport.py +8 -2
- {debugbundle_python-1.2.0.dist-info → debugbundle_python-1.4.0.dist-info}/METADATA +4 -4
- {debugbundle_python-1.2.0.dist-info → debugbundle_python-1.4.0.dist-info}/RECORD +11 -8
- {debugbundle_python-1.2.0.dist-info → debugbundle_python-1.4.0.dist-info}/WHEEL +1 -1
- debugbundle_python-1.4.0.dist-info/licenses/LICENSE +202 -0
- debugbundle_python-1.2.0.dist-info/licenses/LICENSE +0 -17
- {debugbundle_python-1.2.0.dist-info → debugbundle_python-1.4.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import platform
|
|
5
|
+
import socket
|
|
6
|
+
import sys
|
|
7
|
+
import threading
|
|
8
|
+
import time
|
|
9
|
+
import traceback
|
|
10
|
+
from collections.abc import Callable, Mapping
|
|
11
|
+
from datetime import datetime, timezone
|
|
12
|
+
from importlib import metadata
|
|
13
|
+
from typing import Any, cast
|
|
14
|
+
|
|
15
|
+
from .redaction import redact_value
|
|
16
|
+
|
|
17
|
+
try:
|
|
18
|
+
import resource
|
|
19
|
+
except ImportError: # pragma: no cover - resource is unavailable on some platforms.
|
|
20
|
+
resource = None # type: ignore[assignment]
|
|
21
|
+
|
|
22
|
+
DEFAULT_LOG_LEVEL = "warning"
|
|
23
|
+
PROCESS_START_MONOTONIC = time.monotonic()
|
|
24
|
+
LEVEL_RANKS = {
|
|
25
|
+
"debug": 10,
|
|
26
|
+
"info": 20,
|
|
27
|
+
"warning": 30,
|
|
28
|
+
"error": 40,
|
|
29
|
+
"critical": 50,
|
|
30
|
+
}
|
|
31
|
+
BALANCED_IMMEDIATE_REQUEST_STATUSES = {408, 423, 424, 425, 429}
|
|
32
|
+
INVESTIGATIVE_IMMEDIATE_REQUEST_STATUSES = BALANCED_IMMEDIATE_REQUEST_STATUSES | {409}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def normalize_level(level: str) -> str:
|
|
36
|
+
normalized = level.lower().strip()
|
|
37
|
+
return normalized if normalized in LEVEL_RANKS else DEFAULT_LOG_LEVEL
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def level_enabled(candidate: str, threshold: str) -> bool:
|
|
41
|
+
return LEVEL_RANKS[candidate] >= LEVEL_RANKS[threshold]
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def redact_mapping(value: object, redact_fields: set[str]) -> Any:
|
|
45
|
+
if isinstance(value, Mapping):
|
|
46
|
+
return redact_value(value, redact_fields)
|
|
47
|
+
return value
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def runtime_process_facts() -> dict[str, object]:
|
|
51
|
+
return {
|
|
52
|
+
"version": platform.python_version(),
|
|
53
|
+
"platform": sys.platform,
|
|
54
|
+
"arch": platform.machine() or None,
|
|
55
|
+
"pid": os.getpid(),
|
|
56
|
+
"cwd": _safe_cwd(),
|
|
57
|
+
"uptime_sec": round(max(0.0, time.monotonic() - PROCESS_START_MONOTONIC), 3),
|
|
58
|
+
"hostname": _safe_hostname(),
|
|
59
|
+
"thread_id": threading.get_ident(),
|
|
60
|
+
"memory": _memory_facts(),
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def _safe_cwd() -> str | None:
|
|
65
|
+
try:
|
|
66
|
+
return os.getcwd()
|
|
67
|
+
except OSError:
|
|
68
|
+
return None
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def _safe_hostname() -> str | None:
|
|
72
|
+
try:
|
|
73
|
+
return socket.gethostname()
|
|
74
|
+
except OSError:
|
|
75
|
+
return None
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def _memory_facts() -> dict[str, object]:
|
|
79
|
+
memory: dict[str, object] = {
|
|
80
|
+
"rss": None,
|
|
81
|
+
"heap_total": None,
|
|
82
|
+
"heap_used": None,
|
|
83
|
+
"external": None,
|
|
84
|
+
"peak": None,
|
|
85
|
+
}
|
|
86
|
+
if resource is None:
|
|
87
|
+
return memory
|
|
88
|
+
|
|
89
|
+
usage = resource.getrusage(resource.RUSAGE_SELF)
|
|
90
|
+
# ru_maxrss is KiB on Linux and bytes on macOS/BSD.
|
|
91
|
+
memory["peak"] = usage.ru_maxrss if sys.platform == "darwin" else usage.ru_maxrss * 1024
|
|
92
|
+
return memory
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def backend_exception_request_payload(candidate: object | None) -> dict[str, object]:
|
|
96
|
+
mapping = dict_from_object(candidate)
|
|
97
|
+
payload: dict[str, object] = {
|
|
98
|
+
"method": str(mapping.get("method") or "UNKNOWN"),
|
|
99
|
+
"path": str(mapping.get("path") or "/"),
|
|
100
|
+
"query": dict_from_object(mapping.get("query")),
|
|
101
|
+
"headers": dict_from_object(mapping.get("headers")),
|
|
102
|
+
}
|
|
103
|
+
if "body" in mapping:
|
|
104
|
+
payload["body"] = mapping.get("body")
|
|
105
|
+
return payload
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def backend_exception_response_payload(candidate: object | None) -> dict[str, object]:
|
|
109
|
+
mapping = dict_from_object(candidate)
|
|
110
|
+
payload: dict[str, object] = {
|
|
111
|
+
"status_code": coerce_int(mapping.get("status_code") or mapping.get("response_status"), 0),
|
|
112
|
+
}
|
|
113
|
+
if "headers" in mapping:
|
|
114
|
+
payload["headers"] = dict_from_object(mapping.get("headers"))
|
|
115
|
+
if "body" in mapping:
|
|
116
|
+
payload["body"] = mapping.get("body")
|
|
117
|
+
return payload
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def request_event_payload(
|
|
121
|
+
request: Mapping[str, object],
|
|
122
|
+
response: Mapping[str, object],
|
|
123
|
+
context: Mapping[str, object],
|
|
124
|
+
) -> dict[str, object]:
|
|
125
|
+
payload: dict[str, object] = {
|
|
126
|
+
"method": str(request.get("method") or "UNKNOWN"),
|
|
127
|
+
"path": str(request.get("path") or "/"),
|
|
128
|
+
"query": dict_from_object(request.get("query")),
|
|
129
|
+
"headers": dict_from_object(request.get("headers")),
|
|
130
|
+
"response_status": coerce_int(response.get("response_status") or response.get("status_code"), 0),
|
|
131
|
+
"duration_ms": coerce_int(response.get("duration_ms"), 0),
|
|
132
|
+
}
|
|
133
|
+
if "body" in request:
|
|
134
|
+
payload["body"] = request.get("body")
|
|
135
|
+
route_template = context.get("route_template") or response.get("route_template") or request.get("route_template")
|
|
136
|
+
if route_template is not None:
|
|
137
|
+
payload["route_template"] = str(route_template)
|
|
138
|
+
response_headers = response.get("response_headers") or response.get("headers")
|
|
139
|
+
if response_headers:
|
|
140
|
+
payload["response_headers"] = dict_from_object(response_headers)
|
|
141
|
+
if "response_body" in response:
|
|
142
|
+
payload["response_body"] = response.get("response_body")
|
|
143
|
+
elif "body" in response and response.get("body") is not None:
|
|
144
|
+
payload["response_body"] = response.get("body")
|
|
145
|
+
return payload
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def coerce_int(value: object, default: int) -> int:
|
|
149
|
+
if isinstance(value, bool):
|
|
150
|
+
return default
|
|
151
|
+
if isinstance(value, int):
|
|
152
|
+
return value
|
|
153
|
+
if isinstance(value, float):
|
|
154
|
+
return int(value)
|
|
155
|
+
if isinstance(value, str):
|
|
156
|
+
try:
|
|
157
|
+
return int(value)
|
|
158
|
+
except ValueError:
|
|
159
|
+
return default
|
|
160
|
+
return default
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def dict_from_object(value: object | None) -> dict[str, object]:
|
|
164
|
+
if isinstance(value, Mapping):
|
|
165
|
+
return {str(key): cast(object, nested_value) for key, nested_value in value.items()}
|
|
166
|
+
return {}
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
def correlation_payload(context: Mapping[str, object]) -> dict[str, str | None]:
|
|
170
|
+
return {
|
|
171
|
+
"request_id": _coerce_optional_string(context.get("request_id")),
|
|
172
|
+
"trace_id": _coerce_optional_string(context.get("trace_id")),
|
|
173
|
+
"session_id": _coerce_optional_string(context.get("session_id")),
|
|
174
|
+
"user_id_hash": _coerce_optional_string(context.get("user_id_hash")),
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
def event_context(context: Mapping[str, object]) -> dict[str, object]:
|
|
179
|
+
return {
|
|
180
|
+
str(key): value
|
|
181
|
+
for key, value in context.items()
|
|
182
|
+
if key not in {"request", "response", "correlation", "request_id", "trace_id", "session_id", "user_id_hash"}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def _coerce_optional_string(value: object) -> str | None:
|
|
187
|
+
if value is None:
|
|
188
|
+
return None
|
|
189
|
+
return str(value)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
def iso_now(time_provider: Callable[[], float]) -> str:
|
|
193
|
+
return datetime.fromtimestamp(time_provider(), tz=timezone.utc).isoformat().replace("+00:00", "Z")
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
def is_immediate_request_incident_status(
|
|
197
|
+
status_code: int | None,
|
|
198
|
+
preset: str,
|
|
199
|
+
immediate_client_error_statuses: tuple[int, ...],
|
|
200
|
+
request_path: str | None = None,
|
|
201
|
+
http_method: str | None = None,
|
|
202
|
+
immediate_client_error_path_rules: tuple[object, ...] = (),
|
|
203
|
+
) -> bool:
|
|
204
|
+
if status_code is None:
|
|
205
|
+
return False
|
|
206
|
+
if status_code >= 500:
|
|
207
|
+
return True
|
|
208
|
+
if status_code in immediate_client_error_statuses:
|
|
209
|
+
return True
|
|
210
|
+
if _matches_immediate_client_error_path_rule(
|
|
211
|
+
status_code,
|
|
212
|
+
request_path,
|
|
213
|
+
http_method,
|
|
214
|
+
immediate_client_error_path_rules,
|
|
215
|
+
):
|
|
216
|
+
return True
|
|
217
|
+
if preset == "investigative":
|
|
218
|
+
return status_code in INVESTIGATIVE_IMMEDIATE_REQUEST_STATUSES
|
|
219
|
+
if preset == "balanced":
|
|
220
|
+
return status_code in BALANCED_IMMEDIATE_REQUEST_STATUSES
|
|
221
|
+
return False
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
def _matches_immediate_client_error_path_rule(
|
|
225
|
+
status_code: int,
|
|
226
|
+
request_path: str | None,
|
|
227
|
+
http_method: str | None,
|
|
228
|
+
rules: tuple[object, ...],
|
|
229
|
+
) -> bool:
|
|
230
|
+
if status_code < 400 or status_code > 499 or request_path is None:
|
|
231
|
+
return False
|
|
232
|
+
normalized_path = _normalize_request_path(request_path)
|
|
233
|
+
normalized_method = http_method.upper() if isinstance(http_method, str) else None
|
|
234
|
+
for rule in rules:
|
|
235
|
+
rule_status = getattr(rule, "status_code", None)
|
|
236
|
+
path_pattern = getattr(rule, "path_pattern", None)
|
|
237
|
+
methods = getattr(rule, "methods", ())
|
|
238
|
+
if rule_status != status_code or not isinstance(path_pattern, str):
|
|
239
|
+
continue
|
|
240
|
+
if methods and (normalized_method is None or normalized_method not in methods):
|
|
241
|
+
continue
|
|
242
|
+
if path_pattern.endswith("*"):
|
|
243
|
+
if normalized_path.startswith(path_pattern[:-1]):
|
|
244
|
+
return True
|
|
245
|
+
elif normalized_path == path_pattern:
|
|
246
|
+
return True
|
|
247
|
+
return False
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
def _normalize_request_path(value: str) -> str:
|
|
251
|
+
from urllib.parse import urlparse
|
|
252
|
+
|
|
253
|
+
parsed = urlparse(value)
|
|
254
|
+
if parsed.path:
|
|
255
|
+
return parsed.path
|
|
256
|
+
return value.split("?", 1)[0].split("#", 1)[0] if value.startswith("/") else "/"
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
def time_now() -> float:
|
|
260
|
+
return datetime.now(tz=timezone.utc).timestamp()
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def sdk_version() -> str:
|
|
264
|
+
try:
|
|
265
|
+
return metadata.version("debugbundle-python")
|
|
266
|
+
except metadata.PackageNotFoundError:
|
|
267
|
+
return "1.4.0"
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
def sdk_config_endpoint(events_endpoint: str) -> str:
|
|
271
|
+
if events_endpoint.endswith("/v1/events"):
|
|
272
|
+
return f"{events_endpoint[: -len('/v1/events')]}/v1/sdk/config"
|
|
273
|
+
return f"{events_endpoint.rstrip('/')}/sdk/config"
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
def serialize_error(error: Exception) -> dict[str, object]:
|
|
277
|
+
return {
|
|
278
|
+
"name": type(error).__name__,
|
|
279
|
+
"message": str(error),
|
|
280
|
+
"stack": "".join(traceback.format_exception(type(error), error, error.__traceback__)),
|
|
281
|
+
}
|
debugbundle/transport.py
CHANGED
|
@@ -11,6 +11,7 @@ import httpx
|
|
|
11
11
|
class TransportResponse:
|
|
12
12
|
status_code: int
|
|
13
13
|
retry_after_ms: int | None = None
|
|
14
|
+
body: object | None = None
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
class Transport(Protocol):
|
|
@@ -41,7 +42,11 @@ class HttpTransport:
|
|
|
41
42
|
except ValueError:
|
|
42
43
|
retry_after_ms = None
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
try:
|
|
46
|
+
body: object | None = response.json()
|
|
47
|
+
except (ValueError, TypeError):
|
|
48
|
+
body = None
|
|
49
|
+
return TransportResponse(status_code=response.status_code, retry_after_ms=retry_after_ms, body=body)
|
|
45
50
|
|
|
46
51
|
def close(self) -> None:
|
|
47
52
|
self._client.close()
|
|
@@ -53,7 +58,8 @@ def coerce_transport_response(response: Any) -> TransportResponse:
|
|
|
53
58
|
|
|
54
59
|
status_code = getattr(response, "status_code", None)
|
|
55
60
|
retry_after_ms = getattr(response, "retry_after_ms", None)
|
|
61
|
+
body = getattr(response, "body", None)
|
|
56
62
|
if isinstance(status_code, int):
|
|
57
|
-
return TransportResponse(status_code=status_code, retry_after_ms=retry_after_ms)
|
|
63
|
+
return TransportResponse(status_code=status_code, retry_after_ms=retry_after_ms, body=body)
|
|
58
64
|
|
|
59
65
|
raise TypeError("Unsupported transport response")
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: debugbundle-python
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
4
4
|
Summary: DebugBundle SDK for Python
|
|
5
5
|
Author: DebugBundle
|
|
6
|
-
License-Expression:
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://debugbundle.com/docs/sdks/python
|
|
8
8
|
Project-URL: Repository, https://github.com/debugbundle/debugbundle-python
|
|
9
9
|
Project-URL: Issues, https://github.com/debugbundle/debugbundle-python/issues
|
|
@@ -43,7 +43,7 @@ Python SDK for DebugBundle.
|
|
|
43
43
|
|
|
44
44
|

|
|
45
45
|

|
|
46
|
-

|
|
47
47
|
|
|
48
48
|
Use this package to capture Python backend exceptions, request metadata, structured logs, runtime context, and probe data. It supports vanilla Python plus Django, Flask, FastAPI, Python logging, structlog, loguru, and browser relay helpers.
|
|
49
49
|
|
|
@@ -345,4 +345,4 @@ CI validates Ruff, mypy, pytest, package build, event schema fixtures, and cover
|
|
|
345
345
|
|
|
346
346
|
## License
|
|
347
347
|
|
|
348
|
-
|
|
348
|
+
Apache-2.0. See `LICENSE`.
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
debugbundle/__init__.py,sha256=
|
|
1
|
+
debugbundle/__init__.py,sha256=QH5RY2Cdp3Ry5PNSAhiV9akOMoS2pERRqowFnZ94roc,5131
|
|
2
|
+
debugbundle/acknowledgement.py,sha256=tyI8XLRG9N3-Weo6uiGrAlf_O4tjptVe1x1cG7RjrMc,2314
|
|
3
|
+
debugbundle/before_send.py,sha256=_tmV6ovHUBIxfQPMQ8a0C6r91IAnd4DVs8UcjsKhqX0,7792
|
|
2
4
|
debugbundle/config.py,sha256=ENRSR5jUI7xYdBqUakWws3GIjBk00GWFmwXVE_iQp2Y,9296
|
|
3
|
-
debugbundle/core.py,sha256=
|
|
5
|
+
debugbundle/core.py,sha256=ox4fNADe2kRic9aUePB_RJmT81vCQ9SFW6PaCSL-YL0,32888
|
|
6
|
+
debugbundle/event_support.py,sha256=hg_GFyj_9nesQ5oOzvW-TmHI6R2E-6WGHsBp-MhYBOQ,9046
|
|
4
7
|
debugbundle/logger_integrations.py,sha256=RuTNaD9RRVmiE-BBkksAXWVEGaMzLrWavVpQdgGZBpE,4564
|
|
5
8
|
debugbundle/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
9
|
debugbundle/redaction.py,sha256=QTaPkSsYv54yR1mz8SB6Q4vWjvp7Ddcui4WXaH2RVz8,736
|
|
7
10
|
debugbundle/relay.py,sha256=p5-tFXsgH8TZfB7Va3C2XFJsi8mYOMnGjr01W_kApME,14366
|
|
8
11
|
debugbundle/relay_delivery.py,sha256=VL-nIgJR6mYXqKy-EbA0USWeY_iS_uAr1KBzrnwBnnk,4676
|
|
9
12
|
debugbundle/suppression.py,sha256=XMn0GfF_-WZk2wHWk3KfbO5_u5QhEunues5h3jOInLs,4098
|
|
10
|
-
debugbundle/transport.py,sha256=
|
|
13
|
+
debugbundle/transport.py,sha256=V289FwFWL6KV5gyzOsesluEMbpRobm_FHu3x8BpOYKU,2014
|
|
11
14
|
debugbundle/trigger_token.py,sha256=YUwIWnnxu1klAVaB8Ltgk_PwWW_PPjq9rzmEbWXeFeM,4455
|
|
12
15
|
debugbundle/integrations/__init__.py,sha256=Jr87ImWXzUXOuFP4WlGleK14VARajSSdGZN_nHt5emw,1161
|
|
13
16
|
debugbundle/integrations/common.py,sha256=iiwf5wDlpujFuWfbO-ziFTn4MtiHBXSIZNXtamhCavg,2014
|
|
@@ -17,8 +20,8 @@ debugbundle/integrations/flask.py,sha256=cgyHbsAH96gpNPf_5IGJYzp2va28JdDgXROBsF-
|
|
|
17
20
|
debugbundle/integrations/relay_django.py,sha256=Wj8BE9D5otU2KmtjgqdKIJ-BvXVcagCKgpLYvnPZ6WE,2281
|
|
18
21
|
debugbundle/integrations/relay_fastapi.py,sha256=-Zl6bvhYMLii__mP6-UvSdwxS5VKsb9OZvk-yy-3hEw,2227
|
|
19
22
|
debugbundle/integrations/relay_flask.py,sha256=VFHkDTJy4LkZzL_Ry_Ba-e_gW6UTG4PBwnLcvB_oXuQ,2011
|
|
20
|
-
debugbundle_python-1.
|
|
21
|
-
debugbundle_python-1.
|
|
22
|
-
debugbundle_python-1.
|
|
23
|
-
debugbundle_python-1.
|
|
24
|
-
debugbundle_python-1.
|
|
23
|
+
debugbundle_python-1.4.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
24
|
+
debugbundle_python-1.4.0.dist-info/METADATA,sha256=aFboU5dUpifzAC0Hl3boTfOanvIenWq6IBN9n0Zuavw,13831
|
|
25
|
+
debugbundle_python-1.4.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
26
|
+
debugbundle_python-1.4.0.dist-info/top_level.txt,sha256=RCB9STTFnl1OKdojxz-xhaks2zkRFs1meZXsKnm18LM,12
|
|
27
|
+
debugbundle_python-1.4.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
GNU AFFERO GENERAL PUBLIC LICENSE
|
|
2
|
-
Version 3, 19 November 2007
|
|
3
|
-
|
|
4
|
-
Copyright (C) 2024-present DebugBundle
|
|
5
|
-
|
|
6
|
-
This program is free software: you can redistribute it and/or modify
|
|
7
|
-
it under the terms of the GNU Affero General Public License as
|
|
8
|
-
published by the Free Software Foundation, either version 3 of the
|
|
9
|
-
License, or (at your option) any later version.
|
|
10
|
-
|
|
11
|
-
This program is distributed in the hope that it will be useful,
|
|
12
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
GNU Affero General Public License for more details.
|
|
15
|
-
|
|
16
|
-
You should have received a copy of the GNU Affero General Public License
|
|
17
|
-
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
File without changes
|