From 6d6f734e35f2321d8661ef370b246fb302e6bb47 Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Thu, 2 Oct 2025 19:35:19 +0000 Subject: [PATCH 01/21] First commit --- ddtrace/internal/core/crashtracking.py | 68 +++ ddtrace/internal/native/_native.pyi | 68 +++ experimental_debug_string_dump.json | 99 ++++ src/native/Cargo.lock | 463 ++++++++++++++++++ src/native/Cargo.toml | 2 + src/native/build.rs | 65 +++ src/native/cpython_internal.c | 17 + src/native/cpython_internal.h | 26 + src/native/crashtracker.rs | 449 ++++++++++++++++- src/native/lib.rs | 14 + src/native/library_config.rs | 5 + .../crashtracker/test_crashtracker.py | 85 ++++ 12 files changed, 1359 insertions(+), 2 deletions(-) create mode 100644 experimental_debug_string_dump.json create mode 100644 src/native/cpython_internal.c create mode 100644 src/native/cpython_internal.h diff --git a/ddtrace/internal/core/crashtracking.py b/ddtrace/internal/core/crashtracking.py index 8b3a041f00d..74736f89137 100644 --- a/ddtrace/internal/core/crashtracking.py +++ b/ddtrace/internal/core/crashtracking.py @@ -27,6 +27,10 @@ from ddtrace.internal.native._native import crashtracker_init from ddtrace.internal.native._native import crashtracker_on_fork from ddtrace.internal.native._native import crashtracker_status + from ddtrace.internal.native._native import crashtracker_register_native_runtime_callback + from ddtrace.internal.native._native import crashtracker_is_runtime_callback_registered + from ddtrace.internal.native._native import crashtracker_get_registered_runtime_type + from ddtrace.internal.native._native import CallbackResult except ImportError: is_available = False @@ -155,6 +159,16 @@ def start(additional_tags: Optional[Dict[str, str]] = None) -> bool: crashtracker_init(config, receiver_config, metadata) + if ( + crashtracker_config.stacktrace_resolver is not None and + crashtracker_config.stacktrace_resolver != "none" + ): + result = crashtracker_register_native_runtime_callback() + # Shouldn't block on this, but log an error if it fails + if result != CallbackResult.Ok: + print(f"Failed to register runtime callback: {result}", file=sys.stderr) + return False + def crashtracker_fork_handler(): # We recreate the args here mainly to pass updated runtime_id after # fork @@ -172,3 +186,57 @@ def crashtracker_fork_handler(): print(f"Failed to start crashtracker: {e}", file=sys.stderr) return False return True + + +def register_runtime_callback() -> bool: + """ + Register the native runtime callback for stack collection during crashes. + + This should be called after crashtracker initialization to enable Python + runtime stack trace collection in crash reports. The callback provides + frame-by-frame Python stack traces with proper context information. + + Returns: + bool: True if callback was registered successfully, False otherwise + """ + if not is_available: + return False + + try: + result = crashtracker_register_native_runtime_callback() + return result == CallbackResult.Ok + except Exception as e: + print(f"Failed to register runtime callback: {e}", file=sys.stderr) + return False + + +def is_runtime_callback_registered() -> bool: + """ + Check if a runtime callback is currently registered. + + Returns: + bool: True if a callback is registered, False otherwise + """ + if not is_available: + return False + + try: + return crashtracker_is_runtime_callback_registered() + except Exception: + return False + + +def get_registered_runtime_type() -> Optional[str]: + """ + Get the runtime type of the currently registered callback. + + Returns: + Optional[str]: The runtime type ("python") if registered, None otherwise + """ + if not is_available: + return None + + try: + return crashtracker_get_registered_runtime_type() + except Exception: + return None diff --git a/ddtrace/internal/native/_native.pyi b/ddtrace/internal/native/_native.pyi index c515aec12f7..0a7482fb3f0 100644 --- a/ddtrace/internal/native/_native.pyi +++ b/ddtrace/internal/native/_native.pyi @@ -5,6 +5,7 @@ from typing import List from typing import Literal from typing import Optional + class DDSketch: def __init__(self): ... def add(self, value: float) -> None: ... @@ -12,6 +13,7 @@ class DDSketch: @property def count(self) -> float: ... + class PyConfigurator: """ PyConfigurator is a class responsible for configuring the Python environment @@ -25,18 +27,21 @@ class PyConfigurator: :param debug_logs: A boolean indicating whether debug logs should be enabled. """ ... + def set_local_file_override(self, file: str) -> None: """ Overrides the local file path for the configuration. Should not be used outside of tests. :param file: The path to the local file to override. """ ... + def set_managed_file_override(self, file: str) -> None: """ Overrides the managed file path for the configuration. Should not be used outside of tests. :param file: The path to the managed file to override. """ ... + def get_configuration(self) -> List[Dict[str, str]]: """ Retrieve the on-disk configuration. @@ -44,6 +49,7 @@ class PyConfigurator: [{"source": ..., "key": ..., "value": ..., "config_id": ...}] """ ... + @property def local_stable_config_type(self) -> str: """ @@ -51,6 +57,7 @@ class PyConfigurator: :return: A string representing the local stable configuration type. """ ... + @property def fleet_stable_config_type(self) -> str: """ @@ -59,12 +66,14 @@ class PyConfigurator: """ ... + class StacktraceCollection: Disabled: "StacktraceCollection" WithoutSymbols: "StacktraceCollection" EnabledWithInprocessSymbols: "StacktraceCollection" EnabledWithSymbolsInReceiver: "StacktraceCollection" + class CrashtrackerConfiguration: def __init__( self, @@ -77,6 +86,7 @@ class CrashtrackerConfiguration: unix_socket_path: Optional[str], ): ... + class CrashtrackerReceiverConfig: def __init__( self, @@ -87,22 +97,37 @@ class CrashtrackerReceiverConfig: stdout_filename: Optional[str], ): ... + class CrashtrackerMetadata: def __init__(self, library_name: str, library_version: str, family: str, tags: Dict[str, str]): ... + class CrashtrackerStatus: NotInitialized: "CrashtrackerStatus" Initialized: "CrashtrackerStatus" FailedToInitialize: "CrashtrackerStatus" + +class CallbackResult: + Ok: "CallbackResult" + NullCallback: "CallbackResult" + UnknownError: "CallbackResult" + + def crashtracker_init( config: CrashtrackerConfiguration, receiver_config: CrashtrackerReceiverConfig, metadata: CrashtrackerMetadata ) -> None: ... + + def crashtracker_on_fork( config: CrashtrackerConfiguration, receiver_config: CrashtrackerReceiverConfig, metadata: CrashtrackerMetadata ) -> None: ... def crashtracker_status() -> CrashtrackerStatus: ... def crashtracker_receiver() -> None: ... +def crashtracker_register_native_runtime_callback() -> CallbackResult: ... +def crashtracker_is_runtime_callback_registered() -> bool: ... +def crashtracker_get_registered_runtime_type() -> Optional[str]: ... + class PyTracerMetadata: """ @@ -134,6 +159,7 @@ class PyTracerMetadata: """ ... + class PyAnonymousFileHandle: """ Represents an anonymous file handle. @@ -142,6 +168,7 @@ class PyAnonymousFileHandle: def __init__(self): ... + def store_metadata(data: PyTracerMetadata) -> PyAnonymousFileHandle: """ Create an anonymous file storing the tracer configuration. @@ -149,6 +176,7 @@ def store_metadata(data: PyTracerMetadata) -> PyAnonymousFileHandle: """ ... + class TraceExporter: """ TraceExporter is a class responsible for exporting traces to the Agent. @@ -159,6 +187,7 @@ class TraceExporter: Initialize a TraceExporter. """ ... + def send(self, data: bytes, trace_count: int) -> str: """ Send a trace payload to the Agent. @@ -166,6 +195,7 @@ class TraceExporter: :param trace_count: The number of traces in the data payload. """ ... + def shutdown(self, timeout_ns: int) -> None: """ Shutdown the TraceExporter, releasing any resources and ensuring all pending stats are sent. @@ -173,11 +203,13 @@ class TraceExporter: :param timeout_ns: The maximum time to wait for shutdown in nanoseconds. """ ... + def drop(self) -> None: """ Drop the TraceExporter, releasing any resources without sending pending stats. """ ... + def run_worker(self) -> None: """ Start the rust worker threads. @@ -186,6 +218,7 @@ class TraceExporter: this method can be used to start the runtime before sending any traces. """ ... + def stop_worker(self) -> None: """ Stop the rust worker threads. @@ -194,6 +227,7 @@ class TraceExporter: when calling `send`. """ ... + def debug(self) -> str: """ Returns a string representation of the exporter. @@ -201,6 +235,7 @@ class TraceExporter: """ ... + class TraceExporterBuilder: """ TraceExporterBuilder is a class responsible for building a TraceExporter. @@ -211,84 +246,98 @@ class TraceExporterBuilder: Initialize a TraceExporterBuilder. """ ... + def set_hostname(self, hostname: str) -> TraceExporterBuilder: """ Set the hostname of the TraceExporter. :param hostname: The hostname to set for the TraceExporter. """ ... + def set_url(self, url: str) -> TraceExporterBuilder: """ Set the agent url of the TraceExporter. :param url: The URL of the agent to send traces to. """ ... + def set_dogstatsd_url(self, url: str) -> TraceExporterBuilder: """ Set the DogStatsD URL of the TraceExporter. :param url: The URL of the DogStatsD endpoint. """ ... + def set_env(self, env: str) -> TraceExporterBuilder: """ Set the env of the TraceExporter. :param env: The environment name (e.g., 'prod', 'staging', 'dev'). """ ... + def set_app_version(self, version: str) -> TraceExporterBuilder: """ Set the app version of the TraceExporter. :param version: The version string of the application. """ ... + def set_service(self, service: str) -> TraceExporterBuilder: """ Set the service name of the TraceExporter. :param version: The version string of the application. """ ... + def set_git_commit_sha(self, git_commit_sha: str) -> TraceExporterBuilder: """ Set the git commit sha of the TraceExporter. :param git_commit_sha: The git commit SHA of the current code version. """ ... + def set_tracer_version(self, version: str) -> TraceExporterBuilder: """ Set the tracer version of the TraceExporter. :param version: The version string of the tracer. """ ... + def set_language(self, language: str) -> TraceExporterBuilder: """ Set the language of the TraceExporter. :param language: The programming language being traced (e.g., 'python'). """ ... + def set_language_version(self, version: str) -> TraceExporterBuilder: """ Set the language version of the TraceExporter. :param version: The version string of the programming language. """ ... + def set_language_interpreter(self, interpreter: str) -> TraceExporterBuilder: """ Set the language interpreter of the TraceExporter. :param vendor: The language interpreter. """ ... + def set_language_interpreter_vendor(self, vendor: str) -> TraceExporterBuilder: """ Set the language interpreter vendor of the TraceExporter. :param vendor: The vendor of the language interpreter. """ ... + def set_test_session_token(self, token: str) -> TraceExporterBuilder: """ Set the test session token for the TraceExporter. :param token: The test session token to use for authentication. """ ... + def set_input_format(self, input_format: str) -> TraceExporterBuilder: """ Set the input format for the trace data. @@ -296,6 +345,7 @@ class TraceExporterBuilder: :raises ValueError: If input_format is not a supported value. """ ... + def set_output_format(self, output_format: str) -> TraceExporterBuilder: """ Set the output format for the trace data. @@ -303,11 +353,13 @@ class TraceExporterBuilder: :raises ValueError: If output_format is not a supported value. """ ... + def set_client_computed_top_level(self) -> TraceExporterBuilder: """ Set the header indicating the tracer has computed the top-level tag """ ... + def set_client_computed_stats(self) -> TraceExporterBuilder: """ Set the header indicating the tracer has already computed stats. @@ -315,12 +367,14 @@ class TraceExporterBuilder: The main use is to opt-out trace metrics. """ ... + def enable_stats(self, bucket_size_ns: int) -> TraceExporterBuilder: """ Enable stats computation in the TraceExporter :param bucket_size_ns: The size of stats bucket in nanoseconds. """ ... + def enable_telemetry( self, heartbeat_ms: int, @@ -332,11 +386,13 @@ class TraceExporterBuilder: :param runtime_id: The runtime id to use for telemetry. """ ... + def enable_health_metrics(self) -> TraceExporterBuilder: """ Enable health metrics in the TraceExporter """ ... + def build(self) -> TraceExporter: """ Build and return a TraceExporter instance with the configured settings. @@ -345,6 +401,7 @@ class TraceExporterBuilder: :raises ValueError: If the builder has already been consumed or if required settings are missing. """ ... + def debug(self) -> str: """ Returns a string representation of the exporter. @@ -352,6 +409,7 @@ class TraceExporterBuilder: """ ... + class AgentError(Exception): """ Raised when there is an error in agent response processing. @@ -359,6 +417,7 @@ class AgentError(Exception): ... + class BuilderError(Exception): """ Raised when there is an error in the TraceExporterBuilder configuration. @@ -366,6 +425,7 @@ class BuilderError(Exception): ... + class logger: """ Native logging module for configuring and managing log output. @@ -388,6 +448,7 @@ class logger: :raises ValueError: If configuration is invalid """ ... + @staticmethod def disable(output: str) -> None: """ @@ -397,6 +458,7 @@ class logger: :raises ValueError: If output type is invalid """ ... + @staticmethod def set_log_level(level: str) -> None: """ @@ -406,6 +468,7 @@ class logger: :raises ValueError: If log level is invalid """ ... + @staticmethod def log(level: str, message: str) -> None: """ @@ -417,6 +480,7 @@ class logger: """ ... + class DeserializationError(Exception): """ Raised when there is an error deserializing trace payload. @@ -424,6 +488,7 @@ class DeserializationError(Exception): ... + class IoError(Exception): """ Raised when there is an I/O error during trace processing. @@ -431,6 +496,7 @@ class IoError(Exception): ... + class NetworkError(Exception): """ Raised when there is a network-related error during trace processing. @@ -438,6 +504,7 @@ class NetworkError(Exception): ... + class RequestError(Exception): """ Raised when the agent responds with an error code. @@ -445,6 +512,7 @@ class RequestError(Exception): ... + class SerializationError(Exception): """ Raised when there is an error serializing trace payload. diff --git a/experimental_debug_string_dump.json b/experimental_debug_string_dump.json new file mode 100644 index 00000000000..44672b77ed9 --- /dev/null +++ b/experimental_debug_string_dump.json @@ -0,0 +1,99 @@ +{ + "ucontext": "ucontext_t { uc_flags: 7, uc_link: 0x0, uc_stack: stack_t { ss_sp: 0x7ddb1725f000, ss_flags: 0, ss_size: 65536 }, uc_mcontext: mcontext_t { gregs: [0, 138379988587066, 0, 138379983017408, 140722902316384, 140722902316592, 1, 0, 0, -1, 0, 4294967295, 138379983072392, 0, 140722902315688, 140722902315896, 138379988396504, 66179, 12103423998558259, 4, 14, 0, 0], fpregs: 0x7ddb1726e540, __private: [0, 0, 0, 0, 0, 0, 0, 0] }, uc_sigmask: sigset_t { __val: [0, 11, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, __private: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 31, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 116, 0, 111, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 114, 0, 0, 0, 0, 0, 99, 0, 111, 0, 0, 0, 0, 0, 105, 0, 101, 0, 111, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, 0, 0, 99, 0, 0, 0, 104, 0, 0, 0, 32, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 111, 0, 0, 0, 114, 0, 0, 0, 32, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 128, 199, 48, 49, 93, 136, 85, 59, 0, 0, 0, 0, 0, 0, 0, 0, 100, 171, 99, 130, 7, 91, 229, 191, 0, 0, 0, 0, 0, 0, 0, 0, 27, 99, 108, 213, 49, 161, 233, 63, 0, 0, 0, 0, 0, 0, 0, 0, 233, 69, 72, 155, 91, 73, 242, 191, 0, 0, 0, 0, 0, 0, 0, 0, 172, 97, 177, 109, 47, 108, 160, 14, 19, 139, 36, 194, 243, 96, 185, 66, 211, 106, 112, 16, 104, 240, 36, 189, 108, 200, 104, 46, 183, 120, 207, 58, 106, 68, 94, 185, 35, 105, 109, 163, 203, 186, 163, 246, 160, 116, 227, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 88, 80, 70, 140, 10, 0, 0, 255, 2, 0, 0, 0, 0, 0, 0, 136, 10, 0, 0, 0, 0, 0, 0] }", + "runtime_stack": { + "format": "Datadog Runtime Callback 1.0", + "frames": [ + { + "function": "string_at", + "file": "/home/bits/.pyenv/versions/3.11.13/lib/python3.11/ctypes/__init__.py", + "line": 519 + }, + { + "function": "func16", + "file": "tests/internal/crashtracker/test_crashtracker.py", + "line": 724 + }, + { + "function": "func15", + "file": "tests/internal/crashtracker/test_crashtracker.py", + "line": 721 + }, + { + "function": "func14", + "file": "tests/internal/crashtracker/test_crashtracker.py", + "line": 718 + }, + { + "function": "func13", + "file": "tests/internal/crashtracker/test_crashtracker.py", + "line": 715 + }, + { + "function": "func12", + "file": "tests/internal/crashtracker/test_crashtracker.py", + "line": 712 + }, + { + "function": "func11", + "file": "tests/internal/crashtracker/test_crashtracker.py", + "line": 709 + }, + { + "function": "func10", + "file": "tests/internal/crashtracker/test_crashtracker.py", + "line": 706 + }, + { + "function": "func9", + "file": "tests/internal/crashtracker/test_crashtracker.py", + "line": 703 + }, + { + "function": "func8", + "file": "tests/internal/crashtracker/test_crashtracker.py", + "line": 700 + }, + { + "function": "func7", + "file": "tests/internal/crashtracker/test_crashtracker.py", + "line": 697 + }, + { + "function": "func6", + "file": "tests/internal/crashtracker/test_crashtracker.py", + "line": 694 + }, + { + "function": "func5", + "file": "tests/internal/crashtracker/test_crashtracker.py", + "line": 691 + }, + { + "function": "func4", + "file": "tests/internal/crashtracker/test_crashtracker.py", + "line": 688 + }, + { + "function": "func3", + "file": "tests/internal/crashtracker/test_crashtracker.py", + "line": 685 + }, + { + "function": "func2", + "file": "tests/internal/crashtracker/test_crashtracker.py", + "line": 682 + }, + { + "function": "func1", + "file": "tests/internal/crashtracker/test_crashtracker.py", + "line": 679 + }, + { + "function": "", + "file": "tests/internal/crashtracker/test_crashtracker.py", + "line": 734 + } + ], + "runtime_type": "python" + } +} \ No newline at end of file diff --git a/src/native/Cargo.lock b/src/native/Cargo.lock index 08b2d6a9617..bd28d18dc69 100644 --- a/src/native/Cargo.lock +++ b/src/native/Cargo.lock @@ -216,8 +216,18 @@ dependencies = [ [[package]] name = "build_common" +<<<<<<< HEAD version = "24.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v24.0.0#3445414c9ba4fefc76be46cf7e2f998986592892" +======= +<<<<<<< HEAD +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +version = "21.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> 37544fcdb0 (First commit) dependencies = [ "cbindgen", "serde", @@ -272,9 +282,15 @@ dependencies = [ [[package]] name = "cc" +<<<<<<< HEAD version = "1.2.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac9fe6cdbb24b6ade63616c0a0688e45bb56732262c158df3c0c4bea4ca47cb7" +======= +version = "1.2.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1354349954c6fc9cb0deab020f27f783cf0b604e8bb754dc4658ecf0d29c35f" +>>>>>>> c21cdc9e2 (First commit) dependencies = [ "find-msvc-tools", "jobserver", @@ -283,6 +299,18 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD +======= +name = "cc_utils" +version = "0.1.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +dependencies = [ + "anyhow", + "cc", +] + +[[package]] +>>>>>>> c21cdc9e2 (First commit) name = "cexpr" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -475,6 +503,7 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD name = "darling" version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -530,12 +559,386 @@ dependencies = [ ] [[package]] +======= +<<<<<<< HEAD +======= +name = "data-pipeline" +<<<<<<< HEAD +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +version = "21.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +dependencies = [ + "anyhow", + "arc-swap", + "bytes", + "datadog-ddsketch", + "datadog-trace-protobuf", + "datadog-trace-stats", + "datadog-trace-utils", + "ddcommon", + "ddtelemetry", + "dogstatsd-client", + "either", + "http", + "http-body-util", + "hyper", + "hyper-util", + "rmp-serde", + "serde", + "serde_json", + "sha2", + "tinybytes", + "tokio", + "tokio-util", + "tracing", + "uuid", +] + +[[package]] +name = "datadog-alloc" +<<<<<<< HEAD +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +version = "21.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +dependencies = [ + "allocator-api2", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "datadog-crashtracker" +<<<<<<< HEAD +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +version = "21.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +dependencies = [ + "anyhow", + "backtrace", + "blazesym", + "cc", + "chrono", + "ddcommon", + "ddtelemetry", + "http", + "libc", + "nix", + "num-derive", + "num-traits", + "os_info", + "page_size", + "portable-atomic", + "rand", + "schemars", + "serde", + "serde_json", + "symbolic-common", + "symbolic-demangle", + "thiserror", + "tokio", + "uuid", + "windows 0.59.0", +] + +[[package]] +name = "datadog-ddsketch" +<<<<<<< HEAD +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +version = "21.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +dependencies = [ + "prost", +] + +[[package]] +name = "datadog-library-config" +version = "0.0.2" +<<<<<<< HEAD +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +dependencies = [ + "anyhow", + "memfd", + "rand", + "rmp", + "rmp-serde", + "serde", + "serde_yaml", +] + +[[package]] +name = "datadog-log" +<<<<<<< HEAD +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +version = "21.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +dependencies = [ + "chrono", + "tracing", + "tracing-appender", + "tracing-subscriber", +] + +[[package]] +name = "datadog-profiling" +<<<<<<< HEAD +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +version = "21.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +dependencies = [ + "anyhow", + "bitmaps", + "byteorder", + "bytes", + "chrono", + "datadog-alloc", + "datadog-profiling-protobuf", + "ddcommon", + "futures", + "http", + "http-body-util", + "hyper", + "hyper-multipart-rfc7578", + "indexmap", + "mime", + "prost", + "rustc-hash 1.1.0", + "serde", + "serde_json", + "target-triple", + "tokio", + "tokio-util", + "zstd", +] + +[[package]] +name = "datadog-profiling-ffi" +<<<<<<< HEAD +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +version = "21.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +dependencies = [ + "anyhow", + "build_common", + "datadog-profiling", + "ddcommon", + "ddcommon-ffi", + "function_name", + "futures", + "http-body-util", + "hyper", + "libc", + "serde_json", + "tokio-util", +] + +[[package]] +name = "datadog-profiling-protobuf" +<<<<<<< HEAD +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +version = "21.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +dependencies = [ + "prost", +] + +[[package]] +name = "datadog-trace-normalization" +<<<<<<< HEAD +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +version = "21.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +dependencies = [ + "anyhow", + "datadog-trace-protobuf", +] + +[[package]] +name = "datadog-trace-protobuf" +<<<<<<< HEAD +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +version = "21.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +dependencies = [ + "prost", + "serde", + "serde_bytes", +] + +[[package]] +name = "datadog-trace-stats" +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +dependencies = [ + "datadog-ddsketch", + "datadog-trace-protobuf", + "datadog-trace-utils", + "hashbrown 0.15.5", +] + +[[package]] +name = "datadog-trace-utils" +<<<<<<< HEAD +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +version = "21.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +dependencies = [ + "anyhow", + "bytes", + "datadog-trace-normalization", + "datadog-trace-protobuf", + "ddcommon", + "futures", + "http-body-util", + "hyper", + "prost", + "rand", + "rmp", + "rmp-serde", + "rmpv", + "serde", + "serde_json", + "tinybytes", + "tokio", + "tracing", +] + +[[package]] +name = "ddcommon" +<<<<<<< HEAD +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +version = "21.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +dependencies = [ + "anyhow", + "cc", + "const_format", + "futures", + "futures-core", + "futures-util", + "hex", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "libc", + "nix", + "pin-project", + "regex", + "rustls", + "rustls-native-certs", + "serde", + "static_assertions", + "thiserror", + "tokio", + "tokio-rustls", + "tower-service", + "windows-sys 0.52.0", +] + +[[package]] +name = "ddcommon-ffi" +<<<<<<< HEAD +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +version = "21.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +dependencies = [ + "anyhow", + "build_common", + "chrono", + "crossbeam-queue", + "ddcommon", + "hyper", + "serde", +] + +[[package]] +name = "ddtelemetry" +<<<<<<< HEAD +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +version = "21.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +dependencies = [ + "anyhow", + "base64", + "datadog-ddsketch", + "ddcommon", + "futures", + "hashbrown 0.15.5", + "http", + "http-body-util", + "hyper", + "hyper-util", + "libc", + "serde", + "serde_json", + "sys-info", + "tokio", + "tokio-util", + "tracing", + "uuid", + "winver", +] + +[[package]] +>>>>>>> 37544fcdb0 (First commit) +>>>>>>> 5dbc278ef2 (First commit) name = "ddtrace-native" version = "0.1.0" dependencies = [ "anyhow", "build_common", +<<<<<<< HEAD "datadog-ffe", +======= +<<<<<<< HEAD +>>>>>>> 5dbc278ef2 (First commit) "libdd-common", "libdd-crashtracker", "libdd-data-pipeline", @@ -543,8 +946,19 @@ dependencies = [ "libdd-library-config", "libdd-log", "libdd-profiling-ffi", +======= + "cc", + "data-pipeline", + "datadog-crashtracker", + "datadog-ddsketch", + "datadog-library-config", + "datadog-log", + "datadog-profiling-ffi", + "ddcommon", +>>>>>>> 37544fcdb0 (First commit) "pyo3", "pyo3-build-config", + "pyo3-ffi", "tracing", ] @@ -597,6 +1011,7 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD name = "displaydoc" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -608,6 +1023,29 @@ dependencies = [ ] [[package]] +======= +<<<<<<< HEAD +======= +name = "dogstatsd-client" +<<<<<<< HEAD +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +version = "21.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +dependencies = [ + "anyhow", + "cadence", + "ddcommon", + "http", + "serde", + "tracing", +] + +[[package]] +>>>>>>> 37544fcdb0 (First commit) +>>>>>>> 5dbc278ef2 (First commit) name = "dunce" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -677,9 +1115,15 @@ dependencies = [ [[package]] name = "find-msvc-tools" +<<<<<<< HEAD version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" +======= +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959" +>>>>>>> c21cdc9e2 (First commit) [[package]] name = "fnv" @@ -2707,6 +3151,7 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD name = "tinystr" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2717,6 +3162,24 @@ dependencies = [ ] [[package]] +======= +<<<<<<< HEAD +======= +name = "tinybytes" +<<<<<<< HEAD +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" +======= +version = "21.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +dependencies = [ + "serde", +] + +[[package]] +>>>>>>> 37544fcdb0 (First commit) +>>>>>>> 5dbc278ef2 (First commit) name = "tokio" version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/src/native/Cargo.toml b/src/native/Cargo.toml index 42e1b21ffb2..efeb822aac4 100644 --- a/src/native/Cargo.toml +++ b/src/native/Cargo.toml @@ -28,6 +28,8 @@ libdd-profiling-ffi = { git = "https://github.com/DataDog/libdatadog", rev = "v2 libdd-common = { git = "https://github.com/DataDog/libdatadog", rev = "v24.0.0" } pyo3 = { version = "0.25", features = ["extension-module", "anyhow"] } tracing = { version = "0.1", default-features = false } +pyo3-ffi = "0.25" +cc = "1.2.39" [build-dependencies] pyo3-build-config = "0.25" diff --git a/src/native/build.rs b/src/native/build.rs index 91f43089a84..58da2d5f483 100644 --- a/src/native/build.rs +++ b/src/native/build.rs @@ -5,4 +5,69 @@ fn main() { if cfg!(target_os = "macos") { pyo3_build_config::add_extension_module_link_args(); } + + // Compile the C wrapper for CPython internal APIs + // This file defines Py_BUILD_CORE and provides access to internal functions + + // Get Python include directory using the cross-compilation info + let include_dir = match std::env::var("PYO3_CROSS_INCLUDE_DIR") { + Ok(dir) => std::path::PathBuf::from(dir), + Err(_) => { + // Fallback to using Python's sysconfig + let output = std::process::Command::new("python") + .args([ + "-c", + "import sysconfig; print(sysconfig.get_path('include'))", + ]) + .output() + .expect("Failed to run python to get include directory"); + std::path::PathBuf::from(String::from_utf8(output.stdout).unwrap().trim()) + } + }; + + // Add internal headers path for CPython internal APIs + let internal_headers_dir = include_dir.join("internal"); + + cc::Build::new() + .file("cpython_internal.c") + .include(&include_dir) + .include(&internal_headers_dir) // Add internal headers directory + .define("Py_BUILD_CORE", "1") + .compile("cpython_internal"); + + // Tell rustc to link the compiled C library + println!("cargo:rustc-link-lib=static=cpython_internal"); + + // Force linking to libpython to access internal symbols + // PyO3 normally avoids linking to libpython on Unix, but we need it for internal APIs + if !cfg!(target_os = "macos") { + // Get Python version and library info + let output = std::process::Command::new("python3") + .args(["-c", "import sysconfig; version = sysconfig.get_config_var('VERSION'); ldlibrary = sysconfig.get_config_var('LDLIBRARY'); libdir = sysconfig.get_config_var('LIBDIR'); print(f'{version}:{ldlibrary}:{libdir}')"]) + .output() + .expect("Failed to get Python library info"); + + let version_info = String::from_utf8(output.stdout).unwrap(); + let parts: Vec<&str> = version_info.trim().split(':').collect(); + + if parts.len() == 3 { + let version = parts[0]; + let ldlibrary = parts[1]; + let libdir = parts[2]; + + // Add library directory to search path + println!("cargo:rustc-link-search=native={}", libdir); + + // Extract library name from LDLIBRARY (e.g., "libpython3.11.so" -> "python3.11") + if let Some(lib_name) = ldlibrary + .strip_prefix("lib") + .and_then(|s| s.strip_suffix(".so")) + { + println!("cargo:rustc-link-lib={}", lib_name); + } else { + // Fallback to version-based naming + println!("cargo:rustc-link-lib=python{}", version); + } + } + } } diff --git a/src/native/cpython_internal.c b/src/native/cpython_internal.c new file mode 100644 index 00000000000..f1dd0929adb --- /dev/null +++ b/src/native/cpython_internal.c @@ -0,0 +1,17 @@ +// CPython internal API wrapper +// This file defines Py_BUILD_CORE to access internal CPython functions +// and provides a safe C interface for Rust FFI + +#define Py_BUILD_CORE 1 +#include +#include + +const char *crashtracker_dump_traceback_threads(int fd, + PyInterpreterState *interp, + PyThreadState *current_tstate) { + return _Py_DumpTracebackThreads(fd, interp, current_tstate); +} + +PyThreadState *crashtracker_get_current_tstate(void) { + return PyGILState_GetThisThreadState(); +} diff --git a/src/native/cpython_internal.h b/src/native/cpython_internal.h new file mode 100644 index 00000000000..7953fc748bd --- /dev/null +++ b/src/native/cpython_internal.h @@ -0,0 +1,26 @@ +// CPython internal API wrapper header +// This provides C function declarations for accessing CPython internal APIs + +#ifndef CPYTHON_INTERNAL_H +#define CPYTHON_INTERNAL_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +// Wrapper function to call _Py_DumpTracebackThreads +// Returns error message on failure, NULL on success +const char *crashtracker_dump_traceback_threads(int fd, + PyInterpreterState *interp, + PyThreadState *current_tstate); + +// Wrapper to get the current thread state safely during crashes +PyThreadState *crashtracker_get_current_tstate(void); + +#ifdef __cplusplus +} +#endif + +#endif // CPYTHON_INTERNAL_H diff --git a/src/native/crashtracker.rs b/src/native/crashtracker.rs index 25e44823c50..7c6ae1bbf75 100644 --- a/src/native/crashtracker.rs +++ b/src/native/crashtracker.rs @@ -1,15 +1,38 @@ use anyhow; use std::collections::HashMap; +use std::ffi::{c_char, c_int, c_void}; +use std::ptr; use std::sync::atomic::{AtomicU8, Ordering}; use std::sync::Once; use std::time::Duration; use libdd_common::Endpoint; use libdd_crashtracker::{ - CrashtrackerConfiguration, CrashtrackerReceiverConfig, Metadata, StacktraceCollection, + get_registered_runtime_type_ptr, is_runtime_callback_registered, + register_runtime_stack_callback, CallbackError, CallbackType, CrashtrackerConfiguration, + CrashtrackerReceiverConfig, Metadata, RuntimeStackFrame, RuntimeType, StacktraceCollection, }; use pyo3::prelude::*; +extern "C" { + fn crashtracker_dump_traceback_threads( + fd: c_int, + interp: *mut pyo3_ffi::PyInterpreterState, + current_tstate: *mut pyo3_ffi::PyThreadState, + ) -> *const c_char; + + fn crashtracker_get_current_tstate() -> *mut pyo3_ffi::PyThreadState; + + fn pipe(pipefd: *mut [c_int; 2]) -> c_int; + fn read(fd: c_int, buf: *mut c_void, count: usize) -> isize; + fn close(fd: c_int) -> c_int; + fn fcntl(fd: c_int, cmd: c_int, arg: c_int) -> c_int; +} + +// Constants for fcntl +const F_SETFL: c_int = 4; +const O_NONBLOCK: c_int = 0o4000; + pub trait RustWrapper { type Inner; const INNER_TYPE_NAME: &'static str; @@ -178,7 +201,7 @@ impl CrashtrackerMetadataPy { } impl RustWrapper for CrashtrackerMetadataPy { - type Inner = Metadata; + type Inner = datadog_crashtracker::Metadata; const INNER_TYPE_NAME: &'static str = "Metadata"; fn take_inner(&mut self) -> Option { @@ -288,3 +311,425 @@ pub fn crashtracker_status() -> anyhow::Result { pub fn crashtracker_receiver() -> anyhow::Result<()> { libdd_crashtracker::receiver_entry_point_stdin() } + +/// Result type for runtime callback operations +#[pyclass( + eq, + eq_int, + name = "CallbackResult", + module = "datadog.internal._native" +)] +#[derive(Debug, PartialEq, Eq)] +pub enum CallbackResult { + Ok, + NullCallback, + UnknownError, +} + +impl From for CallbackResult { + fn from(error: CallbackError) -> Self { + match error { + CallbackError::NullCallback => CallbackResult::NullCallback, + } + } +} + +/// Runtime-specific stack frame representation for FFI +/// +/// This struct is used to pass runtime stack frame information from language +/// runtimes to the crashtracker during crash handling. +#[pyclass(name = "RuntimeStackFrame", module = "datadog.internal._native")] +#[derive(Debug, Clone)] +pub struct RuntimeStackFramePy { + pub function_name: Option, + pub file_name: Option, + pub line_number: u32, + pub column_number: u32, + pub class_name: Option, + pub module_name: Option, +} + +#[pymethods] +impl RuntimeStackFramePy { + #[new] + fn new( + function_name: Option, + file_name: Option, + line_number: u32, + column_number: u32, + class_name: Option, + module_name: Option, + ) -> Self { + Self { + function_name, + file_name, + line_number, + column_number, + class_name, + module_name, + } + } + + #[getter] + fn get_function_name(&self) -> Option { + self.function_name.clone() + } + + #[getter] + fn get_file_name(&self) -> Option { + self.file_name.clone() + } + + #[getter] + fn get_line_number(&self) -> u32 { + self.line_number + } + + #[getter] + fn get_column_number(&self) -> u32 { + self.column_number + } + + #[getter] + fn get_class_name(&self) -> Option { + self.class_name.clone() + } + + #[getter] + fn get_module_name(&self) -> Option { + self.module_name.clone() + } +} + +// Constants for signal-safe operation +const MAX_FRAMES: usize = 64; +const MAX_STRING_LEN: usize = 256; +const MAX_TRACEBACK_SIZE: usize = 64 * 1024; // 64KB buffer for traceback text + +// Stack-allocated buffer for signal-safe string handling +struct StackBuffer { + data: [u8; MAX_STRING_LEN], + len: usize, +} + +impl StackBuffer { + const fn new() -> Self { + Self { + data: [0u8; MAX_STRING_LEN], + len: 0, + } + } + + fn as_ptr(&self) -> *const c_char { + self.data.as_ptr() as *const c_char + } + + fn set_from_str(&mut self, s: &str) { + let bytes = s.as_bytes(); + let copy_len = bytes.len().min(MAX_STRING_LEN - 1); + self.data[..copy_len].copy_from_slice(&bytes[..copy_len]); + self.data[copy_len] = 0; + self.len = copy_len; + } +} + +// Parse a single traceback line into frame information +// ' File "/path/to/file.py", line 42, in function_name' +fn parse_traceback_line( + line: &str, + function_buf: &mut StackBuffer, + file_buf: &mut StackBuffer, +) -> u32 { + let trimmed = line.trim(); + + // Look for the pattern: File "filename", line number, in function_name + if let Some(file_start) = trimmed.find('"') { + if let Some(file_end) = trimmed[file_start + 1..].find('"') { + let file_path = &trimmed[file_start + 1..file_start + 1 + file_end]; + file_buf.set_from_str(file_path); + + let after_file = &trimmed[file_start + file_end + 2..]; + if let Some(line_start) = after_file.find("line ") { + let line_part = &after_file[line_start + 5..]; + + // Try to find comma first ("line 42, in func") + let line_num = if let Some(line_end) = line_part.find(',') { + let line_str = line_part[..line_end].trim(); + line_str.parse::().unwrap_or(0) + } else { + // No comma, try space ("line 42 in func") + if let Some(space_pos) = line_part.find(' ') { + let line_str = line_part[..space_pos].trim(); + line_str.parse::().unwrap_or(0) + } else { + // Just numbers until end + let line_str = line_part.trim(); + line_str.parse::().unwrap_or(0) + } + }; + + // Look for function name + if let Some(in_pos) = after_file.find(" in ") { + let func_name = after_file[in_pos + 4..].trim(); + function_buf.set_from_str(func_name); + } else { + function_buf.set_from_str(""); + } + + return line_num; + } + } + } + + // Fallback parsing + function_buf.set_from_str(""); + file_buf.set_from_str(""); + 0 +} + +// Parse traceback text and emit frames +unsafe fn parse_and_emit_traceback( + traceback_text: &str, + emit_frame: unsafe extern "C" fn(*mut c_void, *const RuntimeStackFrame), + writer_ctx: *mut c_void, +) { + let lines: Vec<&str> = traceback_text.lines().collect(); + let mut frame_count = 0; + + for line in lines { + if frame_count >= MAX_FRAMES { + break; + } + + // Look for lines that start with " File " - these are stack frame lines + if line.trim_start().starts_with("File ") { + let mut function_buf = StackBuffer::new(); + let mut file_buf = StackBuffer::new(); + + let line_number = parse_traceback_line(line, &mut function_buf, &mut file_buf); + + let c_frame = RuntimeStackFrame { + function_name: function_buf.as_ptr(), + file_name: file_buf.as_ptr(), + line_number, + column_number: 0, + class_name: ptr::null(), + module_name: ptr::null(), + }; + + emit_frame(writer_ctx, &c_frame); + frame_count += 1; + } + } +} + +unsafe fn dump_python_traceback_via_cpython_api( + emit_frame: unsafe extern "C" fn(*mut c_void, *const RuntimeStackFrame), + writer_ctx: *mut c_void, +) { + let mut pipefd: [c_int; 2] = [0, 0]; + if pipe(&mut pipefd as *mut [c_int; 2]) != 0 { + emit_fallback_frame(emit_frame, writer_ctx, ""); + return; + } + + let read_fd = pipefd[0]; + let write_fd = pipefd[1]; + + // Make the read end non-blocking + fcntl(read_fd, F_SETFL, O_NONBLOCK); + + // Get the current thread state safely - same approach as CPython's faulthandler + // SIGSEGV, SIGFPE, SIGABRT, SIGBUS and SIGILL are synchronous signals and + // are thus delivered to the thread that caused the fault. + let current_tstate = crashtracker_get_current_tstate(); + + // Call the CPython internal API via our C wrapper + // Pass NULL for interpreter state since _Py_DumpTracebackThreads handle it internally + let error_msg = crashtracker_dump_traceback_threads(write_fd, ptr::null_mut(), current_tstate); + + close(write_fd); + + if !error_msg.is_null() { + close(read_fd); + let error_str = std::ffi::CStr::from_ptr(error_msg); + if let Ok(error_string) = error_str.to_str() { + emit_fallback_frame(emit_frame, writer_ctx, error_string); + } else { + emit_fallback_frame(emit_frame, writer_ctx, ""); + } + return; + } + + let mut buffer = vec![0u8; MAX_TRACEBACK_SIZE]; + let bytes_read = read( + read_fd, + buffer.as_mut_ptr() as *mut c_void, + MAX_TRACEBACK_SIZE, + ); + + close(read_fd); + + if bytes_read > 0 { + buffer.truncate(bytes_read as usize); + if let Ok(traceback_text) = std::str::from_utf8(&buffer) { + parse_and_emit_traceback(traceback_text, emit_frame, writer_ctx); + return; + } + } + + // If we get here, something went wrong with reading the output + emit_fallback_frame(emit_frame, writer_ctx, ""); +} + +// Helper function to emit a fallback frame with error information +unsafe fn emit_fallback_frame( + emit_frame: unsafe extern "C" fn(*mut c_void, *const RuntimeStackFrame), + writer_ctx: *mut c_void, + error_msg: &str, +) { + let mut function_buf = StackBuffer::new(); + let mut file_buf = StackBuffer::new(); + function_buf.set_from_str(error_msg); + file_buf.set_from_str(""); + + let fallback_frame = RuntimeStackFrame { + function_name: function_buf.as_ptr(), + file_name: file_buf.as_ptr(), + line_number: 0, + column_number: 0, + class_name: ptr::null(), + module_name: ptr::null(), + }; + + emit_frame(writer_ctx, &fallback_frame); +} + +/// Dump Python traceback as a complete string +/// +/// This function captures the Python traceback via CPython's internal API +/// and emits it as a single string instead of parsing into individual frames. +/// This is more efficient and preserves the original Python formatting. +unsafe fn dump_python_traceback_as_string( + emit_stacktrace_string: unsafe extern "C" fn(*mut c_void, *const c_char), + writer_ctx: *mut c_void, +) { + // Create a pipe to capture CPython internal traceback dump + let mut pipefd: [c_int; 2] = [0, 0]; + if pipe(&mut pipefd as *mut [c_int; 2]) != 0 { + emit_stacktrace_string( + writer_ctx, + "\0".as_ptr() as *const c_char, + ); + return; + } + + let read_fd = pipefd[0]; + let write_fd = pipefd[1]; + + // Make the read end non-blocking + fcntl(read_fd, F_SETFL, O_NONBLOCK); + + // Get the current thread state safely - same approach as CPython's faulthandler + // SIGSEGV, SIGFPE, SIGABRT, SIGBUS and SIGILL are synchronous signals and + // are thus delivered to the thread that caused the fault. + let current_tstate = crashtracker_get_current_tstate(); + + // Call the CPython internal API via our C wrapper + // Pass NULL for interpreter state - let _Py_DumpTracebackThreads handle it internally + let error_msg = crashtracker_dump_traceback_threads(write_fd, ptr::null_mut(), current_tstate); + + close(write_fd); + + // Check for errors from _Py_DumpTracebackThreads + if !error_msg.is_null() { + close(read_fd); + // Note: We can't format the error message because we're in a signal context + // Just emit a generic error message + emit_stacktrace_string( + writer_ctx, + "\0".as_ptr() as *const c_char, + ); + return; + } + + // Read the traceback output + let mut buffer = vec![0u8; MAX_TRACEBACK_SIZE]; + let bytes_read = read( + read_fd, + buffer.as_mut_ptr() as *mut c_void, + MAX_TRACEBACK_SIZE, + ); + + close(read_fd); + + if bytes_read > 0 { + buffer.truncate(bytes_read as usize); + if let Ok(traceback_text) = std::str::from_utf8(&buffer) { + emit_stacktrace_string(writer_ctx, traceback_text.as_ptr() as *const c_char); + return; + } + } + + emit_stacktrace_string( + writer_ctx, + "\0".as_ptr() as *const c_char, + ); +} + +unsafe extern "C" fn native_runtime_stack_callback( + emit_frame: unsafe extern "C" fn(*mut c_void, *const RuntimeStackFrame), + _emit_stacktrace_string: unsafe extern "C" fn(*mut c_void, *const c_char), + writer_ctx: *mut c_void, +) { + // dump_python_traceback_as_string(emit_stacktrace_string, writer_ctx); + dump_python_traceback_via_cpython_api(emit_frame, writer_ctx); +} + +/// Register the native runtime stack collection callback +/// +/// This function registers a native callback that directly collects Python runtime +/// stack traces without requiring Python callback functions. It uses frame-by-frame +/// collection for detailed stack information. +/// +/// # Returns +/// - `CallbackResult::Ok` if registration succeeds (replaces any existing callback) +#[pyfunction(name = "crashtracker_register_native_runtime_callback")] +pub fn crashtracker_register_native_runtime_callback() -> CallbackResult { + match register_runtime_stack_callback( + native_runtime_stack_callback, + RuntimeType::Python, + CallbackType::Frame, + ) { + Ok(()) => CallbackResult::Ok, + Err(e) => e.into(), + } +} + +/// Check if a runtime callback is currently registered +/// +/// # Returns +/// - `True` if a callback is registered +/// - `False` if no callback is registered +#[pyfunction(name = "crashtracker_is_runtime_callback_registered")] +pub fn crashtracker_is_runtime_callback_registered() -> bool { + is_runtime_callback_registered() +} + +/// Get the runtime type of the currently registered callback +/// +/// # Returns +/// - The runtime type string if a callback is registered +/// - `None` if no callback is registered +#[pyfunction(name = "crashtracker_get_registered_runtime_type")] +pub fn crashtracker_get_registered_runtime_type() -> Option { + unsafe { + let ptr = get_registered_runtime_type_ptr(); + if ptr.is_null() { + None + } else { + let c_str = std::ffi::CStr::from_ptr(ptr); + c_str.to_str().ok().map(|s| s.to_string()) + } + } +} diff --git a/src/native/lib.rs b/src/native/lib.rs index bb558c1b7cc..906cda94e9e 100644 --- a/src/native/lib.rs +++ b/src/native/lib.rs @@ -26,10 +26,24 @@ fn _native(m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_class::()?; m.add_class::()?; m.add_class::()?; + m.add_class::()?; + m.add_class::()?; m.add_function(wrap_pyfunction!(crashtracker::crashtracker_init, m)?)?; m.add_function(wrap_pyfunction!(crashtracker::crashtracker_on_fork, m)?)?; m.add_function(wrap_pyfunction!(crashtracker::crashtracker_status, m)?)?; m.add_function(wrap_pyfunction!(crashtracker::crashtracker_receiver, m)?)?; + m.add_function(wrap_pyfunction!( + crashtracker::crashtracker_register_native_runtime_callback, + m + )?)?; + m.add_function(wrap_pyfunction!( + crashtracker::crashtracker_is_runtime_callback_registered, + m + )?)?; + m.add_function(wrap_pyfunction!( + crashtracker::crashtracker_get_registered_runtime_type, + m + )?)?; } m.add_class::()?; m.add_class::()?; diff --git a/src/native/library_config.rs b/src/native/library_config.rs index bb1c9bd08f8..189c812ce25 100644 --- a/src/native/library_config.rs +++ b/src/native/library_config.rs @@ -125,8 +125,13 @@ pub fn store_metadata(data: &PyTracerMetadata) -> PyResult>>>>>> c21cdc9e2 (First commit) }; let res = store_tracer_metadata(&metadata); diff --git a/tests/internal/crashtracker/test_crashtracker.py b/tests/internal/crashtracker/test_crashtracker.py index b91cae47035..ce63a641a91 100644 --- a/tests/internal/crashtracker/test_crashtracker.py +++ b/tests/internal/crashtracker/test_crashtracker.py @@ -699,6 +699,91 @@ def test_crashtracker_echild_hang(): pytest.fail("Unexpected exception: %s" % e) +@pytest.mark.skipif(not sys.platform.startswith("linux"), reason="Linux only") +@pytest.mark.subprocess() +def test_crashtracker_runtime_callback(): + import ctypes + import os + + import tests.internal.crashtracker.utils as utils + + with utils.with_test_agent() as client: + pid = os.fork() + + def func1(): + return func2() + + def func2(): + return func3() + + def func3(): + return func4() + + def func4(): + return func5() + + def func5(): + return func6() + + def func6(): + return func7() + + def func7(): + return func8() + + def func8(): + return func9() + + def func9(): + return func10() + + def func10(): + return func11() + + def func11(): + return func12() + + def func12(): + return func13() + + def func13(): + return func14() + + def func14(): + return func15() + + def func15(): + return func16() + + def func16(): + ctypes.string_at(0) + sys.exit(-1) + + if pid == 0: + ct = utils.CrashtrackerWrapper(base_name="runtime_runtime_callback") + assert ct.start() + stdout_msg, stderr_msg = ct.logs() + assert not stdout_msg, stdout_msg + assert not stderr_msg, stderr_msg + + func1() + + report = utils.get_crash_report(client) + + import json + try: + report_dict = json.loads(report["body"].decode('utf-8')) + message = report_dict["payload"][0]["message"] + message_dict = json.loads(message) + experimental = message_dict['experimental'] + + with open("experimental_debug_string_dump.json", "w") as f: + json.dump(experimental, f, indent=2) + + except (json.JSONDecodeError, UnicodeDecodeError) as e: + print(f"Could not parse report as JSON: {e}") + + @pytest.mark.skipif(not sys.platform.startswith("linux"), reason="Linux only") @pytest.mark.subprocess() def test_crashtracker_no_zombies(): From e768fc62348619246676592d0ff506feba0c908e Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Fri, 3 Oct 2025 18:35:07 +0000 Subject: [PATCH 02/21] Dont send runtime id --- ddtrace/internal/core/crashtracking.py | 17 ----- ddtrace/internal/native/_native.pyi | 1 - experimental_debug_string_dump.json | 96 +------------------------- src/native/Cargo.lock | 77 ++++++++++++++++++++- src/native/Cargo.toml | 6 -- src/native/crashtracker.rs | 35 +++------- src/native/lib.rs | 4 -- 7 files changed, 86 insertions(+), 150 deletions(-) diff --git a/ddtrace/internal/core/crashtracking.py b/ddtrace/internal/core/crashtracking.py index 74736f89137..921e858d51d 100644 --- a/ddtrace/internal/core/crashtracking.py +++ b/ddtrace/internal/core/crashtracking.py @@ -29,7 +29,6 @@ from ddtrace.internal.native._native import crashtracker_status from ddtrace.internal.native._native import crashtracker_register_native_runtime_callback from ddtrace.internal.native._native import crashtracker_is_runtime_callback_registered - from ddtrace.internal.native._native import crashtracker_get_registered_runtime_type from ddtrace.internal.native._native import CallbackResult except ImportError: is_available = False @@ -224,19 +223,3 @@ def is_runtime_callback_registered() -> bool: return crashtracker_is_runtime_callback_registered() except Exception: return False - - -def get_registered_runtime_type() -> Optional[str]: - """ - Get the runtime type of the currently registered callback. - - Returns: - Optional[str]: The runtime type ("python") if registered, None otherwise - """ - if not is_available: - return None - - try: - return crashtracker_get_registered_runtime_type() - except Exception: - return None diff --git a/ddtrace/internal/native/_native.pyi b/ddtrace/internal/native/_native.pyi index 0a7482fb3f0..65a9e4e01bd 100644 --- a/ddtrace/internal/native/_native.pyi +++ b/ddtrace/internal/native/_native.pyi @@ -126,7 +126,6 @@ def crashtracker_status() -> CrashtrackerStatus: ... def crashtracker_receiver() -> None: ... def crashtracker_register_native_runtime_callback() -> CallbackResult: ... def crashtracker_is_runtime_callback_registered() -> bool: ... -def crashtracker_get_registered_runtime_type() -> Optional[str]: ... class PyTracerMetadata: diff --git a/experimental_debug_string_dump.json b/experimental_debug_string_dump.json index 44672b77ed9..8cf21f2a694 100644 --- a/experimental_debug_string_dump.json +++ b/experimental_debug_string_dump.json @@ -1,99 +1,7 @@ { - "ucontext": "ucontext_t { uc_flags: 7, uc_link: 0x0, uc_stack: stack_t { ss_sp: 0x7ddb1725f000, ss_flags: 0, ss_size: 65536 }, uc_mcontext: mcontext_t { gregs: [0, 138379988587066, 0, 138379983017408, 140722902316384, 140722902316592, 1, 0, 0, -1, 0, 4294967295, 138379983072392, 0, 140722902315688, 140722902315896, 138379988396504, 66179, 12103423998558259, 4, 14, 0, 0], fpregs: 0x7ddb1726e540, __private: [0, 0, 0, 0, 0, 0, 0, 0] }, uc_sigmask: sigset_t { __val: [0, 11, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, __private: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 31, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 116, 0, 111, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 114, 0, 0, 0, 0, 0, 99, 0, 111, 0, 0, 0, 0, 0, 105, 0, 101, 0, 111, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, 0, 0, 99, 0, 0, 0, 104, 0, 0, 0, 32, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 111, 0, 0, 0, 114, 0, 0, 0, 32, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 128, 199, 48, 49, 93, 136, 85, 59, 0, 0, 0, 0, 0, 0, 0, 0, 100, 171, 99, 130, 7, 91, 229, 191, 0, 0, 0, 0, 0, 0, 0, 0, 27, 99, 108, 213, 49, 161, 233, 63, 0, 0, 0, 0, 0, 0, 0, 0, 233, 69, 72, 155, 91, 73, 242, 191, 0, 0, 0, 0, 0, 0, 0, 0, 172, 97, 177, 109, 47, 108, 160, 14, 19, 139, 36, 194, 243, 96, 185, 66, 211, 106, 112, 16, 104, 240, 36, 189, 108, 200, 104, 46, 183, 120, 207, 58, 106, 68, 94, 185, 35, 105, 109, 163, 203, 186, 163, 246, 160, 116, 227, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 88, 80, 70, 140, 10, 0, 0, 255, 2, 0, 0, 0, 0, 0, 0, 136, 10, 0, 0, 0, 0, 0, 0] }", + "ucontext": "ucontext_t { uc_flags: 7, uc_link: 0x0, uc_stack: stack_t { ss_sp: 0x7b822d2a5000, ss_flags: 0, ss_size: 65536 }, uc_mcontext: mcontext_t { gregs: [0, 135799082652218, 0, 135799077082560, 140736968692544, 140736968692752, 1, 0, 0, -1, 0, 4294967295, 135799077137544, 0, 140736968691848, 140736968692056, 135799082461656, 66179, 12103423998558259, 4, 14, 0, 0], fpregs: 0x7b822d2b4540, __private: [0, 0, 0, 0, 0, 0, 0, 0] }, uc_sigmask: sigset_t { __val: [0, 11, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, __private: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 31, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 116, 0, 111, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 114, 0, 0, 0, 0, 0, 99, 0, 111, 0, 0, 0, 0, 0, 105, 0, 101, 0, 111, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, 0, 0, 99, 0, 0, 0, 104, 0, 0, 0, 32, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 111, 0, 0, 0, 114, 0, 0, 0, 32, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 128, 199, 48, 49, 93, 136, 85, 59, 0, 0, 0, 0, 0, 0, 0, 0, 100, 171, 99, 130, 7, 91, 229, 191, 0, 0, 0, 0, 0, 0, 0, 0, 27, 99, 108, 213, 49, 161, 233, 63, 0, 0, 0, 0, 0, 0, 0, 0, 233, 69, 72, 155, 91, 73, 242, 191, 0, 0, 0, 0, 0, 0, 0, 0, 3, 129, 59, 50, 225, 17, 80, 36, 137, 120, 224, 151, 174, 209, 173, 89, 192, 91, 163, 245, 3, 91, 30, 92, 56, 111, 165, 146, 203, 142, 233, 69, 230, 40, 5, 187, 158, 130, 108, 197, 56, 187, 80, 57, 96, 60, 95, 243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 88, 80, 70, 140, 10, 0, 0, 255, 2, 0, 0, 0, 0, 0, 0, 136, 10, 0, 0, 0, 0, 0, 0] }", "runtime_stack": { "format": "Datadog Runtime Callback 1.0", - "frames": [ - { - "function": "string_at", - "file": "/home/bits/.pyenv/versions/3.11.13/lib/python3.11/ctypes/__init__.py", - "line": 519 - }, - { - "function": "func16", - "file": "tests/internal/crashtracker/test_crashtracker.py", - "line": 724 - }, - { - "function": "func15", - "file": "tests/internal/crashtracker/test_crashtracker.py", - "line": 721 - }, - { - "function": "func14", - "file": "tests/internal/crashtracker/test_crashtracker.py", - "line": 718 - }, - { - "function": "func13", - "file": "tests/internal/crashtracker/test_crashtracker.py", - "line": 715 - }, - { - "function": "func12", - "file": "tests/internal/crashtracker/test_crashtracker.py", - "line": 712 - }, - { - "function": "func11", - "file": "tests/internal/crashtracker/test_crashtracker.py", - "line": 709 - }, - { - "function": "func10", - "file": "tests/internal/crashtracker/test_crashtracker.py", - "line": 706 - }, - { - "function": "func9", - "file": "tests/internal/crashtracker/test_crashtracker.py", - "line": 703 - }, - { - "function": "func8", - "file": "tests/internal/crashtracker/test_crashtracker.py", - "line": 700 - }, - { - "function": "func7", - "file": "tests/internal/crashtracker/test_crashtracker.py", - "line": 697 - }, - { - "function": "func6", - "file": "tests/internal/crashtracker/test_crashtracker.py", - "line": 694 - }, - { - "function": "func5", - "file": "tests/internal/crashtracker/test_crashtracker.py", - "line": 691 - }, - { - "function": "func4", - "file": "tests/internal/crashtracker/test_crashtracker.py", - "line": 688 - }, - { - "function": "func3", - "file": "tests/internal/crashtracker/test_crashtracker.py", - "line": 685 - }, - { - "function": "func2", - "file": "tests/internal/crashtracker/test_crashtracker.py", - "line": 682 - }, - { - "function": "func1", - "file": "tests/internal/crashtracker/test_crashtracker.py", - "line": 679 - }, - { - "function": "", - "file": "tests/internal/crashtracker/test_crashtracker.py", - "line": 734 - } - ], - "runtime_type": "python" + "stacktrace_string": "Current thread 0x00007b822fed9b80 (most recent call first):\n File \"/home/bits/.pyenv/versions/3.11.13/lib/python3.11/ctypes/__init__.py\", line 519 in string_at\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 724 in func16\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 721 in func15\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 718 in func14\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 715 in func13\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 712 in func12\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 709 in func11\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 706 in func10\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 703 in func9\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 700 in func8\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 697 in func7\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 694 in func6\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 691 in func5\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 688 in func4\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 685 in func3\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 682 in func2\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 679 in func1\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 734 in " } } \ No newline at end of file diff --git a/src/native/Cargo.lock b/src/native/Cargo.lock index bd28d18dc69..306ab15b535 100644 --- a/src/native/Cargo.lock +++ b/src/native/Cargo.lock @@ -225,9 +225,16 @@ version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= version = "21.0.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +<<<<<<< HEAD >>>>>>> 37544fcdb0 (First commit) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) +>>>>>>> 18ab8f7639 (Dont send runtime id) dependencies = [ "cbindgen", "serde", @@ -303,7 +310,7 @@ dependencies = [ ======= name = "cc_utils" version = "0.1.0" -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" dependencies = [ "anyhow", "cc", @@ -568,8 +575,12 @@ version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= version = "21.0.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) dependencies = [ "anyhow", "arc-swap", @@ -604,8 +615,12 @@ version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= version = "21.0.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) dependencies = [ "allocator-api2", "libc", @@ -619,8 +634,12 @@ version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= version = "21.0.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) dependencies = [ "anyhow", "backtrace", @@ -656,8 +675,12 @@ version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= version = "21.0.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) dependencies = [ "prost", ] @@ -666,10 +689,14 @@ dependencies = [ name = "datadog-library-config" version = "0.0.2" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) dependencies = [ "anyhow", "memfd", @@ -687,8 +714,12 @@ version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= version = "21.0.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) dependencies = [ "chrono", "tracing", @@ -703,8 +734,12 @@ version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= version = "21.0.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) dependencies = [ "anyhow", "bitmaps", @@ -738,8 +773,12 @@ version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= version = "21.0.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) dependencies = [ "anyhow", "build_common", @@ -762,8 +801,12 @@ version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= version = "21.0.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) dependencies = [ "prost", ] @@ -775,8 +818,12 @@ version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= version = "21.0.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) dependencies = [ "anyhow", "datadog-trace-protobuf", @@ -789,8 +836,12 @@ version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= version = "21.0.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) dependencies = [ "prost", "serde", @@ -815,8 +866,12 @@ version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= version = "21.0.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) dependencies = [ "anyhow", "bytes", @@ -845,8 +900,12 @@ version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= version = "21.0.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) dependencies = [ "anyhow", "cc", @@ -883,8 +942,12 @@ version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= version = "21.0.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) dependencies = [ "anyhow", "build_common", @@ -902,8 +965,12 @@ version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= version = "21.0.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) dependencies = [ "anyhow", "base64", @@ -1032,8 +1099,12 @@ version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= version = "21.0.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) dependencies = [ "anyhow", "cadence", @@ -3171,8 +3242,12 @@ version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= version = "21.0.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) dependencies = [ "serde", ] diff --git a/src/native/Cargo.toml b/src/native/Cargo.toml index efeb822aac4..fe964ff5bdc 100644 --- a/src/native/Cargo.toml +++ b/src/native/Cargo.toml @@ -39,10 +39,4 @@ build_common = { git = "https://github.com/DataDog/libdatadog", rev = "v24.0.0", [lib] name = "_native" -path = "lib.rs" crate-type = ["cdylib"] - -[net] -# Use git binary from the system instead of the built-in git client -# "Setting this to true can be helpful if you have special authentication requirements that Cargo does not support." -git-fetch-with-cli = true diff --git a/src/native/crashtracker.rs b/src/native/crashtracker.rs index 7c6ae1bbf75..23d8e046aa6 100644 --- a/src/native/crashtracker.rs +++ b/src/native/crashtracker.rs @@ -8,9 +8,9 @@ use std::time::Duration; use libdd_common::Endpoint; use libdd_crashtracker::{ - get_registered_runtime_type_ptr, is_runtime_callback_registered, - register_runtime_stack_callback, CallbackError, CallbackType, CrashtrackerConfiguration, - CrashtrackerReceiverConfig, Metadata, RuntimeStackFrame, RuntimeType, StacktraceCollection, + is_runtime_callback_registered, register_runtime_stack_callback, CallbackError, CallbackType, + CrashtrackerConfiguration, CrashtrackerReceiverConfig, Metadata, RuntimeStackFrame, + StacktraceCollection, }; use pyo3::prelude::*; @@ -678,12 +678,12 @@ unsafe fn dump_python_traceback_as_string( } unsafe extern "C" fn native_runtime_stack_callback( - emit_frame: unsafe extern "C" fn(*mut c_void, *const RuntimeStackFrame), - _emit_stacktrace_string: unsafe extern "C" fn(*mut c_void, *const c_char), + _emit_frame: unsafe extern "C" fn(*mut c_void, *const RuntimeStackFrame), + emit_stacktrace_string: unsafe extern "C" fn(*mut c_void, *const c_char), writer_ctx: *mut c_void, ) { - // dump_python_traceback_as_string(emit_stacktrace_string, writer_ctx); - dump_python_traceback_via_cpython_api(emit_frame, writer_ctx); + dump_python_traceback_as_string(emit_stacktrace_string, writer_ctx); + // dump_python_traceback_via_cpython_api(emit_frame, writer_ctx); } /// Register the native runtime stack collection callback @@ -698,8 +698,7 @@ unsafe extern "C" fn native_runtime_stack_callback( pub fn crashtracker_register_native_runtime_callback() -> CallbackResult { match register_runtime_stack_callback( native_runtime_stack_callback, - RuntimeType::Python, - CallbackType::Frame, + CallbackType::StacktraceString, ) { Ok(()) => CallbackResult::Ok, Err(e) => e.into(), @@ -715,21 +714,3 @@ pub fn crashtracker_register_native_runtime_callback() -> CallbackResult { pub fn crashtracker_is_runtime_callback_registered() -> bool { is_runtime_callback_registered() } - -/// Get the runtime type of the currently registered callback -/// -/// # Returns -/// - The runtime type string if a callback is registered -/// - `None` if no callback is registered -#[pyfunction(name = "crashtracker_get_registered_runtime_type")] -pub fn crashtracker_get_registered_runtime_type() -> Option { - unsafe { - let ptr = get_registered_runtime_type_ptr(); - if ptr.is_null() { - None - } else { - let c_str = std::ffi::CStr::from_ptr(ptr); - c_str.to_str().ok().map(|s| s.to_string()) - } - } -} diff --git a/src/native/lib.rs b/src/native/lib.rs index 906cda94e9e..583b23b4a14 100644 --- a/src/native/lib.rs +++ b/src/native/lib.rs @@ -40,10 +40,6 @@ fn _native(m: &Bound<'_, PyModule>) -> PyResult<()> { crashtracker::crashtracker_is_runtime_callback_registered, m )?)?; - m.add_function(wrap_pyfunction!( - crashtracker::crashtracker_get_registered_runtime_type, - m - )?)?; } m.add_class::()?; m.add_class::()?; From 52df92a72a7018271430098bec1d4e4001fe9468 Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Mon, 6 Oct 2025 13:39:04 +0000 Subject: [PATCH 03/21] No writer context exposed --- experimental_debug_string_dump.json | 4 +- src/native/Cargo.lock | 77 ++++++++++++++++++++++++++++- src/native/Cargo.toml | 1 - src/native/crashtracker.rs | 52 +++++++------------ 4 files changed, 97 insertions(+), 37 deletions(-) diff --git a/experimental_debug_string_dump.json b/experimental_debug_string_dump.json index 8cf21f2a694..142addca331 100644 --- a/experimental_debug_string_dump.json +++ b/experimental_debug_string_dump.json @@ -1,7 +1,7 @@ { - "ucontext": "ucontext_t { uc_flags: 7, uc_link: 0x0, uc_stack: stack_t { ss_sp: 0x7b822d2a5000, ss_flags: 0, ss_size: 65536 }, uc_mcontext: mcontext_t { gregs: [0, 135799082652218, 0, 135799077082560, 140736968692544, 140736968692752, 1, 0, 0, -1, 0, 4294967295, 135799077137544, 0, 140736968691848, 140736968692056, 135799082461656, 66179, 12103423998558259, 4, 14, 0, 0], fpregs: 0x7b822d2b4540, __private: [0, 0, 0, 0, 0, 0, 0, 0] }, uc_sigmask: sigset_t { __val: [0, 11, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, __private: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 31, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 116, 0, 111, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 114, 0, 0, 0, 0, 0, 99, 0, 111, 0, 0, 0, 0, 0, 105, 0, 101, 0, 111, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, 0, 0, 99, 0, 0, 0, 104, 0, 0, 0, 32, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 111, 0, 0, 0, 114, 0, 0, 0, 32, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 128, 199, 48, 49, 93, 136, 85, 59, 0, 0, 0, 0, 0, 0, 0, 0, 100, 171, 99, 130, 7, 91, 229, 191, 0, 0, 0, 0, 0, 0, 0, 0, 27, 99, 108, 213, 49, 161, 233, 63, 0, 0, 0, 0, 0, 0, 0, 0, 233, 69, 72, 155, 91, 73, 242, 191, 0, 0, 0, 0, 0, 0, 0, 0, 3, 129, 59, 50, 225, 17, 80, 36, 137, 120, 224, 151, 174, 209, 173, 89, 192, 91, 163, 245, 3, 91, 30, 92, 56, 111, 165, 146, 203, 142, 233, 69, 230, 40, 5, 187, 158, 130, 108, 197, 56, 187, 80, 57, 96, 60, 95, 243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 88, 80, 70, 140, 10, 0, 0, 255, 2, 0, 0, 0, 0, 0, 0, 136, 10, 0, 0, 0, 0, 0, 0] }", + "ucontext": "ucontext_t { uc_flags: 7, uc_link: 0x0, uc_stack: stack_t { ss_sp: 0x72efba282000, ss_flags: 0, ss_size: 65536 }, uc_mcontext: mcontext_t { gregs: [0, 126373994852922, 0, 126373989283264, 140736788733600, 140736788733808, 1, 0, 0, -1, 0, 4294967295, 126373989338248, 0, 140736788732904, 140736788733112, 126373994662360, 66179, 12103423998558259, 4, 14, 0, 0], fpregs: 0x72efba291540, __private: [0, 0, 0, 0, 0, 0, 0, 0] }, uc_sigmask: sigset_t { __val: [0, 11, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, __private: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 31, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 116, 0, 111, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 114, 0, 0, 0, 0, 0, 99, 0, 111, 0, 0, 0, 0, 0, 105, 0, 101, 0, 111, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, 0, 0, 99, 0, 0, 0, 104, 0, 0, 0, 32, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 111, 0, 0, 0, 114, 0, 0, 0, 32, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 128, 199, 48, 49, 93, 136, 85, 59, 0, 0, 0, 0, 0, 0, 0, 0, 100, 171, 99, 130, 7, 91, 229, 191, 0, 0, 0, 0, 0, 0, 0, 0, 27, 99, 108, 213, 49, 161, 233, 63, 0, 0, 0, 0, 0, 0, 0, 0, 233, 69, 72, 155, 91, 73, 242, 191, 0, 0, 0, 0, 0, 0, 0, 0, 116, 27, 189, 114, 24, 144, 84, 44, 242, 171, 84, 123, 71, 116, 186, 37, 10, 62, 133, 240, 152, 51, 28, 167, 136, 1, 93, 109, 7, 127, 169, 115, 217, 214, 21, 8, 156, 44, 9, 140, 5, 199, 136, 186, 9, 100, 100, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 88, 80, 70, 140, 10, 0, 0, 255, 2, 0, 0, 0, 0, 0, 0, 136, 10, 0, 0, 0, 0, 0, 0] }", "runtime_stack": { "format": "Datadog Runtime Callback 1.0", - "stacktrace_string": "Current thread 0x00007b822fed9b80 (most recent call first):\n File \"/home/bits/.pyenv/versions/3.11.13/lib/python3.11/ctypes/__init__.py\", line 519 in string_at\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 724 in func16\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 721 in func15\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 718 in func14\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 715 in func13\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 712 in func12\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 709 in func11\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 706 in func10\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 703 in func9\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 700 in func8\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 697 in func7\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 694 in func6\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 691 in func5\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 688 in func4\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 685 in func3\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 682 in func2\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 679 in func1\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 734 in " + "stacktrace_string": "Current thread 0x000072efbceafb80 (most recent call first):\n File \"/home/bits/.pyenv/versions/3.11.13/lib/python3.11/ctypes/__init__.py\", line 519 in string_at\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 724 in func16\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 721 in func15\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 718 in func14\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 715 in func13\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 712 in func12\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 709 in func11\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 706 in func10\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 703 in func9\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 700 in func8\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 697 in func7\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 694 in func6\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 691 in func5\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 688 in func4\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 685 in func3\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 682 in func2\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 679 in func1\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 734 in " } } \ No newline at end of file diff --git a/src/native/Cargo.lock b/src/native/Cargo.lock index 306ab15b535..280c71214bf 100644 --- a/src/native/Cargo.lock +++ b/src/native/Cargo.lock @@ -226,6 +226,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 ======= version = "21.0.0" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) <<<<<<< HEAD @@ -234,7 +235,13 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +<<<<<<< HEAD >>>>>>> 18ab8f7639 (Dont send runtime id) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 68b8f943e2 (No writer context exposed) dependencies = [ "cbindgen", "serde", @@ -310,7 +317,7 @@ dependencies = [ ======= name = "cc_utils" version = "0.1.0" -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" dependencies = [ "anyhow", "cc", @@ -576,11 +583,15 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 ======= version = "21.0.0" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) dependencies = [ "anyhow", "arc-swap", @@ -616,11 +627,15 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 ======= version = "21.0.0" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) dependencies = [ "allocator-api2", "libc", @@ -635,11 +650,15 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 ======= version = "21.0.0" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) dependencies = [ "anyhow", "backtrace", @@ -676,11 +695,15 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 ======= version = "21.0.0" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) dependencies = [ "prost", ] @@ -690,6 +713,7 @@ name = "datadog-library-config" version = "0.0.2" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" @@ -697,6 +721,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) dependencies = [ "anyhow", "memfd", @@ -715,11 +742,15 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 ======= version = "21.0.0" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) dependencies = [ "chrono", "tracing", @@ -735,11 +766,15 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 ======= version = "21.0.0" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) dependencies = [ "anyhow", "bitmaps", @@ -774,11 +809,15 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 ======= version = "21.0.0" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) dependencies = [ "anyhow", "build_common", @@ -802,11 +841,15 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 ======= version = "21.0.0" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) dependencies = [ "prost", ] @@ -819,11 +862,15 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 ======= version = "21.0.0" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) dependencies = [ "anyhow", "datadog-trace-protobuf", @@ -837,11 +884,15 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 ======= version = "21.0.0" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) dependencies = [ "prost", "serde", @@ -867,11 +918,15 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 ======= version = "21.0.0" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) dependencies = [ "anyhow", "bytes", @@ -901,11 +956,15 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 ======= version = "21.0.0" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) dependencies = [ "anyhow", "cc", @@ -943,11 +1002,15 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 ======= version = "21.0.0" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) dependencies = [ "anyhow", "build_common", @@ -966,11 +1029,15 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 ======= version = "21.0.0" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) dependencies = [ "anyhow", "base64", @@ -1100,11 +1167,15 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 ======= version = "21.0.0" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) dependencies = [ "anyhow", "cadence", @@ -3243,11 +3314,15 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 ======= version = "21.0.0" <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) dependencies = [ "serde", ] diff --git a/src/native/Cargo.toml b/src/native/Cargo.toml index fe964ff5bdc..3dfdb40f932 100644 --- a/src/native/Cargo.toml +++ b/src/native/Cargo.toml @@ -39,4 +39,3 @@ build_common = { git = "https://github.com/DataDog/libdatadog", rev = "v24.0.0", [lib] name = "_native" -crate-type = ["cdylib"] diff --git a/src/native/crashtracker.rs b/src/native/crashtracker.rs index 23d8e046aa6..8a251486c4d 100644 --- a/src/native/crashtracker.rs +++ b/src/native/crashtracker.rs @@ -490,8 +490,7 @@ fn parse_traceback_line( // Parse traceback text and emit frames unsafe fn parse_and_emit_traceback( traceback_text: &str, - emit_frame: unsafe extern "C" fn(*mut c_void, *const RuntimeStackFrame), - writer_ctx: *mut c_void, + emit_frame: unsafe extern "C" fn(*const RuntimeStackFrame), ) { let lines: Vec<&str> = traceback_text.lines().collect(); let mut frame_count = 0; @@ -517,19 +516,18 @@ unsafe fn parse_and_emit_traceback( module_name: ptr::null(), }; - emit_frame(writer_ctx, &c_frame); + emit_frame(&c_frame); frame_count += 1; } } } unsafe fn dump_python_traceback_via_cpython_api( - emit_frame: unsafe extern "C" fn(*mut c_void, *const RuntimeStackFrame), - writer_ctx: *mut c_void, + emit_frame: unsafe extern "C" fn(*const RuntimeStackFrame), ) { let mut pipefd: [c_int; 2] = [0, 0]; if pipe(&mut pipefd as *mut [c_int; 2]) != 0 { - emit_fallback_frame(emit_frame, writer_ctx, ""); + emit_fallback_frame(emit_frame, ""); return; } @@ -554,9 +552,9 @@ unsafe fn dump_python_traceback_via_cpython_api( close(read_fd); let error_str = std::ffi::CStr::from_ptr(error_msg); if let Ok(error_string) = error_str.to_str() { - emit_fallback_frame(emit_frame, writer_ctx, error_string); + emit_fallback_frame(emit_frame, error_string); } else { - emit_fallback_frame(emit_frame, writer_ctx, ""); + emit_fallback_frame(emit_frame, ""); } return; } @@ -573,19 +571,18 @@ unsafe fn dump_python_traceback_via_cpython_api( if bytes_read > 0 { buffer.truncate(bytes_read as usize); if let Ok(traceback_text) = std::str::from_utf8(&buffer) { - parse_and_emit_traceback(traceback_text, emit_frame, writer_ctx); + parse_and_emit_traceback(traceback_text, emit_frame); return; } } // If we get here, something went wrong with reading the output - emit_fallback_frame(emit_frame, writer_ctx, ""); + emit_fallback_frame(emit_frame, ""); } // Helper function to emit a fallback frame with error information unsafe fn emit_fallback_frame( - emit_frame: unsafe extern "C" fn(*mut c_void, *const RuntimeStackFrame), - writer_ctx: *mut c_void, + emit_frame: unsafe extern "C" fn(*const RuntimeStackFrame), error_msg: &str, ) { let mut function_buf = StackBuffer::new(); @@ -602,7 +599,7 @@ unsafe fn emit_fallback_frame( module_name: ptr::null(), }; - emit_frame(writer_ctx, &fallback_frame); + emit_frame(&fallback_frame); } /// Dump Python traceback as a complete string @@ -611,16 +608,12 @@ unsafe fn emit_fallback_frame( /// and emits it as a single string instead of parsing into individual frames. /// This is more efficient and preserves the original Python formatting. unsafe fn dump_python_traceback_as_string( - emit_stacktrace_string: unsafe extern "C" fn(*mut c_void, *const c_char), - writer_ctx: *mut c_void, + emit_stacktrace_string: unsafe extern "C" fn(*const c_char), ) { // Create a pipe to capture CPython internal traceback dump let mut pipefd: [c_int; 2] = [0, 0]; if pipe(&mut pipefd as *mut [c_int; 2]) != 0 { - emit_stacktrace_string( - writer_ctx, - "\0".as_ptr() as *const c_char, - ); + emit_stacktrace_string("\0".as_ptr() as *const c_char); return; } @@ -646,10 +639,7 @@ unsafe fn dump_python_traceback_as_string( close(read_fd); // Note: We can't format the error message because we're in a signal context // Just emit a generic error message - emit_stacktrace_string( - writer_ctx, - "\0".as_ptr() as *const c_char, - ); + emit_stacktrace_string("\0".as_ptr() as *const c_char); return; } @@ -666,24 +656,20 @@ unsafe fn dump_python_traceback_as_string( if bytes_read > 0 { buffer.truncate(bytes_read as usize); if let Ok(traceback_text) = std::str::from_utf8(&buffer) { - emit_stacktrace_string(writer_ctx, traceback_text.as_ptr() as *const c_char); + emit_stacktrace_string(traceback_text.as_ptr() as *const c_char); return; } } - emit_stacktrace_string( - writer_ctx, - "\0".as_ptr() as *const c_char, - ); + emit_stacktrace_string("\0".as_ptr() as *const c_char); } unsafe extern "C" fn native_runtime_stack_callback( - _emit_frame: unsafe extern "C" fn(*mut c_void, *const RuntimeStackFrame), - emit_stacktrace_string: unsafe extern "C" fn(*mut c_void, *const c_char), - writer_ctx: *mut c_void, + _emit_frame: unsafe extern "C" fn(*const RuntimeStackFrame), + emit_stacktrace_string: unsafe extern "C" fn(*const c_char), ) { - dump_python_traceback_as_string(emit_stacktrace_string, writer_ctx); - // dump_python_traceback_via_cpython_api(emit_frame, writer_ctx); + dump_python_traceback_as_string(emit_stacktrace_string); + // dump_python_traceback_via_cpython_api(emit_frame); } /// Register the native runtime stack collection callback From edd589960195828fa833069ae4446d736fcc346b Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Mon, 13 Oct 2025 11:14:35 +0000 Subject: [PATCH 04/21] Remove class and module name in runtime frame def --- experimental_debug_string_dump.json | 4 +- src/native/Cargo.lock | 77 ++++++++++++++++++++++++++++- src/native/crashtracker.rs | 20 -------- 3 files changed, 78 insertions(+), 23 deletions(-) diff --git a/experimental_debug_string_dump.json b/experimental_debug_string_dump.json index 142addca331..f3632e3e6ac 100644 --- a/experimental_debug_string_dump.json +++ b/experimental_debug_string_dump.json @@ -1,7 +1,7 @@ { - "ucontext": "ucontext_t { uc_flags: 7, uc_link: 0x0, uc_stack: stack_t { ss_sp: 0x72efba282000, ss_flags: 0, ss_size: 65536 }, uc_mcontext: mcontext_t { gregs: [0, 126373994852922, 0, 126373989283264, 140736788733600, 140736788733808, 1, 0, 0, -1, 0, 4294967295, 126373989338248, 0, 140736788732904, 140736788733112, 126373994662360, 66179, 12103423998558259, 4, 14, 0, 0], fpregs: 0x72efba291540, __private: [0, 0, 0, 0, 0, 0, 0, 0] }, uc_sigmask: sigset_t { __val: [0, 11, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, __private: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 31, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 116, 0, 111, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 114, 0, 0, 0, 0, 0, 99, 0, 111, 0, 0, 0, 0, 0, 105, 0, 101, 0, 111, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, 0, 0, 99, 0, 0, 0, 104, 0, 0, 0, 32, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 111, 0, 0, 0, 114, 0, 0, 0, 32, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 128, 199, 48, 49, 93, 136, 85, 59, 0, 0, 0, 0, 0, 0, 0, 0, 100, 171, 99, 130, 7, 91, 229, 191, 0, 0, 0, 0, 0, 0, 0, 0, 27, 99, 108, 213, 49, 161, 233, 63, 0, 0, 0, 0, 0, 0, 0, 0, 233, 69, 72, 155, 91, 73, 242, 191, 0, 0, 0, 0, 0, 0, 0, 0, 116, 27, 189, 114, 24, 144, 84, 44, 242, 171, 84, 123, 71, 116, 186, 37, 10, 62, 133, 240, 152, 51, 28, 167, 136, 1, 93, 109, 7, 127, 169, 115, 217, 214, 21, 8, 156, 44, 9, 140, 5, 199, 136, 186, 9, 100, 100, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 88, 80, 70, 140, 10, 0, 0, 255, 2, 0, 0, 0, 0, 0, 0, 136, 10, 0, 0, 0, 0, 0, 0] }", + "ucontext": "ucontext_t { uc_flags: 7, uc_link: 0x0, uc_stack: stack_t { ss_sp: 0x7d47f6ab1000, ss_flags: 0, ss_size: 65536 }, uc_mcontext: mcontext_t { gregs: [0, 137748083470906, 0, 137748077901248, 140733932737568, 140733932737776, 1, 0, 0, -1, 0, 4294967295, 137748077956232, 0, 140733932736872, 140733932737080, 137748083280344, 66179, 12103423998558259, 4, 14, 0, 0], fpregs: 0x7d47f6ac0540, __private: [0, 0, 0, 0, 0, 0, 0, 0] }, uc_sigmask: sigset_t { __val: [0, 11, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, __private: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 31, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 116, 0, 111, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 114, 0, 0, 0, 0, 0, 99, 0, 111, 0, 0, 0, 0, 0, 105, 0, 101, 0, 111, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, 0, 0, 99, 0, 0, 0, 104, 0, 0, 0, 32, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 111, 0, 0, 0, 114, 0, 0, 0, 32, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 128, 199, 48, 49, 93, 136, 85, 59, 0, 0, 0, 0, 0, 0, 0, 0, 100, 171, 99, 130, 7, 91, 229, 191, 0, 0, 0, 0, 0, 0, 0, 0, 27, 99, 108, 213, 49, 161, 233, 63, 0, 0, 0, 0, 0, 0, 0, 0, 233, 69, 72, 155, 91, 73, 242, 191, 0, 0, 0, 0, 0, 0, 0, 0, 114, 80, 10, 129, 29, 85, 72, 118, 32, 158, 186, 131, 29, 108, 202, 57, 158, 113, 33, 218, 47, 97, 208, 210, 15, 69, 56, 139, 73, 158, 226, 210, 135, 124, 244, 136, 152, 194, 37, 192, 239, 189, 60, 162, 184, 0, 247, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 88, 80, 70, 140, 10, 0, 0, 255, 2, 0, 0, 0, 0, 0, 0, 136, 10, 0, 0, 0, 0, 0, 0] }", "runtime_stack": { "format": "Datadog Runtime Callback 1.0", - "stacktrace_string": "Current thread 0x000072efbceafb80 (most recent call first):\n File \"/home/bits/.pyenv/versions/3.11.13/lib/python3.11/ctypes/__init__.py\", line 519 in string_at\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 724 in func16\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 721 in func15\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 718 in func14\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 715 in func13\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 712 in func12\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 709 in func11\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 706 in func10\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 703 in func9\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 700 in func8\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 697 in func7\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 694 in func6\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 691 in func5\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 688 in func4\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 685 in func3\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 682 in func2\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 679 in func1\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 734 in " + "stacktrace_string": "Current thread 0x00007d47f96dfb80 (most recent call first):\n File \"/home/bits/.pyenv/versions/3.11.13/lib/python3.11/ctypes/__init__.py\", line 519 in string_at\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 724 in func16\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 721 in func15\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 718 in func14\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 715 in func13\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 712 in func12\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 709 in func11\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 706 in func10\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 703 in func9\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 700 in func8\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 697 in func7\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 694 in func6\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 691 in func5\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 688 in func4\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 685 in func3\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 682 in func2\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 679 in func1\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 734 in \n" } } \ No newline at end of file diff --git a/src/native/Cargo.lock b/src/native/Cargo.lock index 280c71214bf..32d316ad1f6 100644 --- a/src/native/Cargo.lock +++ b/src/native/Cargo.lock @@ -227,6 +227,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) <<<<<<< HEAD @@ -241,7 +242,13 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +<<<<<<< HEAD >>>>>>> 68b8f943e2 (No writer context exposed) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +>>>>>>> a675d5640e (Remove class and module name in runtime frame def) dependencies = [ "cbindgen", "serde", @@ -317,7 +324,7 @@ dependencies = [ ======= name = "cc_utils" version = "0.1.0" -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" dependencies = [ "anyhow", "cc", @@ -584,6 +591,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -592,6 +600,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) dependencies = [ "anyhow", "arc-swap", @@ -628,6 +639,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -636,6 +648,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) dependencies = [ "allocator-api2", "libc", @@ -651,6 +666,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -659,6 +675,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) dependencies = [ "anyhow", "backtrace", @@ -696,6 +715,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -704,6 +724,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) dependencies = [ "prost", ] @@ -714,6 +737,7 @@ version = "0.0.2" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" @@ -724,6 +748,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) dependencies = [ "anyhow", "memfd", @@ -743,6 +770,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -751,6 +779,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) dependencies = [ "chrono", "tracing", @@ -767,6 +798,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -775,6 +807,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) dependencies = [ "anyhow", "bitmaps", @@ -810,6 +845,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -818,6 +854,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) dependencies = [ "anyhow", "build_common", @@ -842,6 +881,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -850,6 +890,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) dependencies = [ "prost", ] @@ -863,6 +906,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -871,6 +915,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) dependencies = [ "anyhow", "datadog-trace-protobuf", @@ -885,6 +932,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -893,6 +941,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) dependencies = [ "prost", "serde", @@ -919,6 +970,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -927,6 +979,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) dependencies = [ "anyhow", "bytes", @@ -957,6 +1012,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -965,6 +1021,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) dependencies = [ "anyhow", "cc", @@ -1003,6 +1062,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -1011,6 +1071,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) dependencies = [ "anyhow", "build_common", @@ -1030,6 +1093,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -1038,6 +1102,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) dependencies = [ "anyhow", "base64", @@ -1168,6 +1235,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -1176,6 +1244,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) dependencies = [ "anyhow", "cadence", @@ -3315,6 +3386,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68 version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -3323,6 +3395,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +>>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) dependencies = [ "serde", ] diff --git a/src/native/crashtracker.rs b/src/native/crashtracker.rs index 8a251486c4d..5bf75d771ed 100644 --- a/src/native/crashtracker.rs +++ b/src/native/crashtracker.rs @@ -345,8 +345,6 @@ pub struct RuntimeStackFramePy { pub file_name: Option, pub line_number: u32, pub column_number: u32, - pub class_name: Option, - pub module_name: Option, } #[pymethods] @@ -357,16 +355,12 @@ impl RuntimeStackFramePy { file_name: Option, line_number: u32, column_number: u32, - class_name: Option, - module_name: Option, ) -> Self { Self { function_name, file_name, line_number, column_number, - class_name, - module_name, } } @@ -389,16 +383,6 @@ impl RuntimeStackFramePy { fn get_column_number(&self) -> u32 { self.column_number } - - #[getter] - fn get_class_name(&self) -> Option { - self.class_name.clone() - } - - #[getter] - fn get_module_name(&self) -> Option { - self.module_name.clone() - } } // Constants for signal-safe operation @@ -512,8 +496,6 @@ unsafe fn parse_and_emit_traceback( file_name: file_buf.as_ptr(), line_number, column_number: 0, - class_name: ptr::null(), - module_name: ptr::null(), }; emit_frame(&c_frame); @@ -595,8 +577,6 @@ unsafe fn emit_fallback_frame( file_name: file_buf.as_ptr(), line_number: 0, column_number: 0, - class_name: ptr::null(), - module_name: ptr::null(), }; emit_frame(&fallback_frame); From a4ec2ac269396c233ee6e07c3b08d0fb1721e0ab Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Mon, 20 Oct 2025 19:15:41 +0000 Subject: [PATCH 05/21] For testing with test tracer in staging --- src/native/Cargo.lock | 466 ++++++++++++++++++++++++++++++-- src/native/crashtracker.rs | 197 ++------------ src/native/data_pipeline/mod.rs | 11 + src/native/lib.rs | 1 - 4 files changed, 481 insertions(+), 194 deletions(-) diff --git a/src/native/Cargo.lock b/src/native/Cargo.lock index 32d316ad1f6..ae07fcdb377 100644 --- a/src/native/Cargo.lock +++ b/src/native/Cargo.lock @@ -19,9 +19,9 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -217,9 +217,12 @@ dependencies = [ [[package]] name = "build_common" <<<<<<< HEAD +<<<<<<< HEAD version = "24.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v24.0.0#3445414c9ba4fefc76be46cf7e2f998986592892" ======= +======= +>>>>>>> 29189767b5 (For testing with test tracer in staging) <<<<<<< HEAD version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" @@ -248,7 +251,14 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +<<<<<<< HEAD >>>>>>> a675d5640e (Remove class and module name in runtime frame def) +======= +======= +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) +>>>>>>> 29189767b5 (For testing with test tracer in staging) dependencies = [ "cbindgen", "serde", @@ -304,6 +314,7 @@ dependencies = [ [[package]] name = "cc" <<<<<<< HEAD +<<<<<<< HEAD version = "1.2.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac9fe6cdbb24b6ade63616c0a0688e45bb56732262c158df3c0c4bea4ca47cb7" @@ -312,6 +323,11 @@ version = "1.2.39" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1354349954c6fc9cb0deab020f27f783cf0b604e8bb754dc4658ecf0d29c35f" >>>>>>> c21cdc9e2 (First commit) +======= +version = "1.2.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35900b6c8d709fb1d854671ae27aeaa9eec2f8b01b364e1619a40da3e6fe2afe" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) dependencies = [ "find-msvc-tools", "jobserver", @@ -321,6 +337,7 @@ dependencies = [ [[package]] <<<<<<< HEAD +<<<<<<< HEAD ======= name = "cc_utils" version = "0.1.0" @@ -332,6 +349,8 @@ dependencies = [ [[package]] >>>>>>> c21cdc9e2 (First commit) +======= +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) name = "cexpr" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -379,18 +398,30 @@ dependencies = [ [[package]] name = "clap" +<<<<<<< HEAD version = "4.5.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2cfd7bf8a6017ddaa4e32ffe7403d547790db06bd171c1c53926faab501623" +======= +version = "4.5.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" +<<<<<<< HEAD version = "4.5.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a4c05b9e80c5ccd3a7ef080ad7b6ba7d6fc00a985b8b157197075677c82c7a0" +======= +version = "4.5.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) dependencies = [ "anstream", "anstyle", @@ -525,6 +556,7 @@ dependencies = [ [[package]] <<<<<<< HEAD +<<<<<<< HEAD name = "darling" version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -581,8 +613,12 @@ dependencies = [ [[package]] ======= +======= +>>>>>>> d4c329b287 (For testing with test tracer in staging) <<<<<<< HEAD ======= +======= +>>>>>>> 29189767b5 (For testing with test tracer in staging) name = "data-pipeline" <<<<<<< HEAD version = "23.0.0" @@ -678,16 +714,21 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +======= +name = "datadog-crashtracker" +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) dependencies = [ "anyhow", "backtrace", "blazesym", "cc", "chrono", - "ddcommon", - "ddtelemetry", "http", "libc", + "libdd-common", + "libdd-telemetry", "nix", "num-derive", "num-traits", @@ -704,6 +745,7 @@ dependencies = [ "tokio", "uuid", "windows 0.59.0", +<<<<<<< HEAD ] [[package]] @@ -787,11 +829,14 @@ dependencies = [ "tracing", "tracing-appender", "tracing-subscriber", +======= +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) ] [[package]] name = "datadog-profiling" <<<<<<< HEAD +<<<<<<< HEAD version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= @@ -810,21 +855,29 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +======= +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) dependencies = [ "anyhow", "bitmaps", "byteorder", "bytes", "chrono", - "datadog-alloc", - "datadog-profiling-protobuf", - "ddcommon", "futures", "http", "http-body-util", "hyper", "hyper-multipart-rfc7578", "indexmap", +<<<<<<< HEAD +======= + "libdd-alloc", + "libdd-common", + "libdd-profiling-protobuf", + "lz4_flex", +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) "mime", "prost", "rustc-hash 1.1.0", @@ -839,6 +892,7 @@ dependencies = [ [[package]] name = "datadog-profiling-ffi" <<<<<<< HEAD +<<<<<<< HEAD version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= @@ -857,22 +911,27 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +======= +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) dependencies = [ "anyhow", "build_common", "datadog-profiling", - "ddcommon", - "ddcommon-ffi", "function_name", "futures", "http-body-util", "hyper", "libc", + "libdd-common", + "libdd-common-ffi", "serde_json", "tokio-util", ] [[package]] +<<<<<<< HEAD name = "datadog-profiling-protobuf" <<<<<<< HEAD version = "23.0.0" @@ -1128,8 +1187,16 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD >>>>>>> 37544fcdb0 (First commit) +<<<<<<< HEAD >>>>>>> 5dbc278ef2 (First commit) +======= +======= +======= +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) +>>>>>>> 29189767b5 (For testing with test tracer in staging) +>>>>>>> d4c329b287 (For testing with test tracer in staging) name = "ddtrace-native" version = "0.1.0" dependencies = [ @@ -1149,14 +1216,20 @@ dependencies = [ "libdd-profiling-ffi", ======= "cc", - "data-pipeline", "datadog-crashtracker", - "datadog-ddsketch", - "datadog-library-config", - "datadog-log", "datadog-profiling-ffi", +<<<<<<< HEAD "ddcommon", >>>>>>> 37544fcdb0 (First commit) +======= + "libc", + "libdd-common", + "libdd-common-ffi", + "libdd-data-pipeline", + "libdd-ddsketch", + "libdd-library-config", + "libdd-log", +>>>>>>> 29189767b5 (For testing with test tracer in staging) "pyo3", "pyo3-build-config", "pyo3-ffi", @@ -1174,9 +1247,15 @@ dependencies = [ [[package]] name = "deranged" +<<<<<<< HEAD version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a41953f86f8a05768a6cda24def994fd2f424b04ec5c719cf89989779f199071" +======= +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) dependencies = [ "powerfmt", ] @@ -1213,6 +1292,7 @@ dependencies = [ [[package]] <<<<<<< HEAD +<<<<<<< HEAD name = "displaydoc" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1225,8 +1305,12 @@ dependencies = [ [[package]] ======= +======= +>>>>>>> d4c329b287 (For testing with test tracer in staging) <<<<<<< HEAD ======= +======= +>>>>>>> 29189767b5 (For testing with test tracer in staging) name = "dogstatsd-client" <<<<<<< HEAD version = "23.0.0" @@ -1257,8 +1341,16 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD >>>>>>> 37544fcdb0 (First commit) +<<<<<<< HEAD >>>>>>> 5dbc278ef2 (First commit) +======= +======= +======= +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) +>>>>>>> 29189767b5 (For testing with test tracer in staging) +>>>>>>> d4c329b287 (For testing with test tracer in staging) name = "dunce" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1329,6 +1421,7 @@ dependencies = [ [[package]] name = "find-msvc-tools" <<<<<<< HEAD +<<<<<<< HEAD version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" @@ -1337,6 +1430,11 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959" >>>>>>> c21cdc9e2 (First commit) +======= +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) [[package]] name = "fnv" @@ -1859,9 +1957,15 @@ dependencies = [ [[package]] name = "js-sys" +<<<<<<< HEAD version = "0.3.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" +======= +version = "0.3.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) dependencies = [ "once_cell", "wasm-bindgen", @@ -1878,6 +1982,241 @@ name = "libc" version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" +<<<<<<< HEAD +======= + +[[package]] +name = "libdd-alloc" +version = "1.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +dependencies = [ + "allocator-api2", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "libdd-common" +version = "1.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +dependencies = [ + "anyhow", + "cc", + "const_format", + "futures", + "futures-core", + "futures-util", + "hex", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "libc", + "nix", + "pin-project", + "regex", + "rustls", + "rustls-native-certs", + "serde", + "static_assertions", + "thiserror", + "tokio", + "tokio-rustls", + "tower-service", + "windows-sys 0.52.0", +] + +[[package]] +name = "libdd-common-ffi" +version = "23.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +dependencies = [ + "anyhow", + "build_common", + "chrono", + "crossbeam-queue", + "hyper", + "libdd-common", + "serde", +] + +[[package]] +name = "libdd-data-pipeline" +version = "1.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +dependencies = [ + "anyhow", + "arc-swap", + "bytes", + "either", + "http", + "http-body-util", + "hyper", + "hyper-util", + "libdd-common", + "libdd-ddsketch", + "libdd-dogstatsd-client", + "libdd-telemetry", + "libdd-tinybytes", + "libdd-trace-protobuf", + "libdd-trace-stats", + "libdd-trace-utils", + "rmp-serde", + "serde", + "serde_json", + "sha2", + "tokio", + "tokio-util", + "tracing", + "uuid", +] + +[[package]] +name = "libdd-ddsketch" +version = "1.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +dependencies = [ + "prost", +] + +[[package]] +name = "libdd-dogstatsd-client" +version = "1.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +dependencies = [ + "anyhow", + "cadence", + "http", + "libdd-common", + "serde", + "tracing", +] + +[[package]] +name = "libdd-library-config" +version = "1.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +dependencies = [ + "anyhow", + "memfd", + "rand", + "rmp", + "rmp-serde", + "serde", + "serde_yaml", +] + +[[package]] +name = "libdd-log" +version = "1.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +dependencies = [ + "chrono", + "tracing", + "tracing-appender", + "tracing-subscriber", +] + +[[package]] +name = "libdd-profiling-protobuf" +version = "1.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +dependencies = [ + "prost", +] + +[[package]] +name = "libdd-telemetry" +version = "1.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +dependencies = [ + "anyhow", + "base64", + "futures", + "hashbrown 0.15.5", + "http", + "http-body-util", + "hyper", + "hyper-util", + "libc", + "libdd-common", + "libdd-ddsketch", + "serde", + "serde_json", + "sys-info", + "tokio", + "tokio-util", + "tracing", + "uuid", + "winver", +] + +[[package]] +name = "libdd-tinybytes" +version = "1.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +dependencies = [ + "serde", +] + +[[package]] +name = "libdd-trace-normalization" +version = "1.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +dependencies = [ + "anyhow", + "libdd-trace-protobuf", +] + +[[package]] +name = "libdd-trace-protobuf" +version = "1.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +dependencies = [ + "prost", + "serde", + "serde_bytes", +] + +[[package]] +name = "libdd-trace-stats" +version = "1.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +dependencies = [ + "hashbrown 0.15.5", + "libdd-ddsketch", + "libdd-trace-protobuf", + "libdd-trace-utils", +] + +[[package]] +name = "libdd-trace-utils" +version = "1.0.0" +source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +dependencies = [ + "anyhow", + "bytes", + "futures", + "http-body-util", + "hyper", + "indexmap", + "libdd-common", + "libdd-tinybytes", + "libdd-trace-normalization", + "libdd-trace-protobuf", + "prost", + "rand", + "rmp", + "rmp-serde", + "rmpv", + "serde", + "serde_json", + "tokio", + "tracing", +] +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) [[package]] name = "libdd-alloc" @@ -2220,10 +2559,25 @@ name = "log" version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +<<<<<<< HEAD dependencies = [ "serde", "value-bag", ] +======= +<<<<<<< HEAD +======= + +[[package]] +name = "lz4_flex" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a8cbbb2831780bc3b9c15a41f5b49222ef756b6730a95f3decfdd15903eb5a3" +dependencies = [ + "twox-hash", +] +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) +>>>>>>> d4c329b287 (For testing with test tracer in staging) [[package]] name = "lz4_flex" @@ -2540,9 +2894,15 @@ dependencies = [ [[package]] name = "proc-macro2" +<<<<<<< HEAD version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e0f6df8eaa422d97d72edcd152e1451618fed47fabbdbd5a8864167b1d4aff7" +======= +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) dependencies = [ "unicode-ident", ] @@ -2644,9 +3004,15 @@ dependencies = [ [[package]] name = "quote" +<<<<<<< HEAD version = "1.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" +======= +version = "1.0.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) dependencies = [ "proc-macro2", ] @@ -2795,9 +3161,15 @@ dependencies = [ [[package]] name = "rustls" +<<<<<<< HEAD version = "0.23.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a9586e9ee2b4f8fab52a0048ca7334d7024eef48e2cb9407e3497bb7cab7fa7" +======= +version = "0.23.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) dependencies = [ "aws-lc-rs", "once_cell", @@ -2822,18 +3194,24 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +checksum = "94182ad936a0c91c324cd46c6511b9510ed16af436d7b5bab34beab0afd55f7a" dependencies = [ "zeroize", ] [[package]] name = "rustls-webpki" +<<<<<<< HEAD version = "0.103.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e10b3f4191e8a80e6b43eebabfac91e5dcecebb27a71f04e820c47ec41d314bf" +======= +version = "0.103.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) dependencies = [ "aws-lc-rs", "ring", @@ -3228,9 +3606,15 @@ dependencies = [ [[package]] name = "syn" +<<<<<<< HEAD version = "2.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917" +======= +version = "2.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f17c7e013e88258aa9543dcbe81aca68a667a9ac37cd69c9fbc07858bfe0e2f" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) dependencies = [ "proc-macro2", "quote", @@ -3365,6 +3749,7 @@ dependencies = [ [[package]] <<<<<<< HEAD +<<<<<<< HEAD name = "tinystr" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3376,8 +3761,12 @@ dependencies = [ [[package]] ======= +======= +>>>>>>> d4c329b287 (For testing with test tracer in staging) <<<<<<< HEAD ======= +======= +>>>>>>> 29189767b5 (For testing with test tracer in staging) name = "tinybytes" <<<<<<< HEAD version = "23.0.0" @@ -3403,8 +3792,16 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD >>>>>>> 37544fcdb0 (First commit) +<<<<<<< HEAD >>>>>>> 5dbc278ef2 (First commit) +======= +======= +======= +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) +>>>>>>> 29189767b5 (For testing with test tracer in staging) +>>>>>>> d4c329b287 (For testing with test tracer in staging) name = "tokio" version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3442,9 +3839,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.16" +version = "0.7.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" +checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" dependencies = [ "bytes", "futures-core", @@ -3594,9 +3991,15 @@ checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" +<<<<<<< HEAD version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06" +======= +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) [[package]] name = "unicode-xid" @@ -3732,14 +4135,21 @@ dependencies = [ [[package]] name = "wasm-bindgen" +<<<<<<< HEAD version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" +======= +version = "0.2.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) dependencies = [ "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", +<<<<<<< HEAD "wasm-bindgen-shared", ] @@ -3754,14 +4164,22 @@ dependencies = [ "proc-macro2", "quote", "syn", +======= +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" +<<<<<<< HEAD version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" +======= +version = "0.2.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3769,22 +4187,34 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" +<<<<<<< HEAD version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" +======= +version = "0.2.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) dependencies = [ + "bumpalo", "proc-macro2", "quote", "syn", - "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" +<<<<<<< HEAD version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" +======= +version = "0.2.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) dependencies = [ "unicode-ident", ] diff --git a/src/native/crashtracker.rs b/src/native/crashtracker.rs index 5bf75d771ed..ab16d4f591e 100644 --- a/src/native/crashtracker.rs +++ b/src/native/crashtracker.rs @@ -322,66 +322,12 @@ pub fn crashtracker_receiver() -> anyhow::Result<()> { #[derive(Debug, PartialEq, Eq)] pub enum CallbackResult { Ok, - NullCallback, - UnknownError, + Error, } impl From for CallbackResult { - fn from(error: CallbackError) -> Self { - match error { - CallbackError::NullCallback => CallbackResult::NullCallback, - } - } -} - -/// Runtime-specific stack frame representation for FFI -/// -/// This struct is used to pass runtime stack frame information from language -/// runtimes to the crashtracker during crash handling. -#[pyclass(name = "RuntimeStackFrame", module = "datadog.internal._native")] -#[derive(Debug, Clone)] -pub struct RuntimeStackFramePy { - pub function_name: Option, - pub file_name: Option, - pub line_number: u32, - pub column_number: u32, -} - -#[pymethods] -impl RuntimeStackFramePy { - #[new] - fn new( - function_name: Option, - file_name: Option, - line_number: u32, - column_number: u32, - ) -> Self { - Self { - function_name, - file_name, - line_number, - column_number, - } - } - - #[getter] - fn get_function_name(&self) -> Option { - self.function_name.clone() - } - - #[getter] - fn get_file_name(&self) -> Option { - self.file_name.clone() - } - - #[getter] - fn get_line_number(&self) -> u32 { - self.line_number - } - - #[getter] - fn get_column_number(&self) -> u32 { - self.column_number + fn from(_error: CallbackError) -> Self { + CallbackResult::Error } } @@ -471,117 +417,6 @@ fn parse_traceback_line( 0 } -// Parse traceback text and emit frames -unsafe fn parse_and_emit_traceback( - traceback_text: &str, - emit_frame: unsafe extern "C" fn(*const RuntimeStackFrame), -) { - let lines: Vec<&str> = traceback_text.lines().collect(); - let mut frame_count = 0; - - for line in lines { - if frame_count >= MAX_FRAMES { - break; - } - - // Look for lines that start with " File " - these are stack frame lines - if line.trim_start().starts_with("File ") { - let mut function_buf = StackBuffer::new(); - let mut file_buf = StackBuffer::new(); - - let line_number = parse_traceback_line(line, &mut function_buf, &mut file_buf); - - let c_frame = RuntimeStackFrame { - function_name: function_buf.as_ptr(), - file_name: file_buf.as_ptr(), - line_number, - column_number: 0, - }; - - emit_frame(&c_frame); - frame_count += 1; - } - } -} - -unsafe fn dump_python_traceback_via_cpython_api( - emit_frame: unsafe extern "C" fn(*const RuntimeStackFrame), -) { - let mut pipefd: [c_int; 2] = [0, 0]; - if pipe(&mut pipefd as *mut [c_int; 2]) != 0 { - emit_fallback_frame(emit_frame, ""); - return; - } - - let read_fd = pipefd[0]; - let write_fd = pipefd[1]; - - // Make the read end non-blocking - fcntl(read_fd, F_SETFL, O_NONBLOCK); - - // Get the current thread state safely - same approach as CPython's faulthandler - // SIGSEGV, SIGFPE, SIGABRT, SIGBUS and SIGILL are synchronous signals and - // are thus delivered to the thread that caused the fault. - let current_tstate = crashtracker_get_current_tstate(); - - // Call the CPython internal API via our C wrapper - // Pass NULL for interpreter state since _Py_DumpTracebackThreads handle it internally - let error_msg = crashtracker_dump_traceback_threads(write_fd, ptr::null_mut(), current_tstate); - - close(write_fd); - - if !error_msg.is_null() { - close(read_fd); - let error_str = std::ffi::CStr::from_ptr(error_msg); - if let Ok(error_string) = error_str.to_str() { - emit_fallback_frame(emit_frame, error_string); - } else { - emit_fallback_frame(emit_frame, ""); - } - return; - } - - let mut buffer = vec![0u8; MAX_TRACEBACK_SIZE]; - let bytes_read = read( - read_fd, - buffer.as_mut_ptr() as *mut c_void, - MAX_TRACEBACK_SIZE, - ); - - close(read_fd); - - if bytes_read > 0 { - buffer.truncate(bytes_read as usize); - if let Ok(traceback_text) = std::str::from_utf8(&buffer) { - parse_and_emit_traceback(traceback_text, emit_frame); - return; - } - } - - // If we get here, something went wrong with reading the output - emit_fallback_frame(emit_frame, ""); -} - -// Helper function to emit a fallback frame with error information -unsafe fn emit_fallback_frame( - emit_frame: unsafe extern "C" fn(*const RuntimeStackFrame), - error_msg: &str, -) { - let mut function_buf = StackBuffer::new(); - let mut file_buf = StackBuffer::new(); - function_buf.set_from_str(error_msg); - file_buf.set_from_str(""); - - let fallback_frame = RuntimeStackFrame { - function_name: function_buf.as_ptr(), - file_name: file_buf.as_ptr(), - line_number: 0, - column_number: 0, - }; - - emit_frame(&fallback_frame); -} - /// Dump Python traceback as a complete string /// /// This function captures the Python traceback via CPython's internal API @@ -645,30 +480,42 @@ unsafe fn dump_python_traceback_as_string( } unsafe extern "C" fn native_runtime_stack_callback( - _emit_frame: unsafe extern "C" fn(*const RuntimeStackFrame), emit_stacktrace_string: unsafe extern "C" fn(*const c_char), ) { dump_python_traceback_as_string(emit_stacktrace_string); - // dump_python_traceback_via_cpython_api(emit_frame); } -/// Register the native runtime stack collection callback +/// Frame-based callback implementation for runtime stack collection +/// +/// This callback collects Python stack frames individually and emits them +/// one by one for detailed stack trace information. +// unsafe extern "C" fn native_runtime_frame_callback( +// emit_frame: unsafe extern "C" fn(*const RuntimeStackFrame), +// ) { +// dump_python_traceback_via_cpython_api(emit_frame); +// } + +/// Register the native runtime stack collection callback (string-based) /// /// This function registers a native callback that directly collects Python runtime -/// stack traces without requiring Python callback functions. It uses frame-by-frame -/// collection for detailed stack information. +/// stack traces as complete strings without requiring Python callback functions. /// /// # Returns /// - `CallbackResult::Ok` if registration succeeds (replaces any existing callback) #[pyfunction(name = "crashtracker_register_native_runtime_callback")] pub fn crashtracker_register_native_runtime_callback() -> CallbackResult { - match register_runtime_stack_callback( + match register_runtime_stacktrace_string_callback( native_runtime_stack_callback, - CallbackType::StacktraceString, ) { Ok(()) => CallbackResult::Ok, Err(e) => e.into(), } + // match register_runtime_frame_callback( + // native_runtime_frame_callback, + // ) { + // Ok(()) => CallbackResult::Ok, + // Err(e) => e.into(), + // } } /// Check if a runtime callback is currently registered diff --git a/src/native/data_pipeline/mod.rs b/src/native/data_pipeline/mod.rs index 3fcba76ce0f..5e258ec9ffc 100644 --- a/src/native/data_pipeline/mod.rs +++ b/src/native/data_pipeline/mod.rs @@ -148,11 +148,22 @@ impl TraceExporterBuilderPy { heartbeat_ms: u64, runtime_id: String, ) -> PyResult> { +<<<<<<< HEAD slf.try_as_mut()?.enable_telemetry(TelemetryConfig { heartbeat: heartbeat_ms, runtime_id: Some(runtime_id), debug_enabled: true, }); +======= + slf.try_as_mut()?.enable_telemetry( + Some(TelemetryConfig { + heartbeat: heartbeat_ms, + runtime_id: Some(runtime_id), + debug_enabled: true, + }) + .unwrap(), + ); +>>>>>>> a9f39cbc4 (For testing with test tracer in staging) Ok(slf.into()) } diff --git a/src/native/lib.rs b/src/native/lib.rs index 583b23b4a14..634d03920c2 100644 --- a/src/native/lib.rs +++ b/src/native/lib.rs @@ -27,7 +27,6 @@ fn _native(m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_class::()?; m.add_class::()?; m.add_class::()?; - m.add_class::()?; m.add_function(wrap_pyfunction!(crashtracker::crashtracker_init, m)?)?; m.add_function(wrap_pyfunction!(crashtracker::crashtracker_on_fork, m)?)?; m.add_function(wrap_pyfunction!(crashtracker::crashtracker_status, m)?)?; From a2f8946d783c3f8536b0457d28d5d4a5a763ee8f Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Thu, 2 Oct 2025 19:35:19 +0000 Subject: [PATCH 06/21] First commit --- experimental_debug_string_dump.json | 2 +- src/native/Cargo.lock | 132 ++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+), 1 deletion(-) diff --git a/experimental_debug_string_dump.json b/experimental_debug_string_dump.json index f3632e3e6ac..bfa7eadc840 100644 --- a/experimental_debug_string_dump.json +++ b/experimental_debug_string_dump.json @@ -4,4 +4,4 @@ "format": "Datadog Runtime Callback 1.0", "stacktrace_string": "Current thread 0x00007d47f96dfb80 (most recent call first):\n File \"/home/bits/.pyenv/versions/3.11.13/lib/python3.11/ctypes/__init__.py\", line 519 in string_at\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 724 in func16\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 721 in func15\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 718 in func14\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 715 in func13\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 712 in func12\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 709 in func11\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 706 in func10\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 703 in func9\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 700 in func8\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 697 in func7\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 694 in func6\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 691 in func5\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 688 in func4\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 685 in func3\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 682 in func2\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 679 in func1\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 734 in \n" } -} \ No newline at end of file +} diff --git a/src/native/Cargo.lock b/src/native/Cargo.lock index ae07fcdb377..011ae3b7fc4 100644 --- a/src/native/Cargo.lock +++ b/src/native/Cargo.lock @@ -218,12 +218,18 @@ dependencies = [ name = "build_common" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD version = "24.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v24.0.0#3445414c9ba4fefc76be46cf7e2f998986592892" ======= ======= >>>>>>> 29189767b5 (For testing with test tracer in staging) <<<<<<< HEAD +======= +<<<<<<< HEAD +======= +>>>>>>> c504f6a0ae (First commit) +>>>>>>> 84fe6f9ff2 (First commit) version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= @@ -231,6 +237,7 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) <<<<<<< HEAD @@ -258,7 +265,14 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +<<<<<<< HEAD >>>>>>> 29189767b5 (For testing with test tracer in staging) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> c504f6a0ae (First commit) +>>>>>>> 84fe6f9ff2 (First commit) dependencies = [ "cbindgen", "serde", @@ -315,6 +329,9 @@ dependencies = [ name = "cc" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> c504f6a0ae (First commit) version = "1.2.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac9fe6cdbb24b6ade63616c0a0688e45bb56732262c158df3c0c4bea4ca47cb7" @@ -323,11 +340,14 @@ version = "1.2.39" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1354349954c6fc9cb0deab020f27f783cf0b604e8bb754dc4658ecf0d29c35f" >>>>>>> c21cdc9e2 (First commit) +<<<<<<< HEAD ======= version = "1.2.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35900b6c8d709fb1d854671ae27aeaa9eec2f8b01b364e1619a40da3e6fe2afe" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +>>>>>>> c504f6a0ae (First commit) dependencies = [ "find-msvc-tools", "jobserver", @@ -338,10 +358,17 @@ dependencies = [ [[package]] <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= name = "cc_utils" version = "0.1.0" source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" +======= +======= +name = "cc_utils" +version = "0.1.0" +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c504f6a0ae (First commit) dependencies = [ "anyhow", "cc", @@ -349,8 +376,11 @@ dependencies = [ [[package]] >>>>>>> c21cdc9e2 (First commit) +<<<<<<< HEAD ======= >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +>>>>>>> c504f6a0ae (First commit) name = "cexpr" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -628,6 +658,7 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -639,6 +670,10 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> c504f6a0ae (First commit) dependencies = [ "anyhow", "arc-swap", @@ -676,6 +711,7 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -687,6 +723,10 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> c504f6a0ae (First commit) dependencies = [ "allocator-api2", "libc", @@ -703,6 +743,7 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -719,6 +760,10 @@ name = "datadog-crashtracker" version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> c504f6a0ae (First commit) dependencies = [ "anyhow", "backtrace", @@ -758,6 +803,7 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -769,6 +815,10 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> c504f6a0ae (First commit) dependencies = [ "prost", ] @@ -780,10 +830,14 @@ version = "0.0.2" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> c504f6a0ae (First commit) source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) @@ -793,6 +847,8 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +======= +>>>>>>> c504f6a0ae (First commit) dependencies = [ "anyhow", "memfd", @@ -813,6 +869,7 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -824,6 +881,10 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> c504f6a0ae (First commit) dependencies = [ "chrono", "tracing", @@ -837,6 +898,9 @@ dependencies = [ name = "datadog-profiling" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> c504f6a0ae (First commit) version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= @@ -844,6 +908,7 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -859,6 +924,10 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> c504f6a0ae (First commit) dependencies = [ "anyhow", "bitmaps", @@ -893,6 +962,9 @@ dependencies = [ name = "datadog-profiling-ffi" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> c504f6a0ae (First commit) version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= @@ -900,6 +972,7 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -915,6 +988,10 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 version = "23.0.0" source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> c504f6a0ae (First commit) dependencies = [ "anyhow", "build_common", @@ -941,6 +1018,7 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -952,6 +1030,10 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> c504f6a0ae (First commit) dependencies = [ "prost", ] @@ -966,6 +1048,7 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -977,6 +1060,10 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> c504f6a0ae (First commit) dependencies = [ "anyhow", "datadog-trace-protobuf", @@ -992,6 +1079,7 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -1003,6 +1091,10 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> c504f6a0ae (First commit) dependencies = [ "prost", "serde", @@ -1030,6 +1122,7 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -1041,6 +1134,10 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> c504f6a0ae (First commit) dependencies = [ "anyhow", "bytes", @@ -1072,6 +1169,7 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -1083,6 +1181,10 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> c504f6a0ae (First commit) dependencies = [ "anyhow", "cc", @@ -1122,6 +1224,7 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -1133,6 +1236,10 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> c504f6a0ae (First commit) dependencies = [ "anyhow", "build_common", @@ -1153,6 +1260,7 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -1164,6 +1272,10 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> c504f6a0ae (First commit) dependencies = [ "anyhow", "base64", @@ -1216,6 +1328,10 @@ dependencies = [ "libdd-profiling-ffi", ======= "cc", +<<<<<<< HEAD +======= + "data-pipeline", +>>>>>>> c504f6a0ae (First commit) "datadog-crashtracker", "datadog-profiling-ffi", <<<<<<< HEAD @@ -1320,6 +1436,7 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -1331,6 +1448,10 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> c504f6a0ae (First commit) dependencies = [ "anyhow", "cadence", @@ -1422,6 +1543,9 @@ dependencies = [ name = "find-msvc-tools" <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> c504f6a0ae (First commit) version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" @@ -1430,11 +1554,14 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959" >>>>>>> c21cdc9e2 (First commit) +<<<<<<< HEAD ======= version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +>>>>>>> c504f6a0ae (First commit) [[package]] name = "fnv" @@ -3776,6 +3903,7 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= @@ -3787,6 +3915,10 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" +>>>>>>> c21cdc9e2 (First commit) +>>>>>>> c504f6a0ae (First commit) dependencies = [ "serde", ] From 771aca7bdfc993bc3015d3dadca4f8342dbd1e62 Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Fri, 3 Oct 2025 18:35:07 +0000 Subject: [PATCH 07/21] Dont send runtime id --- src/native/Cargo.lock | 120 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) diff --git a/src/native/Cargo.lock b/src/native/Cargo.lock index 011ae3b7fc4..0238f0ad645 100644 --- a/src/native/Cargo.lock +++ b/src/native/Cargo.lock @@ -238,6 +238,9 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) <<<<<<< HEAD @@ -247,9 +250,12 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 18ab8f7639 (Dont send runtime id) ======= ======= +>>>>>>> 589b51b5e3 (Dont send runtime id) +======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) <<<<<<< HEAD @@ -272,7 +278,12 @@ source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda3 source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) >>>>>>> c504f6a0ae (First commit) +<<<<<<< HEAD >>>>>>> 84fe6f9ff2 (First commit) +======= +======= +>>>>>>> 0926d25de8 (Dont send runtime id) +>>>>>>> 589b51b5e3 (Dont send runtime id) dependencies = [ "cbindgen", "serde", @@ -367,8 +378,12 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 ======= name = "cc_utils" version = "0.1.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c504f6a0ae (First commit) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "anyhow", "cc", @@ -659,11 +674,15 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -674,6 +693,8 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "anyhow", "arc-swap", @@ -712,11 +733,15 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -727,6 +752,8 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "allocator-api2", "libc", @@ -744,11 +771,15 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -764,6 +795,8 @@ source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda3 source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "anyhow", "backtrace", @@ -804,11 +837,15 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -819,6 +856,8 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "prost", ] @@ -831,13 +870,17 @@ version = "0.0.2" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) <<<<<<< HEAD +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) @@ -849,6 +892,11 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) ======= >>>>>>> c504f6a0ae (First commit) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" +>>>>>>> 637f39e5e (Dont send runtime id) +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "anyhow", "memfd", @@ -870,11 +918,15 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -885,6 +937,8 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "chrono", "tracing", @@ -909,11 +963,15 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -928,6 +986,8 @@ source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda3 source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "anyhow", "bitmaps", @@ -973,11 +1033,15 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -992,6 +1056,8 @@ source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda3 source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "anyhow", "build_common", @@ -1019,11 +1085,15 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -1034,6 +1104,8 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "prost", ] @@ -1049,11 +1121,15 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -1064,6 +1140,8 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "anyhow", "datadog-trace-protobuf", @@ -1080,11 +1158,15 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -1095,6 +1177,8 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "prost", "serde", @@ -1123,11 +1207,15 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -1138,6 +1226,8 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "anyhow", "bytes", @@ -1170,11 +1260,15 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -1185,6 +1279,8 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "anyhow", "cc", @@ -1225,11 +1321,15 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -1240,6 +1340,8 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "anyhow", "build_common", @@ -1261,11 +1363,15 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -1276,6 +1382,8 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "anyhow", "base64", @@ -1437,11 +1545,15 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -1452,6 +1564,8 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "anyhow", "cadence", @@ -3904,11 +4018,15 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 0926d25de8 (Dont send runtime id) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -3919,6 +4037,8 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 0926d25de8 (Dont send runtime id) dependencies = [ "serde", ] From af2118f5a0e9efe7257bc16624a6084a5195998b Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Mon, 6 Oct 2025 13:39:04 +0000 Subject: [PATCH 08/21] No writer context exposed --- src/native/Cargo.lock | 168 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) diff --git a/src/native/Cargo.lock b/src/native/Cargo.lock index 0238f0ad645..fe371e09eaa 100644 --- a/src/native/Cargo.lock +++ b/src/native/Cargo.lock @@ -239,8 +239,11 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) <<<<<<< HEAD @@ -251,11 +254,14 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 18ab8f7639 (Dont send runtime id) ======= ======= >>>>>>> 589b51b5e3 (Dont send runtime id) ======= +>>>>>>> c73beccb21 (No writer context exposed) +======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) <<<<<<< HEAD @@ -283,7 +289,15 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e ======= ======= >>>>>>> 0926d25de8 (Dont send runtime id) +<<<<<<< HEAD >>>>>>> 589b51b5e3 (Dont send runtime id) +======= +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 3733ebd6ab (No writer context exposed) +>>>>>>> c73beccb21 (No writer context exposed) dependencies = [ "cbindgen", "serde", @@ -373,6 +387,7 @@ dependencies = [ ======= name = "cc_utils" version = "0.1.0" +<<<<<<< HEAD source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ======= ======= @@ -384,6 +399,9 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 0926d25de8 (Dont send runtime id) +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "anyhow", "cc", @@ -675,14 +693,18 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -695,6 +717,11 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e >>>>>>> c504f6a0ae (First commit) ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "anyhow", "arc-swap", @@ -734,14 +761,18 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -754,6 +785,11 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e >>>>>>> c504f6a0ae (First commit) ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "allocator-api2", "libc", @@ -772,14 +808,18 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -797,6 +837,11 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e >>>>>>> c504f6a0ae (First commit) ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "anyhow", "backtrace", @@ -838,14 +883,18 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -858,6 +907,11 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e >>>>>>> c504f6a0ae (First commit) ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "prost", ] @@ -871,10 +925,13 @@ version = "0.0.2" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> c504f6a0ae (First commit) ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" ======= source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" @@ -887,6 +944,7 @@ source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc569941 ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" >>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) @@ -897,6 +955,8 @@ source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de62 source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "anyhow", "memfd", @@ -919,14 +979,18 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -939,6 +1003,11 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e >>>>>>> c504f6a0ae (First commit) ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "chrono", "tracing", @@ -964,14 +1033,18 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -988,6 +1061,11 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e >>>>>>> c504f6a0ae (First commit) ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "anyhow", "bitmaps", @@ -1034,14 +1112,18 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -1058,6 +1140,11 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e >>>>>>> c504f6a0ae (First commit) ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "anyhow", "build_common", @@ -1086,14 +1173,18 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -1106,6 +1197,11 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e >>>>>>> c504f6a0ae (First commit) ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "prost", ] @@ -1122,14 +1218,18 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -1142,6 +1242,11 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e >>>>>>> c504f6a0ae (First commit) ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "anyhow", "datadog-trace-protobuf", @@ -1159,14 +1264,18 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -1179,6 +1288,11 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e >>>>>>> c504f6a0ae (First commit) ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "prost", "serde", @@ -1208,14 +1322,18 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -1228,6 +1346,11 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e >>>>>>> c504f6a0ae (First commit) ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "anyhow", "bytes", @@ -1261,14 +1384,18 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -1281,6 +1408,11 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e >>>>>>> c504f6a0ae (First commit) ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "anyhow", "cc", @@ -1322,14 +1454,18 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -1342,6 +1478,11 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e >>>>>>> c504f6a0ae (First commit) ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "anyhow", "build_common", @@ -1364,14 +1505,18 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -1384,6 +1529,11 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e >>>>>>> c504f6a0ae (First commit) ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "anyhow", "base64", @@ -1546,14 +1696,18 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -1566,6 +1720,11 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e >>>>>>> c504f6a0ae (First commit) ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "anyhow", "cadence", @@ -4019,14 +4178,18 @@ version = "21.0.0" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +>>>>>>> 3733ebd6ab (No writer context exposed) source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" >>>>>>> c21cdc9e2 (First commit) ======= source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" >>>>>>> 637f39e5e (Dont send runtime id) <<<<<<< HEAD +<<<<<<< HEAD ======= source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" >>>>>>> fe974f6b2 (No writer context exposed) @@ -4039,6 +4202,11 @@ source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e >>>>>>> c504f6a0ae (First commit) ======= >>>>>>> 0926d25de8 (Dont send runtime id) +======= +======= +source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" +>>>>>>> fe974f6b2 (No writer context exposed) +>>>>>>> 3733ebd6ab (No writer context exposed) dependencies = [ "serde", ] From e19c7e908cb9b4b5bd3a78f47f945a366ef6e8a2 Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Thu, 13 Nov 2025 18:24:50 +0000 Subject: [PATCH 09/21] Runtime stacks now in main libdd --- ddtrace/internal/core/crashtracking.py | 17 - ddtrace/internal/native/_native.pyi | 61 --- experimental_debug_string_dump.json | 7 - ...t-runtime-stacktrace-45815b6eecdc317b.yaml | 3 + src/native/Cargo.lock | 449 ++++++++++++++++++ src/native/Cargo.toml | 9 +- src/native/crashtracker.rs | 162 +------ src/native/data_pipeline/mod.rs | 11 - src/native/library_config.rs | 5 - .../crashtracker/test_crashtracker.py | 85 ---- 10 files changed, 483 insertions(+), 326 deletions(-) delete mode 100644 experimental_debug_string_dump.json create mode 100644 releasenotes/notes/crashtracker-emit-runtime-stacktrace-45815b6eecdc317b.yaml diff --git a/ddtrace/internal/core/crashtracking.py b/ddtrace/internal/core/crashtracking.py index 921e858d51d..d932855aee3 100644 --- a/ddtrace/internal/core/crashtracking.py +++ b/ddtrace/internal/core/crashtracking.py @@ -166,7 +166,6 @@ def start(additional_tags: Optional[Dict[str, str]] = None) -> bool: # Shouldn't block on this, but log an error if it fails if result != CallbackResult.Ok: print(f"Failed to register runtime callback: {result}", file=sys.stderr) - return False def crashtracker_fork_handler(): # We recreate the args here mainly to pass updated runtime_id after @@ -188,16 +187,6 @@ def crashtracker_fork_handler(): def register_runtime_callback() -> bool: - """ - Register the native runtime callback for stack collection during crashes. - - This should be called after crashtracker initialization to enable Python - runtime stack trace collection in crash reports. The callback provides - frame-by-frame Python stack traces with proper context information. - - Returns: - bool: True if callback was registered successfully, False otherwise - """ if not is_available: return False @@ -210,12 +199,6 @@ def register_runtime_callback() -> bool: def is_runtime_callback_registered() -> bool: - """ - Check if a runtime callback is currently registered. - - Returns: - bool: True if a callback is registered, False otherwise - """ if not is_available: return False diff --git a/ddtrace/internal/native/_native.pyi b/ddtrace/internal/native/_native.pyi index 65a9e4e01bd..cc94cc37621 100644 --- a/ddtrace/internal/native/_native.pyi +++ b/ddtrace/internal/native/_native.pyi @@ -5,7 +5,6 @@ from typing import List from typing import Literal from typing import Optional - class DDSketch: def __init__(self): ... def add(self, value: float) -> None: ... @@ -13,7 +12,6 @@ class DDSketch: @property def count(self) -> float: ... - class PyConfigurator: """ PyConfigurator is a class responsible for configuring the Python environment @@ -27,21 +25,18 @@ class PyConfigurator: :param debug_logs: A boolean indicating whether debug logs should be enabled. """ ... - def set_local_file_override(self, file: str) -> None: """ Overrides the local file path for the configuration. Should not be used outside of tests. :param file: The path to the local file to override. """ ... - def set_managed_file_override(self, file: str) -> None: """ Overrides the managed file path for the configuration. Should not be used outside of tests. :param file: The path to the managed file to override. """ ... - def get_configuration(self) -> List[Dict[str, str]]: """ Retrieve the on-disk configuration. @@ -49,7 +44,6 @@ class PyConfigurator: [{"source": ..., "key": ..., "value": ..., "config_id": ...}] """ ... - @property def local_stable_config_type(self) -> str: """ @@ -57,7 +51,6 @@ class PyConfigurator: :return: A string representing the local stable configuration type. """ ... - @property def fleet_stable_config_type(self) -> str: """ @@ -66,14 +59,12 @@ class PyConfigurator: """ ... - class StacktraceCollection: Disabled: "StacktraceCollection" WithoutSymbols: "StacktraceCollection" EnabledWithInprocessSymbols: "StacktraceCollection" EnabledWithSymbolsInReceiver: "StacktraceCollection" - class CrashtrackerConfiguration: def __init__( self, @@ -86,7 +77,6 @@ class CrashtrackerConfiguration: unix_socket_path: Optional[str], ): ... - class CrashtrackerReceiverConfig: def __init__( self, @@ -97,28 +87,21 @@ class CrashtrackerReceiverConfig: stdout_filename: Optional[str], ): ... - class CrashtrackerMetadata: def __init__(self, library_name: str, library_version: str, family: str, tags: Dict[str, str]): ... - class CrashtrackerStatus: NotInitialized: "CrashtrackerStatus" Initialized: "CrashtrackerStatus" FailedToInitialize: "CrashtrackerStatus" - class CallbackResult: Ok: "CallbackResult" - NullCallback: "CallbackResult" UnknownError: "CallbackResult" - def crashtracker_init( config: CrashtrackerConfiguration, receiver_config: CrashtrackerReceiverConfig, metadata: CrashtrackerMetadata ) -> None: ... - - def crashtracker_on_fork( config: CrashtrackerConfiguration, receiver_config: CrashtrackerReceiverConfig, metadata: CrashtrackerMetadata ) -> None: ... @@ -127,7 +110,6 @@ def crashtracker_receiver() -> None: ... def crashtracker_register_native_runtime_callback() -> CallbackResult: ... def crashtracker_is_runtime_callback_registered() -> bool: ... - class PyTracerMetadata: """ Stores the configuration settings for the Tracer. @@ -158,7 +140,6 @@ class PyTracerMetadata: """ ... - class PyAnonymousFileHandle: """ Represents an anonymous file handle. @@ -167,7 +148,6 @@ class PyAnonymousFileHandle: def __init__(self): ... - def store_metadata(data: PyTracerMetadata) -> PyAnonymousFileHandle: """ Create an anonymous file storing the tracer configuration. @@ -175,7 +155,6 @@ def store_metadata(data: PyTracerMetadata) -> PyAnonymousFileHandle: """ ... - class TraceExporter: """ TraceExporter is a class responsible for exporting traces to the Agent. @@ -186,7 +165,6 @@ class TraceExporter: Initialize a TraceExporter. """ ... - def send(self, data: bytes, trace_count: int) -> str: """ Send a trace payload to the Agent. @@ -194,7 +172,6 @@ class TraceExporter: :param trace_count: The number of traces in the data payload. """ ... - def shutdown(self, timeout_ns: int) -> None: """ Shutdown the TraceExporter, releasing any resources and ensuring all pending stats are sent. @@ -202,13 +179,11 @@ class TraceExporter: :param timeout_ns: The maximum time to wait for shutdown in nanoseconds. """ ... - def drop(self) -> None: """ Drop the TraceExporter, releasing any resources without sending pending stats. """ ... - def run_worker(self) -> None: """ Start the rust worker threads. @@ -217,7 +192,6 @@ class TraceExporter: this method can be used to start the runtime before sending any traces. """ ... - def stop_worker(self) -> None: """ Stop the rust worker threads. @@ -226,7 +200,6 @@ class TraceExporter: when calling `send`. """ ... - def debug(self) -> str: """ Returns a string representation of the exporter. @@ -234,7 +207,6 @@ class TraceExporter: """ ... - class TraceExporterBuilder: """ TraceExporterBuilder is a class responsible for building a TraceExporter. @@ -245,98 +217,84 @@ class TraceExporterBuilder: Initialize a TraceExporterBuilder. """ ... - def set_hostname(self, hostname: str) -> TraceExporterBuilder: """ Set the hostname of the TraceExporter. :param hostname: The hostname to set for the TraceExporter. """ ... - def set_url(self, url: str) -> TraceExporterBuilder: """ Set the agent url of the TraceExporter. :param url: The URL of the agent to send traces to. """ ... - def set_dogstatsd_url(self, url: str) -> TraceExporterBuilder: """ Set the DogStatsD URL of the TraceExporter. :param url: The URL of the DogStatsD endpoint. """ ... - def set_env(self, env: str) -> TraceExporterBuilder: """ Set the env of the TraceExporter. :param env: The environment name (e.g., 'prod', 'staging', 'dev'). """ ... - def set_app_version(self, version: str) -> TraceExporterBuilder: """ Set the app version of the TraceExporter. :param version: The version string of the application. """ ... - def set_service(self, service: str) -> TraceExporterBuilder: """ Set the service name of the TraceExporter. :param version: The version string of the application. """ ... - def set_git_commit_sha(self, git_commit_sha: str) -> TraceExporterBuilder: """ Set the git commit sha of the TraceExporter. :param git_commit_sha: The git commit SHA of the current code version. """ ... - def set_tracer_version(self, version: str) -> TraceExporterBuilder: """ Set the tracer version of the TraceExporter. :param version: The version string of the tracer. """ ... - def set_language(self, language: str) -> TraceExporterBuilder: """ Set the language of the TraceExporter. :param language: The programming language being traced (e.g., 'python'). """ ... - def set_language_version(self, version: str) -> TraceExporterBuilder: """ Set the language version of the TraceExporter. :param version: The version string of the programming language. """ ... - def set_language_interpreter(self, interpreter: str) -> TraceExporterBuilder: """ Set the language interpreter of the TraceExporter. :param vendor: The language interpreter. """ ... - def set_language_interpreter_vendor(self, vendor: str) -> TraceExporterBuilder: """ Set the language interpreter vendor of the TraceExporter. :param vendor: The vendor of the language interpreter. """ ... - def set_test_session_token(self, token: str) -> TraceExporterBuilder: """ Set the test session token for the TraceExporter. :param token: The test session token to use for authentication. """ ... - def set_input_format(self, input_format: str) -> TraceExporterBuilder: """ Set the input format for the trace data. @@ -344,7 +302,6 @@ class TraceExporterBuilder: :raises ValueError: If input_format is not a supported value. """ ... - def set_output_format(self, output_format: str) -> TraceExporterBuilder: """ Set the output format for the trace data. @@ -352,13 +309,11 @@ class TraceExporterBuilder: :raises ValueError: If output_format is not a supported value. """ ... - def set_client_computed_top_level(self) -> TraceExporterBuilder: """ Set the header indicating the tracer has computed the top-level tag """ ... - def set_client_computed_stats(self) -> TraceExporterBuilder: """ Set the header indicating the tracer has already computed stats. @@ -366,14 +321,12 @@ class TraceExporterBuilder: The main use is to opt-out trace metrics. """ ... - def enable_stats(self, bucket_size_ns: int) -> TraceExporterBuilder: """ Enable stats computation in the TraceExporter :param bucket_size_ns: The size of stats bucket in nanoseconds. """ ... - def enable_telemetry( self, heartbeat_ms: int, @@ -385,13 +338,11 @@ class TraceExporterBuilder: :param runtime_id: The runtime id to use for telemetry. """ ... - def enable_health_metrics(self) -> TraceExporterBuilder: """ Enable health metrics in the TraceExporter """ ... - def build(self) -> TraceExporter: """ Build and return a TraceExporter instance with the configured settings. @@ -400,7 +351,6 @@ class TraceExporterBuilder: :raises ValueError: If the builder has already been consumed or if required settings are missing. """ ... - def debug(self) -> str: """ Returns a string representation of the exporter. @@ -408,7 +358,6 @@ class TraceExporterBuilder: """ ... - class AgentError(Exception): """ Raised when there is an error in agent response processing. @@ -416,7 +365,6 @@ class AgentError(Exception): ... - class BuilderError(Exception): """ Raised when there is an error in the TraceExporterBuilder configuration. @@ -424,7 +372,6 @@ class BuilderError(Exception): ... - class logger: """ Native logging module for configuring and managing log output. @@ -447,7 +394,6 @@ class logger: :raises ValueError: If configuration is invalid """ ... - @staticmethod def disable(output: str) -> None: """ @@ -457,7 +403,6 @@ class logger: :raises ValueError: If output type is invalid """ ... - @staticmethod def set_log_level(level: str) -> None: """ @@ -467,7 +412,6 @@ class logger: :raises ValueError: If log level is invalid """ ... - @staticmethod def log(level: str, message: str) -> None: """ @@ -479,7 +423,6 @@ class logger: """ ... - class DeserializationError(Exception): """ Raised when there is an error deserializing trace payload. @@ -487,7 +430,6 @@ class DeserializationError(Exception): ... - class IoError(Exception): """ Raised when there is an I/O error during trace processing. @@ -495,7 +437,6 @@ class IoError(Exception): ... - class NetworkError(Exception): """ Raised when there is a network-related error during trace processing. @@ -503,7 +444,6 @@ class NetworkError(Exception): ... - class RequestError(Exception): """ Raised when the agent responds with an error code. @@ -511,7 +451,6 @@ class RequestError(Exception): ... - class SerializationError(Exception): """ Raised when there is an error serializing trace payload. diff --git a/experimental_debug_string_dump.json b/experimental_debug_string_dump.json deleted file mode 100644 index bfa7eadc840..00000000000 --- a/experimental_debug_string_dump.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "ucontext": "ucontext_t { uc_flags: 7, uc_link: 0x0, uc_stack: stack_t { ss_sp: 0x7d47f6ab1000, ss_flags: 0, ss_size: 65536 }, uc_mcontext: mcontext_t { gregs: [0, 137748083470906, 0, 137748077901248, 140733932737568, 140733932737776, 1, 0, 0, -1, 0, 4294967295, 137748077956232, 0, 140733932736872, 140733932737080, 137748083280344, 66179, 12103423998558259, 4, 14, 0, 0], fpregs: 0x7d47f6ac0540, __private: [0, 0, 0, 0, 0, 0, 0, 0] }, uc_sigmask: sigset_t { __val: [0, 11, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, __private: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 31, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 116, 0, 111, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 114, 0, 0, 0, 0, 0, 99, 0, 111, 0, 0, 0, 0, 0, 105, 0, 101, 0, 111, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, 0, 0, 99, 0, 0, 0, 104, 0, 0, 0, 32, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 111, 0, 0, 0, 114, 0, 0, 0, 32, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 128, 199, 48, 49, 93, 136, 85, 59, 0, 0, 0, 0, 0, 0, 0, 0, 100, 171, 99, 130, 7, 91, 229, 191, 0, 0, 0, 0, 0, 0, 0, 0, 27, 99, 108, 213, 49, 161, 233, 63, 0, 0, 0, 0, 0, 0, 0, 0, 233, 69, 72, 155, 91, 73, 242, 191, 0, 0, 0, 0, 0, 0, 0, 0, 114, 80, 10, 129, 29, 85, 72, 118, 32, 158, 186, 131, 29, 108, 202, 57, 158, 113, 33, 218, 47, 97, 208, 210, 15, 69, 56, 139, 73, 158, 226, 210, 135, 124, 244, 136, 152, 194, 37, 192, 239, 189, 60, 162, 184, 0, 247, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 88, 80, 70, 140, 10, 0, 0, 255, 2, 0, 0, 0, 0, 0, 0, 136, 10, 0, 0, 0, 0, 0, 0] }", - "runtime_stack": { - "format": "Datadog Runtime Callback 1.0", - "stacktrace_string": "Current thread 0x00007d47f96dfb80 (most recent call first):\n File \"/home/bits/.pyenv/versions/3.11.13/lib/python3.11/ctypes/__init__.py\", line 519 in string_at\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 724 in func16\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 721 in func15\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 718 in func14\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 715 in func13\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 712 in func12\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 709 in func11\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 706 in func10\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 703 in func9\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 700 in func8\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 697 in func7\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 694 in func6\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 691 in func5\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 688 in func4\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 685 in func3\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 682 in func2\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 679 in func1\n File \"tests/internal/crashtracker/test_crashtracker.py\", line 734 in \n" - } -} diff --git a/releasenotes/notes/crashtracker-emit-runtime-stacktrace-45815b6eecdc317b.yaml b/releasenotes/notes/crashtracker-emit-runtime-stacktrace-45815b6eecdc317b.yaml new file mode 100644 index 00000000000..99819e6977f --- /dev/null +++ b/releasenotes/notes/crashtracker-emit-runtime-stacktrace-45815b6eecdc317b.yaml @@ -0,0 +1,3 @@ +features: + - | + Crashtracker: Allows for the collection of runtime stacktrace when a crash occurs. diff --git a/src/native/Cargo.lock b/src/native/Cargo.lock index fe371e09eaa..ab00a11a708 100644 --- a/src/native/Cargo.lock +++ b/src/native/Cargo.lock @@ -73,15 +73,24 @@ dependencies = [ [[package]] name = "anstyle-query" +<<<<<<< HEAD version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" dependencies = [ "windows-sys 0.60.2", +======= +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) ] [[package]] name = "anstyle-wincon" +<<<<<<< HEAD version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" @@ -89,6 +98,15 @@ dependencies = [ "anstyle", "once_cell_polyfill", "windows-sys 0.60.2", +======= +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) ] [[package]] @@ -117,9 +135,15 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "aws-lc-rs" +<<<<<<< HEAD version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879b6c89592deb404ba4dc0ae6b58ffd1795c78991cbb5b8bc441c48a070440d" +======= +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5932a7d9d28b0d2ea34c6b3779d35e3dd6f6345317c34e73438c4f1f29144151" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "aws-lc-sys", "zeroize", @@ -127,9 +151,15 @@ dependencies = [ [[package]] name = "aws-lc-sys" +<<<<<<< HEAD version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "107a4e9d9cab9963e04e84bb8dee0e25f2a987f9a8bad5ed054abd439caa8f8c" +======= +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1826f2e4cfc2cd19ee53c42fbf68e2f81ec21108e0b7ecf6a71cf062137360fc" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "bindgen", "cc", @@ -215,6 +245,7 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD name = "build_common" <<<<<<< HEAD <<<<<<< HEAD @@ -298,6 +329,20 @@ source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee >>>>>>> fe974f6b2 (No writer context exposed) >>>>>>> 3733ebd6ab (No writer context exposed) >>>>>>> c73beccb21 (No writer context exposed) +======= +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + +[[package]] +name = "build_common" +version = "24.0.0" +source = "git+https://github.com/DataDog/libdatadog?rev=v24.0.0#3445414c9ba4fefc76be46cf7e2f998986592892" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "cbindgen", "serde", @@ -355,6 +400,7 @@ name = "cc" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> c504f6a0ae (First commit) version = "1.2.41" @@ -373,6 +419,11 @@ checksum = "35900b6c8d709fb1d854671ae27aeaa9eec2f8b01b364e1619a40da3e6fe2afe" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) ======= >>>>>>> c504f6a0ae (First commit) +======= +version = "1.2.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35900b6c8d709fb1d854671ae27aeaa9eec2f8b01b364e1619a40da3e6fe2afe" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "find-msvc-tools", "jobserver", @@ -384,6 +435,7 @@ dependencies = [ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= name = "cc_utils" version = "0.1.0" @@ -414,6 +466,8 @@ dependencies = [ >>>>>>> a9f39cbc4 (For testing with test tracer in staging) ======= >>>>>>> c504f6a0ae (First commit) +======= +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "cexpr" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -462,6 +516,7 @@ dependencies = [ [[package]] name = "clap" <<<<<<< HEAD +<<<<<<< HEAD version = "4.5.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2cfd7bf8a6017ddaa4e32ffe7403d547790db06bd171c1c53926faab501623" @@ -470,6 +525,11 @@ version = "4.5.51" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +version = "4.5.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "clap_builder", ] @@ -477,6 +537,7 @@ dependencies = [ [[package]] name = "clap_builder" <<<<<<< HEAD +<<<<<<< HEAD version = "4.5.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a4c05b9e80c5ccd3a7ef080ad7b6ba7d6fc00a985b8b157197075677c82c7a0" @@ -485,6 +546,11 @@ version = "4.5.51" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +version = "4.5.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "anstream", "anstyle", @@ -609,9 +675,15 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crypto-common" +<<<<<<< HEAD version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +======= +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "generic-array", "typenum", @@ -620,6 +692,9 @@ dependencies = [ [[package]] <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "darling" version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -675,6 +750,7 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD ======= ======= >>>>>>> d4c329b287 (For testing with test tracer in staging) @@ -1567,16 +1643,23 @@ dependencies = [ >>>>>>> a9f39cbc4 (For testing with test tracer in staging) >>>>>>> 29189767b5 (For testing with test tracer in staging) >>>>>>> d4c329b287 (For testing with test tracer in staging) +======= +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "ddtrace-native" version = "0.1.0" dependencies = [ "anyhow", "build_common", +<<<<<<< HEAD <<<<<<< HEAD "datadog-ffe", ======= <<<<<<< HEAD >>>>>>> 5dbc278ef2 (First commit) +======= + "cc", + "datadog-ffe", +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) "libdd-common", "libdd-crashtracker", "libdd-data-pipeline", @@ -1584,6 +1667,7 @@ dependencies = [ "libdd-library-config", "libdd-log", "libdd-profiling-ffi", +<<<<<<< HEAD ======= "cc", <<<<<<< HEAD @@ -1604,6 +1688,8 @@ dependencies = [ "libdd-library-config", "libdd-log", >>>>>>> 29189767b5 (For testing with test tracer in staging) +======= +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) "pyo3", "pyo3-build-config", "pyo3-ffi", @@ -1622,6 +1708,7 @@ dependencies = [ [[package]] name = "deranged" <<<<<<< HEAD +<<<<<<< HEAD version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a41953f86f8a05768a6cda24def994fd2f424b04ec5c719cf89989779f199071" @@ -1630,6 +1717,11 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "powerfmt", ] @@ -1667,6 +1759,19 @@ dependencies = [ [[package]] <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +name = "dispatch2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" +dependencies = [ + "bitflags", + "objc2", +] + +[[package]] +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "displaydoc" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1678,6 +1783,7 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD ======= ======= >>>>>>> d4c329b287 (For testing with test tracer in staging) @@ -1745,6 +1851,8 @@ dependencies = [ >>>>>>> a9f39cbc4 (For testing with test tracer in staging) >>>>>>> 29189767b5 (For testing with test tracer in staging) >>>>>>> d4c329b287 (For testing with test tracer in staging) +======= +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "dunce" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1817,6 +1925,7 @@ name = "find-msvc-tools" <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> c504f6a0ae (First commit) version = "0.1.4" @@ -1835,6 +1944,11 @@ checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) ======= >>>>>>> c504f6a0ae (First commit) +======= +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) [[package]] name = "fnv" @@ -1969,9 +2083,15 @@ dependencies = [ [[package]] name = "generic-array" +<<<<<<< HEAD version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" +======= +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "typenum", "version_check", @@ -2094,9 +2214,15 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hyper" +<<<<<<< HEAD version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" +======= +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1744436df46f0bde35af3eda22aeaba453aada65d8f1c171cd8a5f59030bd69f" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "atomic-waker", "bytes", @@ -2145,9 +2271,15 @@ dependencies = [ [[package]] name = "hyper-util" +<<<<<<< HEAD version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" +======= +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e9a2a24dc5c6821e71a7030e1e14b7b632acac55c40e9d2e082c621261bb56" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "bytes", "futures-channel", @@ -2358,6 +2490,7 @@ dependencies = [ [[package]] name = "js-sys" <<<<<<< HEAD +<<<<<<< HEAD version = "0.3.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" @@ -2366,6 +2499,11 @@ version = "0.3.82" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +version = "0.3.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "once_cell", "wasm-bindgen", @@ -2383,6 +2521,7 @@ version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" <<<<<<< HEAD +<<<<<<< HEAD ======= [[package]] @@ -2617,6 +2756,8 @@ dependencies = [ "tracing", ] >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) [[package]] name = "libdd-alloc" @@ -2647,7 +2788,11 @@ dependencies = [ "hyper-rustls", "hyper-util", "libc", +<<<<<<< HEAD "nix", +======= + "nix 0.29.0", +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) "pin-project", "regex", "rustls", @@ -2689,7 +2834,11 @@ dependencies = [ "libc", "libdd-common", "libdd-telemetry", +<<<<<<< HEAD "nix", +======= + "nix 0.29.0", +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) "num-derive", "num-traits", "os_info", @@ -2960,10 +3109,14 @@ version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "serde", "value-bag", ] +<<<<<<< HEAD ======= <<<<<<< HEAD ======= @@ -2978,6 +3131,8 @@ dependencies = [ ] >>>>>>> a9f39cbc4 (For testing with test tracer in staging) >>>>>>> d4c329b287 (For testing with test tracer in staging) +======= +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) [[package]] name = "lz4_flex" @@ -3102,6 +3257,21 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD +======= +name = "nix" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[package]] +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "nom" version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3138,6 +3308,168 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD +======= +name = "objc2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" +dependencies = [ + "objc2-encode", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" +dependencies = [ + "bitflags", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags", + "dispatch2", + "objc2", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags", + "dispatch2", + "objc2", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-core-image" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-location" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca347214e24bc973fc025fd0d36ebb179ff30536ed1f80252706db19ee452009" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-text" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" +dependencies = [ + "bitflags", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags", + "block2", + "libc", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags", + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-image", + "objc2-core-location", + "objc2-core-text", + "objc2-foundation", + "objc2-quartz-core", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9df9128cbbfef73cda168416ccf7f837b62737d748333bfe9ab71c245d76613e" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "object" version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3166,6 +3498,7 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "os_info" +<<<<<<< HEAD version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0e1ac5fde8d43c34139135df8ea9ee9465394b2d8d20f032d38998f64afffc3" @@ -3174,6 +3507,20 @@ dependencies = [ "plist", "serde", "windows-sys 0.52.0", +======= +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c39b5918402d564846d5aba164c09a66cc88d232179dfd3e3c619a25a268392" +dependencies = [ + "android_system_properties", + "log", + "nix 0.30.1", + "objc2", + "objc2-foundation", + "objc2-ui-kit", + "serde", + "windows-sys 0.61.2", +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) ] [[package]] @@ -3237,6 +3584,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] +<<<<<<< HEAD name = "plist" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3250,6 +3598,8 @@ dependencies = [ ] [[package]] +======= +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "portable-atomic" version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3295,6 +3645,7 @@ dependencies = [ [[package]] name = "proc-macro2" <<<<<<< HEAD +<<<<<<< HEAD version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e0f6df8eaa422d97d72edcd152e1451618fed47fabbdbd5a8864167b1d4aff7" @@ -3303,6 +3654,11 @@ version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "unicode-ident", ] @@ -3394,6 +3750,7 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD name = "quick-xml" version = "0.38.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3413,6 +3770,12 @@ version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +name = "quote" +version = "1.0.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "proc-macro2", ] @@ -3562,6 +3925,7 @@ dependencies = [ [[package]] name = "rustls" <<<<<<< HEAD +<<<<<<< HEAD version = "0.23.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a9586e9ee2b4f8fab52a0048ca7334d7024eef48e2cb9407e3497bb7cab7fa7" @@ -3570,6 +3934,11 @@ version = "0.23.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +version = "0.23.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "aws-lc-rs", "once_cell", @@ -3604,6 +3973,7 @@ dependencies = [ [[package]] name = "rustls-webpki" <<<<<<< HEAD +<<<<<<< HEAD version = "0.103.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e10b3f4191e8a80e6b43eebabfac91e5dcecebb27a71f04e820c47ec41d314bf" @@ -3612,6 +3982,11 @@ version = "0.103.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +version = "0.103.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "aws-lc-rs", "ring", @@ -3749,11 +4124,19 @@ dependencies = [ [[package]] name = "serde_fmt" +<<<<<<< HEAD version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e497af288b3b95d067a23a4f749f2861121ffcb2f6d8379310dcda040c345ed" dependencies = [ "serde_core", +======= +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d4ddca14104cd60529e8c7f7ba71a2c8acd8f7f5cfcdc2faf97eeb7c3010a4" +dependencies = [ + "serde", +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) ] [[package]] @@ -4007,6 +4390,7 @@ dependencies = [ [[package]] name = "syn" <<<<<<< HEAD +<<<<<<< HEAD version = "2.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917" @@ -4015,6 +4399,11 @@ version = "2.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f17c7e013e88258aa9543dcbe81aca68a667a9ac37cd69c9fbc07858bfe0e2f" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +version = "2.0.110" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "proc-macro2", "quote", @@ -4150,6 +4539,9 @@ dependencies = [ [[package]] <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "tinystr" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4160,6 +4552,7 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD ======= ======= >>>>>>> d4c329b287 (For testing with test tracer in staging) @@ -4222,6 +4615,8 @@ dependencies = [ >>>>>>> a9f39cbc4 (For testing with test tracer in staging) >>>>>>> 29189767b5 (For testing with test tracer in staging) >>>>>>> d4c329b287 (For testing with test tracer in staging) +======= +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "tokio" version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4412,6 +4807,7 @@ checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" <<<<<<< HEAD +<<<<<<< HEAD version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06" @@ -4420,6 +4816,11 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) [[package]] name = "unicode-xid" @@ -4489,9 +4890,15 @@ checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "value-bag" +<<<<<<< HEAD version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ba6f5989077681266825251a52748b8c1d8a4ad098cc37e440103d0ea717fc0" +======= +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "943ce29a8a743eb10d6082545d861b24f9d1b160b7d741e0f2cdf726bec909c5" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "value-bag-serde1", "value-bag-sval2", @@ -4499,20 +4906,35 @@ dependencies = [ [[package]] name = "value-bag-serde1" +<<<<<<< HEAD version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16530907bfe2999a1773ca5900a65101e092c70f642f25cc23ca0c43573262c5" dependencies = [ "erased-serde", "serde_core", +======= +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35540706617d373b118d550d41f5dfe0b78a0c195dc13c6815e92e2638432306" +dependencies = [ + "erased-serde", + "serde", +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) "serde_fmt", ] [[package]] name = "value-bag-sval2" +<<<<<<< HEAD version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d00ae130edd690eaa877e4f40605d534790d1cf1d651e7685bd6a144521b251f" +======= +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe7e140a2658cc16f7ee7a86e413e803fc8f9b5127adc8755c19f9fefa63a52" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "sval", "sval_buffer", @@ -4556,6 +4978,7 @@ dependencies = [ [[package]] name = "wasm-bindgen" <<<<<<< HEAD +<<<<<<< HEAD version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" @@ -4564,11 +4987,17 @@ version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +version = "0.2.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", +<<<<<<< HEAD <<<<<<< HEAD "wasm-bindgen-shared", ] @@ -4586,12 +5015,15 @@ dependencies = [ "syn", ======= >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" <<<<<<< HEAD +<<<<<<< HEAD version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" @@ -4600,6 +5032,11 @@ version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +version = "0.2.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4608,6 +5045,7 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" <<<<<<< HEAD +<<<<<<< HEAD version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" @@ -4616,6 +5054,11 @@ version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +version = "0.2.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "bumpalo", "proc-macro2", @@ -4627,6 +5070,7 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" <<<<<<< HEAD +<<<<<<< HEAD version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" @@ -4635,6 +5079,11 @@ version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" >>>>>>> a9f39cbc4 (For testing with test tracer in staging) +======= +version = "0.2.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" +>>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "unicode-ident", ] diff --git a/src/native/Cargo.toml b/src/native/Cargo.toml index 3dfdb40f932..13810ade838 100644 --- a/src/native/Cargo.toml +++ b/src/native/Cargo.toml @@ -29,13 +29,20 @@ libdd-common = { git = "https://github.com/DataDog/libdatadog", rev = "v24.0.0" pyo3 = { version = "0.25", features = ["extension-module", "anyhow"] } tracing = { version = "0.1", default-features = false } pyo3-ffi = "0.25" -cc = "1.2.39" [build-dependencies] pyo3-build-config = "0.25" +cc = "1.2.39" build_common = { git = "https://github.com/DataDog/libdatadog", rev = "v24.0.0", features = [ "cbindgen", ] } [lib] name = "_native" +path = "lib.rs" +crate-type = ["cdylib"] + +[net] +# Use git binary from the system instead of the built-in git client +# "Setting this to true can be helpful if you have special authentication requirements that Cargo does not support." +git-fetch-with-cli = true diff --git a/src/native/crashtracker.rs b/src/native/crashtracker.rs index ab16d4f591e..c5be8547133 100644 --- a/src/native/crashtracker.rs +++ b/src/native/crashtracker.rs @@ -8,9 +8,8 @@ use std::time::Duration; use libdd_common::Endpoint; use libdd_crashtracker::{ - is_runtime_callback_registered, register_runtime_stack_callback, CallbackError, CallbackType, - CrashtrackerConfiguration, CrashtrackerReceiverConfig, Metadata, RuntimeStackFrame, - StacktraceCollection, + is_runtime_callback_registered, register_runtime_stacktrace_string_callback, CallbackError, + CrashtrackerConfiguration, CrashtrackerReceiverConfig, Metadata, StacktraceCollection, }; use pyo3::prelude::*; @@ -29,7 +28,6 @@ extern "C" { fn fcntl(fd: c_int, cmd: c_int, arg: c_int) -> c_int; } -// Constants for fcntl const F_SETFL: c_int = 4; const O_NONBLOCK: c_int = 0o4000; @@ -201,7 +199,7 @@ impl CrashtrackerMetadataPy { } impl RustWrapper for CrashtrackerMetadataPy { - type Inner = datadog_crashtracker::Metadata; + type Inner = Metadata; const INNER_TYPE_NAME: &'static str = "Metadata"; fn take_inner(&mut self) -> Option { @@ -331,101 +329,14 @@ impl From for CallbackResult { } } -// Constants for signal-safe operation -const MAX_FRAMES: usize = 64; -const MAX_STRING_LEN: usize = 256; -const MAX_TRACEBACK_SIZE: usize = 64 * 1024; // 64KB buffer for traceback text +const MAX_TRACEBACK_SIZE: usize = 8 * 1024; // 8KB -// Stack-allocated buffer for signal-safe string handling -struct StackBuffer { - data: [u8; MAX_STRING_LEN], - len: usize, -} - -impl StackBuffer { - const fn new() -> Self { - Self { - data: [0u8; MAX_STRING_LEN], - len: 0, - } - } - - fn as_ptr(&self) -> *const c_char { - self.data.as_ptr() as *const c_char - } - - fn set_from_str(&mut self, s: &str) { - let bytes = s.as_bytes(); - let copy_len = bytes.len().min(MAX_STRING_LEN - 1); - self.data[..copy_len].copy_from_slice(&bytes[..copy_len]); - self.data[copy_len] = 0; - self.len = copy_len; - } -} - -// Parse a single traceback line into frame information -// ' File "/path/to/file.py", line 42, in function_name' -fn parse_traceback_line( - line: &str, - function_buf: &mut StackBuffer, - file_buf: &mut StackBuffer, -) -> u32 { - let trimmed = line.trim(); - - // Look for the pattern: File "filename", line number, in function_name - if let Some(file_start) = trimmed.find('"') { - if let Some(file_end) = trimmed[file_start + 1..].find('"') { - let file_path = &trimmed[file_start + 1..file_start + 1 + file_end]; - file_buf.set_from_str(file_path); - - let after_file = &trimmed[file_start + file_end + 2..]; - if let Some(line_start) = after_file.find("line ") { - let line_part = &after_file[line_start + 5..]; - - // Try to find comma first ("line 42, in func") - let line_num = if let Some(line_end) = line_part.find(',') { - let line_str = line_part[..line_end].trim(); - line_str.parse::().unwrap_or(0) - } else { - // No comma, try space ("line 42 in func") - if let Some(space_pos) = line_part.find(' ') { - let line_str = line_part[..space_pos].trim(); - line_str.parse::().unwrap_or(0) - } else { - // Just numbers until end - let line_str = line_part.trim(); - line_str.parse::().unwrap_or(0) - } - }; - - // Look for function name - if let Some(in_pos) = after_file.find(" in ") { - let func_name = after_file[in_pos + 4..].trim(); - function_buf.set_from_str(func_name); - } else { - function_buf.set_from_str(""); - } - - return line_num; - } - } - } - - // Fallback parsing - function_buf.set_from_str(""); - file_buf.set_from_str(""); - 0 -} - -/// Dump Python traceback as a complete string -/// -/// This function captures the Python traceback via CPython's internal API -/// and emits it as a single string instead of parsing into individual frames. -/// This is more efficient and preserves the original Python formatting. unsafe fn dump_python_traceback_as_string( emit_stacktrace_string: unsafe extern "C" fn(*const c_char), ) { - // Create a pipe to capture CPython internal traceback dump + // Create a pipe to capture CPython internal traceback dump. _Py_DumpTracebackThreads writes to + // a fd. Reading and writing to pipe is signal-safe. We stack allocate a buffer in the beginning, + // and use it to read the output let mut pipefd: [c_int; 2] = [0, 0]; if pipe(&mut pipefd as *mut [c_int; 2]) != 0 { emit_stacktrace_string("\0".as_ptr() as *const c_char); @@ -438,28 +349,20 @@ unsafe fn dump_python_traceback_as_string( // Make the read end non-blocking fcntl(read_fd, F_SETFL, O_NONBLOCK); - // Get the current thread state safely - same approach as CPython's faulthandler - // SIGSEGV, SIGFPE, SIGABRT, SIGBUS and SIGILL are synchronous signals and - // are thus delivered to the thread that caused the fault. + // Same approach as CPython's faulthandler let current_tstate = crashtracker_get_current_tstate(); - // Call the CPython internal API via our C wrapper - // Pass NULL for interpreter state - let _Py_DumpTracebackThreads handle it internally let error_msg = crashtracker_dump_traceback_threads(write_fd, ptr::null_mut(), current_tstate); close(write_fd); - // Check for errors from _Py_DumpTracebackThreads if !error_msg.is_null() { close(read_fd); - // Note: We can't format the error message because we're in a signal context - // Just emit a generic error message emit_stacktrace_string("\0".as_ptr() as *const c_char); return; } - // Read the traceback output - let mut buffer = vec![0u8; MAX_TRACEBACK_SIZE]; + let mut buffer = [0u8; MAX_TRACEBACK_SIZE]; let bytes_read = read( read_fd, buffer.as_mut_ptr() as *mut c_void, @@ -469,11 +372,20 @@ unsafe fn dump_python_traceback_as_string( close(read_fd); if bytes_read > 0 { - buffer.truncate(bytes_read as usize); - if let Ok(traceback_text) = std::str::from_utf8(&buffer) { - emit_stacktrace_string(traceback_text.as_ptr() as *const c_char); - return; + let bytes_read = bytes_read as usize; + if bytes_read < MAX_TRACEBACK_SIZE { + buffer[bytes_read] = 0; + } else { + // Buffer is full; add truncation indicator + let truncation_msg = b"\n[TRUNCATED]\0"; + let msg_len = truncation_msg.len(); + if MAX_TRACEBACK_SIZE >= msg_len { + let start_pos = MAX_TRACEBACK_SIZE - msg_len; + buffer[start_pos..].copy_from_slice(truncation_msg); + } } + emit_stacktrace_string(buffer.as_ptr() as *const c_char); + return; } emit_stacktrace_string("\0".as_ptr() as *const c_char); @@ -485,44 +397,16 @@ unsafe extern "C" fn native_runtime_stack_callback( dump_python_traceback_as_string(emit_stacktrace_string); } -/// Frame-based callback implementation for runtime stack collection -/// -/// This callback collects Python stack frames individually and emits them -/// one by one for detailed stack trace information. -// unsafe extern "C" fn native_runtime_frame_callback( -// emit_frame: unsafe extern "C" fn(*const RuntimeStackFrame), -// ) { -// dump_python_traceback_via_cpython_api(emit_frame); -// } - /// Register the native runtime stack collection callback (string-based) -/// -/// This function registers a native callback that directly collects Python runtime -/// stack traces as complete strings without requiring Python callback functions. -/// -/// # Returns -/// - `CallbackResult::Ok` if registration succeeds (replaces any existing callback) #[pyfunction(name = "crashtracker_register_native_runtime_callback")] pub fn crashtracker_register_native_runtime_callback() -> CallbackResult { - match register_runtime_stacktrace_string_callback( - native_runtime_stack_callback, - ) { + match register_runtime_stacktrace_string_callback(native_runtime_stack_callback) { Ok(()) => CallbackResult::Ok, Err(e) => e.into(), } - // match register_runtime_frame_callback( - // native_runtime_frame_callback, - // ) { - // Ok(()) => CallbackResult::Ok, - // Err(e) => e.into(), - // } } /// Check if a runtime callback is currently registered -/// -/// # Returns -/// - `True` if a callback is registered -/// - `False` if no callback is registered #[pyfunction(name = "crashtracker_is_runtime_callback_registered")] pub fn crashtracker_is_runtime_callback_registered() -> bool { is_runtime_callback_registered() diff --git a/src/native/data_pipeline/mod.rs b/src/native/data_pipeline/mod.rs index 5e258ec9ffc..3fcba76ce0f 100644 --- a/src/native/data_pipeline/mod.rs +++ b/src/native/data_pipeline/mod.rs @@ -148,22 +148,11 @@ impl TraceExporterBuilderPy { heartbeat_ms: u64, runtime_id: String, ) -> PyResult> { -<<<<<<< HEAD slf.try_as_mut()?.enable_telemetry(TelemetryConfig { heartbeat: heartbeat_ms, runtime_id: Some(runtime_id), debug_enabled: true, }); -======= - slf.try_as_mut()?.enable_telemetry( - Some(TelemetryConfig { - heartbeat: heartbeat_ms, - runtime_id: Some(runtime_id), - debug_enabled: true, - }) - .unwrap(), - ); ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) Ok(slf.into()) } diff --git a/src/native/library_config.rs b/src/native/library_config.rs index 189c812ce25..bb1c9bd08f8 100644 --- a/src/native/library_config.rs +++ b/src/native/library_config.rs @@ -125,13 +125,8 @@ pub fn store_metadata(data: &PyTracerMetadata) -> PyResult>>>>>> c21cdc9e2 (First commit) }; let res = store_tracer_metadata(&metadata); diff --git a/tests/internal/crashtracker/test_crashtracker.py b/tests/internal/crashtracker/test_crashtracker.py index ce63a641a91..b91cae47035 100644 --- a/tests/internal/crashtracker/test_crashtracker.py +++ b/tests/internal/crashtracker/test_crashtracker.py @@ -699,91 +699,6 @@ def test_crashtracker_echild_hang(): pytest.fail("Unexpected exception: %s" % e) -@pytest.mark.skipif(not sys.platform.startswith("linux"), reason="Linux only") -@pytest.mark.subprocess() -def test_crashtracker_runtime_callback(): - import ctypes - import os - - import tests.internal.crashtracker.utils as utils - - with utils.with_test_agent() as client: - pid = os.fork() - - def func1(): - return func2() - - def func2(): - return func3() - - def func3(): - return func4() - - def func4(): - return func5() - - def func5(): - return func6() - - def func6(): - return func7() - - def func7(): - return func8() - - def func8(): - return func9() - - def func9(): - return func10() - - def func10(): - return func11() - - def func11(): - return func12() - - def func12(): - return func13() - - def func13(): - return func14() - - def func14(): - return func15() - - def func15(): - return func16() - - def func16(): - ctypes.string_at(0) - sys.exit(-1) - - if pid == 0: - ct = utils.CrashtrackerWrapper(base_name="runtime_runtime_callback") - assert ct.start() - stdout_msg, stderr_msg = ct.logs() - assert not stdout_msg, stdout_msg - assert not stderr_msg, stderr_msg - - func1() - - report = utils.get_crash_report(client) - - import json - try: - report_dict = json.loads(report["body"].decode('utf-8')) - message = report_dict["payload"][0]["message"] - message_dict = json.loads(message) - experimental = message_dict['experimental'] - - with open("experimental_debug_string_dump.json", "w") as f: - json.dump(experimental, f, indent=2) - - except (json.JSONDecodeError, UnicodeDecodeError) as e: - print(f"Could not parse report as JSON: {e}") - - @pytest.mark.skipif(not sys.platform.startswith("linux"), reason="Linux only") @pytest.mark.subprocess() def test_crashtracker_no_zombies(): From dacae9dc7d71d1b271bf6d01de448393d333ce6a Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Mon, 17 Nov 2025 01:04:08 +0000 Subject: [PATCH 10/21] Fixing build issues --- src/native/build.rs | 86 +++++++++++++++------------------------------ 1 file changed, 28 insertions(+), 58 deletions(-) diff --git a/src/native/build.rs b/src/native/build.rs index 58da2d5f483..b00015b0c2e 100644 --- a/src/native/build.rs +++ b/src/native/build.rs @@ -6,68 +6,38 @@ fn main() { pyo3_build_config::add_extension_module_link_args(); } - // Compile the C wrapper for CPython internal APIs - // This file defines Py_BUILD_CORE and provides access to internal functions - - // Get Python include directory using the cross-compilation info - let include_dir = match std::env::var("PYO3_CROSS_INCLUDE_DIR") { - Ok(dir) => std::path::PathBuf::from(dir), - Err(_) => { - // Fallback to using Python's sysconfig - let output = std::process::Command::new("python") - .args([ - "-c", - "import sysconfig; print(sysconfig.get_path('include'))", - ]) - .output() - .expect("Failed to run python to get include directory"); - std::path::PathBuf::from(String::from_utf8(output.stdout).unwrap().trim()) - } - }; + // Compile C sources for crashtracker runtime stack collection + // This includes the CPython internal API wrappers needed for _Py_DumpTracebackThreads + let mut build = cc::Build::new(); + + // Get Python configuration + let python_config = pyo3_build_config::get(); + + // Find Python include directory using Python sysconfig + let python_executable = python_config.executable.as_deref().unwrap_or("python"); + let python_include_output = std::process::Command::new(python_executable) + .args(&["-c", "import sysconfig; print(sysconfig.get_path('include'))"]) + .output() + .expect("Failed to get Python include directory"); + + if python_include_output.status.success() { + let python_include_dir = String::from_utf8_lossy(&python_include_output.stdout).trim().to_string(); + build.include(&python_include_dir); + } - // Add internal headers path for CPython internal APIs - let internal_headers_dir = include_dir.join("internal"); + // Set Py_BUILD_CORE to access internal CPython APIs + build.define("Py_BUILD_CORE", "1"); - cc::Build::new() + // Compile the C source file + build .file("cpython_internal.c") - .include(&include_dir) - .include(&internal_headers_dir) // Add internal headers directory - .define("Py_BUILD_CORE", "1") .compile("cpython_internal"); - // Tell rustc to link the compiled C library + // Tell rustc to link the static library we just built println!("cargo:rustc-link-lib=static=cpython_internal"); - // Force linking to libpython to access internal symbols - // PyO3 normally avoids linking to libpython on Unix, but we need it for internal APIs - if !cfg!(target_os = "macos") { - // Get Python version and library info - let output = std::process::Command::new("python3") - .args(["-c", "import sysconfig; version = sysconfig.get_config_var('VERSION'); ldlibrary = sysconfig.get_config_var('LDLIBRARY'); libdir = sysconfig.get_config_var('LIBDIR'); print(f'{version}:{ldlibrary}:{libdir}')"]) - .output() - .expect("Failed to get Python library info"); - - let version_info = String::from_utf8(output.stdout).unwrap(); - let parts: Vec<&str> = version_info.trim().split(':').collect(); - - if parts.len() == 3 { - let version = parts[0]; - let ldlibrary = parts[1]; - let libdir = parts[2]; - - // Add library directory to search path - println!("cargo:rustc-link-search=native={}", libdir); - - // Extract library name from LDLIBRARY (e.g., "libpython3.11.so" -> "python3.11") - if let Some(lib_name) = ldlibrary - .strip_prefix("lib") - .and_then(|s| s.strip_suffix(".so")) - { - println!("cargo:rustc-link-lib={}", lib_name); - } else { - // Fallback to version-based naming - println!("cargo:rustc-link-lib=python{}", version); - } - } - } -} + // Tell cargo to invalidate the built crate whenever these files change + println!("cargo:rerun-if-changed=cpython_internal.c"); + println!("cargo:rerun-if-changed=cpython_internal.h"); + println!("cargo:rerun-if-changed=build.rs"); +} \ No newline at end of file From 18b8ea7e73d6ab02406f813a33309f2555bd5c24 Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Mon, 17 Nov 2025 02:39:23 +0000 Subject: [PATCH 11/21] Fallback to faulthandler to fix build issue in CI --- ddtrace/internal/core/crashtracking.py | 11 ++- src/native/build.rs | 27 ++++---- src/native/cpython_internal.c | 93 +++++++++++++++++++++++--- src/native/cpython_internal.h | 16 ++--- 4 files changed, 107 insertions(+), 40 deletions(-) diff --git a/ddtrace/internal/core/crashtracking.py b/ddtrace/internal/core/crashtracking.py index d932855aee3..efb64b31bec 100644 --- a/ddtrace/internal/core/crashtracking.py +++ b/ddtrace/internal/core/crashtracking.py @@ -19,17 +19,17 @@ is_available = True try: + from ddtrace.internal.native._native import CallbackResult from ddtrace.internal.native._native import CrashtrackerConfiguration from ddtrace.internal.native._native import CrashtrackerMetadata from ddtrace.internal.native._native import CrashtrackerReceiverConfig from ddtrace.internal.native._native import CrashtrackerStatus from ddtrace.internal.native._native import StacktraceCollection from ddtrace.internal.native._native import crashtracker_init + from ddtrace.internal.native._native import crashtracker_is_runtime_callback_registered from ddtrace.internal.native._native import crashtracker_on_fork - from ddtrace.internal.native._native import crashtracker_status from ddtrace.internal.native._native import crashtracker_register_native_runtime_callback - from ddtrace.internal.native._native import crashtracker_is_runtime_callback_registered - from ddtrace.internal.native._native import CallbackResult + from ddtrace.internal.native._native import crashtracker_status except ImportError: is_available = False @@ -158,10 +158,7 @@ def start(additional_tags: Optional[Dict[str, str]] = None) -> bool: crashtracker_init(config, receiver_config, metadata) - if ( - crashtracker_config.stacktrace_resolver is not None and - crashtracker_config.stacktrace_resolver != "none" - ): + if crashtracker_config.stacktrace_resolver is not None and crashtracker_config.stacktrace_resolver != "none": result = crashtracker_register_native_runtime_callback() # Shouldn't block on this, but log an error if it fails if result != CallbackResult.Ok: diff --git a/src/native/build.rs b/src/native/build.rs index b00015b0c2e..dd5760b2906 100644 --- a/src/native/build.rs +++ b/src/native/build.rs @@ -7,37 +7,36 @@ fn main() { } // Compile C sources for crashtracker runtime stack collection - // This includes the CPython internal API wrappers needed for _Py_DumpTracebackThreads let mut build = cc::Build::new(); - // Get Python configuration let python_config = pyo3_build_config::get(); - - // Find Python include directory using Python sysconfig let python_executable = python_config.executable.as_deref().unwrap_or("python"); let python_include_output = std::process::Command::new(python_executable) - .args(&["-c", "import sysconfig; print(sysconfig.get_path('include'))"]) + .args([ + "-c", + "import sysconfig; print(sysconfig.get_path('include'))", + ]) .output() .expect("Failed to get Python include directory"); if python_include_output.status.success() { - let python_include_dir = String::from_utf8_lossy(&python_include_output.stdout).trim().to_string(); + let python_include_dir = String::from_utf8_lossy(&python_include_output.stdout) + .trim() + .to_string(); build.include(&python_include_dir); } - // Set Py_BUILD_CORE to access internal CPython APIs build.define("Py_BUILD_CORE", "1"); - - // Compile the C source file - build - .file("cpython_internal.c") - .compile("cpython_internal"); + build.file("cpython_internal.c").compile("cpython_internal"); // Tell rustc to link the static library we just built println!("cargo:rustc-link-lib=static=cpython_internal"); - // Tell cargo to invalidate the built crate whenever these files change + // Link dl library for dynamic symbol loading (dlsym) - Unix only + if !cfg!(target_os = "windows") { + println!("cargo:rustc-link-lib=dl"); + } println!("cargo:rerun-if-changed=cpython_internal.c"); println!("cargo:rerun-if-changed=cpython_internal.h"); println!("cargo:rerun-if-changed=build.rs"); -} \ No newline at end of file +} diff --git a/src/native/cpython_internal.c b/src/native/cpython_internal.c index f1dd0929adb..de3993f5e9e 100644 --- a/src/native/cpython_internal.c +++ b/src/native/cpython_internal.c @@ -1,17 +1,90 @@ // CPython internal API wrapper -// This file defines Py_BUILD_CORE to access internal CPython functions -// and provides a safe C interface for Rust FFI +// This file provides a safe C interface for Rust FFI that works with both +// full Python builds (with internal symbols) and minimal builds (manylinux) +// This is because CI uses manylinux builds, but we need to access the internal +// CPython APIs -#define Py_BUILD_CORE 1 #include -#include -const char *crashtracker_dump_traceback_threads(int fd, - PyInterpreterState *interp, - PyThreadState *current_tstate) { - return _Py_DumpTracebackThreads(fd, interp, current_tstate); +// Platform-specific dynamic loading +#ifdef _WIN32 +#include +#else +#include +#endif + +// Function pointer for _Py_DumpTracebackThreads (may not be available in manylinux builds) +static const char* (*_Py_DumpTracebackThreads_ptr)(int, PyInterpreterState*, PyThreadState*) = NULL; +static int symbol_resolved = 0; + +// Try to resolve the symbol dynamically +static void +resolve_dump_traceback_symbol(void) +{ + if (symbol_resolved) + return; + +#ifdef _WIN32 + HMODULE hModule = GetModuleHandle(NULL); // Current process + if (hModule) { + _Py_DumpTracebackThreads_ptr = (const char* (*)(int, PyInterpreterState*, PyThreadState*))GetProcAddress( + hModule, "_Py_DumpTracebackThreads"); + } +#else + _Py_DumpTracebackThreads_ptr = + (const char* (*)(int, PyInterpreterState*, PyThreadState*))dlsym(RTLD_DEFAULT, "_Py_DumpTracebackThreads"); +#endif + + symbol_resolved = 1; } -PyThreadState *crashtracker_get_current_tstate(void) { - return PyGILState_GetThisThreadState(); +const char* +crashtracker_dump_traceback_threads(int fd, PyInterpreterState* interp, PyThreadState* current_tstate) +{ + resolve_dump_traceback_symbol(); + + if (_Py_DumpTracebackThreads_ptr) { + // Use the internal API if available (local development builds) + return _Py_DumpTracebackThreads_ptr(fd, interp, current_tstate); + } else { + // Fallback: Use Python's faulthandler module API (manylinux builds) + PyObject* faulthandler_module = PyImport_ImportModule("faulthandler"); + if (faulthandler_module == NULL) { + PyErr_Clear(); + return "Failed to import faulthandler module"; + } + + PyObject* dump_func = PyObject_GetAttrString(faulthandler_module, "dump_traceback"); + Py_DECREF(faulthandler_module); + + if (dump_func == NULL) { + PyErr_Clear(); + return "Failed to get dump_traceback function"; + } + + // Create a file object from the file descriptor + PyObject* file_obj = PyLong_FromLong(fd); + PyObject* all_threads = Py_True; + Py_INCREF(all_threads); + + PyObject* result = PyObject_CallFunctionObjArgs(dump_func, file_obj, all_threads, NULL); + + Py_DECREF(dump_func); + Py_DECREF(file_obj); + Py_DECREF(all_threads); + + if (result == NULL) { + PyErr_Clear(); + return "Failed to call faulthandler.dump_traceback"; + } + + Py_DECREF(result); + return NULL; // Success + } } + +PyThreadState* +crashtracker_get_current_tstate(void) +{ + return PyGILState_GetThisThreadState(); +} \ No newline at end of file diff --git a/src/native/cpython_internal.h b/src/native/cpython_internal.h index 7953fc748bd..af61c243878 100644 --- a/src/native/cpython_internal.h +++ b/src/native/cpython_internal.h @@ -7,17 +7,15 @@ #include #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif + // Wrapper function to call _Py_DumpTracebackThreads + // Returns error message on failure, NULL on success + const char* crashtracker_dump_traceback_threads(int fd, PyInterpreterState* interp, PyThreadState* current_tstate); -// Wrapper function to call _Py_DumpTracebackThreads -// Returns error message on failure, NULL on success -const char *crashtracker_dump_traceback_threads(int fd, - PyInterpreterState *interp, - PyThreadState *current_tstate); - -// Wrapper to get the current thread state safely during crashes -PyThreadState *crashtracker_get_current_tstate(void); + // Wrapper to get the current thread state safely during crashes + PyThreadState* crashtracker_get_current_tstate(void); #ifdef __cplusplus } From 0ab8bc230d3ca42dd6eed9af249a3419449cef28 Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Tue, 18 Nov 2025 01:16:23 +0000 Subject: [PATCH 12/21] 3.14 cant statically link and also cant use faulthandler... --- src/native/build.rs | 60 ++++++++++++++++++- src/native/cpython_internal.c | 110 +++++++++++++++------------------- 2 files changed, 106 insertions(+), 64 deletions(-) diff --git a/src/native/build.rs b/src/native/build.rs index dd5760b2906..b2453bd87a9 100644 --- a/src/native/build.rs +++ b/src/native/build.rs @@ -32,10 +32,66 @@ fn main() { // Tell rustc to link the static library we just built println!("cargo:rustc-link-lib=static=cpython_internal"); - // Link dl library for dynamic symbol loading (dlsym) - Unix only - if !cfg!(target_os = "windows") { + // Link Python static library for _Py_DumpTracebackThreads access + let python_version_output = std::process::Command::new(python_executable) + .args([ + "-c", + "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')", + ]) + .output() + .expect("Failed to get Python version"); + + if python_version_output.status.success() { + let python_version = String::from_utf8_lossy(&python_version_output.stdout) + .trim() + .to_string(); + + // Get the config directory path where static library is located + let config_dir_output = std::process::Command::new(python_executable) + .args(["-c", "import sysconfig; print(sysconfig.get_path('stdlib') + '/config-' + sysconfig.get_config_var('LDVERSION') + '-' + sysconfig.get_platform())"]) + .output() + .expect("Failed to get Python config directory"); + + if config_dir_output.status.success() { + let config_dir = String::from_utf8_lossy(&config_dir_output.stdout) + .trim() + .to_string(); + let static_lib_path = format!("{}/libpython{}.a", config_dir, python_version); + + // Check if static library exists and link it + if std::path::Path::new(&static_lib_path).exists() { + // Add search path and link to Python static library + println!("cargo:rustc-link-search=native={}", config_dir); + println!("cargo:rustc-link-lib=static=python{}", python_version); + + // Link required dependencies for static Python library + println!("cargo:rustc-link-lib=dl"); + println!("cargo:rustc-link-lib=m"); + println!("cargo:rustc-link-lib=pthread"); + + println!( + "cargo:warning=Static linking enabled for Python {}: {}", + python_version, static_lib_path + ); + } else { + // Static library not available - only dynamic loading will be attempted + println!("cargo:rustc-link-lib=dl"); + println!( + "cargo:warning=Static library not found at {}, using dynamic loading only", + static_lib_path + ); + } + } else { + // Fallback: link dl for dynamic loading + println!("cargo:rustc-link-lib=dl"); + println!("cargo:warning=Failed to get config directory, using dynamic loading only"); + } + } else { + // Fallback: link dl for dynamic loading println!("cargo:rustc-link-lib=dl"); + println!("cargo:warning=Failed to get Python version, using dynamic loading only"); } + println!("cargo:rerun-if-changed=cpython_internal.c"); println!("cargo:rerun-if-changed=cpython_internal.h"); println!("cargo:rerun-if-changed=build.rs"); diff --git a/src/native/cpython_internal.c b/src/native/cpython_internal.c index de3993f5e9e..add9f2ee189 100644 --- a/src/native/cpython_internal.c +++ b/src/native/cpython_internal.c @@ -1,90 +1,76 @@ // CPython internal API wrapper -// This file provides a safe C interface for Rust FFI that works with both -// full Python builds (with internal symbols) and minimal builds (manylinux) -// This is because CI uses manylinux builds, but we need to access the internal -// CPython APIs #include +#include +#include -// Platform-specific dynamic loading -#ifdef _WIN32 -#include -#else +// Platform-specific dynamic loading for fallback +#ifndef _WIN32 #include #endif -// Function pointer for _Py_DumpTracebackThreads (may not be available in manylinux builds) -static const char* (*_Py_DumpTracebackThreads_ptr)(int, PyInterpreterState*, PyThreadState*) = NULL; -static int symbol_resolved = 0; +// Direct declaration of _Py_DumpTracebackThreads for static linking +// Uses weak symbol so it's NULL if cant link +extern const char* +_Py_DumpTracebackThreads(int fd, PyInterpreterState* interp, PyThreadState* current_tstate) __attribute__((weak)); -// Try to resolve the symbol dynamically -static void -resolve_dump_traceback_symbol(void) +const char* +crashtracker_dump_traceback_threads(int fd, PyInterpreterState* interp, PyThreadState* current_tstate) { - if (symbol_resolved) - return; - -#ifdef _WIN32 - HMODULE hModule = GetModuleHandle(NULL); // Current process - if (hModule) { - _Py_DumpTracebackThreads_ptr = (const char* (*)(int, PyInterpreterState*, PyThreadState*))GetProcAddress( - hModule, "_Py_DumpTracebackThreads"); + if (_Py_DumpTracebackThreads) { + return _Py_DumpTracebackThreads(fd, interp, current_tstate); } -#else - _Py_DumpTracebackThreads_ptr = - (const char* (*)(int, PyInterpreterState*, PyThreadState*))dlsym(RTLD_DEFAULT, "_Py_DumpTracebackThreads"); -#endif - symbol_resolved = 1; -} +#ifndef _WIN32 + // Try dynamic linking + static const char* (*_Py_DumpTracebackThreads_ptr)(int, PyInterpreterState*, PyThreadState*) = NULL; + static int symbol_resolved = 0; -const char* -crashtracker_dump_traceback_threads(int fd, PyInterpreterState* interp, PyThreadState* current_tstate) -{ - resolve_dump_traceback_symbol(); + if (!symbol_resolved) { + _Py_DumpTracebackThreads_ptr = + (const char* (*)(int, PyInterpreterState*, PyThreadState*))dlsym(RTLD_DEFAULT, "_Py_DumpTracebackThreads"); + symbol_resolved = 1; + } if (_Py_DumpTracebackThreads_ptr) { - // Use the internal API if available (local development builds) return _Py_DumpTracebackThreads_ptr(fd, interp, current_tstate); - } else { - // Fallback: Use Python's faulthandler module API (manylinux builds) - PyObject* faulthandler_module = PyImport_ImportModule("faulthandler"); - if (faulthandler_module == NULL) { - PyErr_Clear(); - return "Failed to import faulthandler module"; - } - - PyObject* dump_func = PyObject_GetAttrString(faulthandler_module, "dump_traceback"); - Py_DECREF(faulthandler_module); + } +#endif + PyObject* faulthandler_module = PyImport_ImportModule("faulthandler"); + if (faulthandler_module == NULL) { + PyErr_Clear(); + return NULL; + } - if (dump_func == NULL) { - PyErr_Clear(); - return "Failed to get dump_traceback function"; - } + PyObject* dump_func = PyObject_GetAttrString(faulthandler_module, "dump_traceback"); + Py_DECREF(faulthandler_module); - // Create a file object from the file descriptor - PyObject* file_obj = PyLong_FromLong(fd); - PyObject* all_threads = Py_True; - Py_INCREF(all_threads); + if (dump_func == NULL) { + PyErr_Clear(); + return NULL; + } - PyObject* result = PyObject_CallFunctionObjArgs(dump_func, file_obj, all_threads, NULL); + // Call faulthandler.dump_traceback(file=fd, all_threads=True) + PyObject* fd_obj = PyLong_FromLong(fd); + PyObject* all_threads = Py_True; + Py_INCREF(all_threads); - Py_DECREF(dump_func); - Py_DECREF(file_obj); - Py_DECREF(all_threads); + PyObject* result = PyObject_CallFunction(dump_func, "OO", fd_obj, all_threads); - if (result == NULL) { - PyErr_Clear(); - return "Failed to call faulthandler.dump_traceback"; - } + Py_DECREF(dump_func); + Py_DECREF(fd_obj); + Py_DECREF(all_threads); - Py_DECREF(result); - return NULL; // Success + if (result == NULL) { + PyErr_Clear(); + return NULL; } + Py_DECREF(result); + return NULL; // Success } PyThreadState* crashtracker_get_current_tstate(void) { return PyGILState_GetThisThreadState(); -} \ No newline at end of file +} From 098efbc6cb1fa923d15b59d5cc5cd2b4eadef3a7 Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Tue, 18 Nov 2025 03:30:57 +0000 Subject: [PATCH 13/21] Lets just not dynamically link; static symbol *should* be available --- src/native/build.rs | 27 ++++++++++++++------------- src/native/cpython_internal.c | 28 +++++++--------------------- 2 files changed, 21 insertions(+), 34 deletions(-) diff --git a/src/native/build.rs b/src/native/build.rs index b2453bd87a9..675ffcd1e7e 100644 --- a/src/native/build.rs +++ b/src/native/build.rs @@ -64,32 +64,33 @@ fn main() { println!("cargo:rustc-link-search=native={}", config_dir); println!("cargo:rustc-link-lib=static=python{}", python_version); - // Link required dependencies for static Python library - println!("cargo:rustc-link-lib=dl"); - println!("cargo:rustc-link-lib=m"); - println!("cargo:rustc-link-lib=pthread"); + // Link required dependencies for static Python library (Unix only) + if !cfg!(target_os = "windows") { + println!("cargo:rustc-link-lib=dl"); + println!("cargo:rustc-link-lib=m"); + println!("cargo:rustc-link-lib=pthread"); + } println!( "cargo:warning=Static linking enabled for Python {}: {}", python_version, static_lib_path ); } else { - // Static library not available - only dynamic loading will be attempted - println!("cargo:rustc-link-lib=dl"); + // Static library not available - fallback to faulthandler only println!( - "cargo:warning=Static library not found at {}, using dynamic loading only", + "cargo:warning=Static library not found at {}, using faulthandler fallback only", static_lib_path ); } } else { - // Fallback: link dl for dynamic loading - println!("cargo:rustc-link-lib=dl"); - println!("cargo:warning=Failed to get config directory, using dynamic loading only"); + // Fallback: faulthandler only + println!( + "cargo:warning=Failed to get config directory, using faulthandler fallback only" + ); } } else { - // Fallback: link dl for dynamic loading - println!("cargo:rustc-link-lib=dl"); - println!("cargo:warning=Failed to get Python version, using dynamic loading only"); + // Fallback: faulthandler only + println!("cargo:warning=Failed to get Python version, using faulthandler fallback only"); } println!("cargo:rerun-if-changed=cpython_internal.c"); diff --git a/src/native/cpython_internal.c b/src/native/cpython_internal.c index add9f2ee189..1181565fded 100644 --- a/src/native/cpython_internal.c +++ b/src/native/cpython_internal.c @@ -2,40 +2,26 @@ #include #include -#include - -// Platform-specific dynamic loading for fallback -#ifndef _WIN32 -#include -#endif // Direct declaration of _Py_DumpTracebackThreads for static linking // Uses weak symbol so it's NULL if cant link +#ifdef _WIN32 +__declspec(selectany) +const char* (*_Py_DumpTracebackThreads)(int fd, PyInterpreterState* interp, PyThreadState* current_tstate) = NULL; +#else extern const char* _Py_DumpTracebackThreads(int fd, PyInterpreterState* interp, PyThreadState* current_tstate) __attribute__((weak)); +#endif const char* crashtracker_dump_traceback_threads(int fd, PyInterpreterState* interp, PyThreadState* current_tstate) { + // Try static linking first if (_Py_DumpTracebackThreads) { return _Py_DumpTracebackThreads(fd, interp, current_tstate); } -#ifndef _WIN32 - // Try dynamic linking - static const char* (*_Py_DumpTracebackThreads_ptr)(int, PyInterpreterState*, PyThreadState*) = NULL; - static int symbol_resolved = 0; - - if (!symbol_resolved) { - _Py_DumpTracebackThreads_ptr = - (const char* (*)(int, PyInterpreterState*, PyThreadState*))dlsym(RTLD_DEFAULT, "_Py_DumpTracebackThreads"); - symbol_resolved = 1; - } - - if (_Py_DumpTracebackThreads_ptr) { - return _Py_DumpTracebackThreads_ptr(fd, interp, current_tstate); - } -#endif + // Fallback to faulthandler PyObject* faulthandler_module = PyImport_ImportModule("faulthandler"); if (faulthandler_module == NULL) { PyErr_Clear(); From 228b0ca4efb7071e32838daf3b2e0cccae2b5b5f Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Tue, 18 Nov 2025 18:09:10 +0000 Subject: [PATCH 14/21] Static linking should expose symbol --- src/native/build.rs | 52 +++++++++++++++++++++-------------- src/native/cpython_internal.c | 45 ++++-------------------------- src/native/crashtracker.rs | 2 +- 3 files changed, 38 insertions(+), 61 deletions(-) diff --git a/src/native/build.rs b/src/native/build.rs index 675ffcd1e7e..04fcfaa4929 100644 --- a/src/native/build.rs +++ b/src/native/build.rs @@ -47,8 +47,32 @@ fn main() { .to_string(); // Get the config directory path where static library is located + // Try multiple possible config directory patterns since sysconfig.get_platform() + // can be inconsistent with actual directory names across platforms let config_dir_output = std::process::Command::new(python_executable) - .args(["-c", "import sysconfig; print(sysconfig.get_path('stdlib') + '/config-' + sysconfig.get_config_var('LDVERSION') + '-' + sysconfig.get_platform())"]) + .args(["-c", r#" +import sysconfig +import os +import glob + +stdlib = sysconfig.get_path('stdlib') +ldversion = sysconfig.get_config_var('LDVERSION') + +# Try to find the actual config directory by globbing +config_pattern = os.path.join(stdlib, f'config-{ldversion}-*') +config_dirs = glob.glob(config_pattern) + +if config_dirs: + print(config_dirs[0]) +else: + # Fallback + platform = sysconfig.get_platform() + fallback_dir = os.path.join(stdlib, f'config-{ldversion}-{platform}') + if os.path.exists(fallback_dir): + print(fallback_dir) + else: + print('') +"#]) .output() .expect("Failed to get Python config directory"); @@ -60,6 +84,12 @@ fn main() { // Check if static library exists and link it if std::path::Path::new(&static_lib_path).exists() { + // TEMPORARY: Disable static linking to test if it's causing GIL issues + println!( + "cargo:warning=Static linking DISABLED for debugging: {}", + static_lib_path + ); + // Add search path and link to Python static library println!("cargo:rustc-link-search=native={}", config_dir); println!("cargo:rustc-link-lib=static=python{}", python_version); @@ -70,29 +100,11 @@ fn main() { println!("cargo:rustc-link-lib=m"); println!("cargo:rustc-link-lib=pthread"); } - - println!( - "cargo:warning=Static linking enabled for Python {}: {}", - python_version, static_lib_path - ); - } else { - // Static library not available - fallback to faulthandler only - println!( - "cargo:warning=Static library not found at {}, using faulthandler fallback only", - static_lib_path - ); } - } else { - // Fallback: faulthandler only - println!( - "cargo:warning=Failed to get config directory, using faulthandler fallback only" - ); } - } else { - // Fallback: faulthandler only - println!("cargo:warning=Failed to get Python version, using faulthandler fallback only"); } + println!("cargo:rerun-if-changed=cpython_internal.c"); println!("cargo:rerun-if-changed=cpython_internal.h"); println!("cargo:rerun-if-changed=build.rs"); diff --git a/src/native/cpython_internal.c b/src/native/cpython_internal.c index 1181565fded..d7792dcad1d 100644 --- a/src/native/cpython_internal.c +++ b/src/native/cpython_internal.c @@ -3,58 +3,23 @@ #include #include -// Direct declaration of _Py_DumpTracebackThreads for static linking -// Uses weak symbol so it's NULL if cant link #ifdef _WIN32 __declspec(selectany) const char* (*_Py_DumpTracebackThreads)(int fd, PyInterpreterState* interp, PyThreadState* current_tstate) = NULL; #else +// Use strong linking for all Python versions extern const char* -_Py_DumpTracebackThreads(int fd, PyInterpreterState* interp, PyThreadState* current_tstate) __attribute__((weak)); +_Py_DumpTracebackThreads(int fd, PyInterpreterState* interp, PyThreadState* current_tstate); #endif const char* crashtracker_dump_traceback_threads(int fd, PyInterpreterState* interp, PyThreadState* current_tstate) { - // Try static linking first - if (_Py_DumpTracebackThreads) { - return _Py_DumpTracebackThreads(fd, interp, current_tstate); - } - - // Fallback to faulthandler - PyObject* faulthandler_module = PyImport_ImportModule("faulthandler"); - if (faulthandler_module == NULL) { - PyErr_Clear(); - return NULL; - } - - PyObject* dump_func = PyObject_GetAttrString(faulthandler_module, "dump_traceback"); - Py_DECREF(faulthandler_module); - - if (dump_func == NULL) { - PyErr_Clear(); - return NULL; - } - - // Call faulthandler.dump_traceback(file=fd, all_threads=True) - PyObject* fd_obj = PyLong_FromLong(fd); - PyObject* all_threads = Py_True; - Py_INCREF(all_threads); - - PyObject* result = PyObject_CallFunction(dump_func, "OO", fd_obj, all_threads); - - Py_DECREF(dump_func); - Py_DECREF(fd_obj); - Py_DECREF(all_threads); - - if (result == NULL) { - PyErr_Clear(); - return NULL; - } - Py_DECREF(result); - return NULL; // Success + // Call CPython's internal traceback dumper + return _Py_DumpTracebackThreads(fd, interp, current_tstate); } + PyThreadState* crashtracker_get_current_tstate(void) { diff --git a/src/native/crashtracker.rs b/src/native/crashtracker.rs index c5be8547133..bc414cbbcd2 100644 --- a/src/native/crashtracker.rs +++ b/src/native/crashtracker.rs @@ -349,7 +349,7 @@ unsafe fn dump_python_traceback_as_string( // Make the read end non-blocking fcntl(read_fd, F_SETFL, O_NONBLOCK); - // Same approach as CPython's faulthandler + // Same approach as CPython's faulthandler let current_tstate = crashtracker_get_current_tstate(); let error_msg = crashtracker_dump_traceback_threads(write_fd, ptr::null_mut(), current_tstate); From aacf83a99f6756dd0497054ea790cde279d92c33 Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Tue, 18 Nov 2025 21:09:55 +0000 Subject: [PATCH 15/21] Static linking to all of python doesnt work, fall back to lazy dynamic loading --- src/native/build.rs | 74 ------------------- src/native/cpython_internal.c | 27 +++++-- src/native/crashtracker.rs | 4 +- .../crashtracker/test_crashtracker.py | 29 ++++++++ 4 files changed, 52 insertions(+), 82 deletions(-) diff --git a/src/native/build.rs b/src/native/build.rs index 04fcfaa4929..dec680cc617 100644 --- a/src/native/build.rs +++ b/src/native/build.rs @@ -29,82 +29,8 @@ fn main() { build.define("Py_BUILD_CORE", "1"); build.file("cpython_internal.c").compile("cpython_internal"); - // Tell rustc to link the static library we just built println!("cargo:rustc-link-lib=static=cpython_internal"); - // Link Python static library for _Py_DumpTracebackThreads access - let python_version_output = std::process::Command::new(python_executable) - .args([ - "-c", - "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')", - ]) - .output() - .expect("Failed to get Python version"); - - if python_version_output.status.success() { - let python_version = String::from_utf8_lossy(&python_version_output.stdout) - .trim() - .to_string(); - - // Get the config directory path where static library is located - // Try multiple possible config directory patterns since sysconfig.get_platform() - // can be inconsistent with actual directory names across platforms - let config_dir_output = std::process::Command::new(python_executable) - .args(["-c", r#" -import sysconfig -import os -import glob - -stdlib = sysconfig.get_path('stdlib') -ldversion = sysconfig.get_config_var('LDVERSION') - -# Try to find the actual config directory by globbing -config_pattern = os.path.join(stdlib, f'config-{ldversion}-*') -config_dirs = glob.glob(config_pattern) - -if config_dirs: - print(config_dirs[0]) -else: - # Fallback - platform = sysconfig.get_platform() - fallback_dir = os.path.join(stdlib, f'config-{ldversion}-{platform}') - if os.path.exists(fallback_dir): - print(fallback_dir) - else: - print('') -"#]) - .output() - .expect("Failed to get Python config directory"); - - if config_dir_output.status.success() { - let config_dir = String::from_utf8_lossy(&config_dir_output.stdout) - .trim() - .to_string(); - let static_lib_path = format!("{}/libpython{}.a", config_dir, python_version); - - // Check if static library exists and link it - if std::path::Path::new(&static_lib_path).exists() { - // TEMPORARY: Disable static linking to test if it's causing GIL issues - println!( - "cargo:warning=Static linking DISABLED for debugging: {}", - static_lib_path - ); - - // Add search path and link to Python static library - println!("cargo:rustc-link-search=native={}", config_dir); - println!("cargo:rustc-link-lib=static=python{}", python_version); - - // Link required dependencies for static Python library (Unix only) - if !cfg!(target_os = "windows") { - println!("cargo:rustc-link-lib=dl"); - println!("cargo:rustc-link-lib=m"); - println!("cargo:rustc-link-lib=pthread"); - } - } - } - } - - println!("cargo:rerun-if-changed=cpython_internal.c"); println!("cargo:rerun-if-changed=cpython_internal.h"); println!("cargo:rerun-if-changed=build.rs"); diff --git a/src/native/cpython_internal.c b/src/native/cpython_internal.c index d7792dcad1d..b6ee4959252 100644 --- a/src/native/cpython_internal.c +++ b/src/native/cpython_internal.c @@ -1,24 +1,39 @@ // CPython internal API wrapper - #include +#define Py_BUILD_CORE #include +/* + Optional internal CPython function. + On Python 3.13+, this symbol may not be exported from shared libraries. + Using weak linking so module loads even if symbol isn't available. +*/ #ifdef _WIN32 __declspec(selectany) const char* (*_Py_DumpTracebackThreads)(int fd, PyInterpreterState* interp, PyThreadState* current_tstate) = NULL; #else -// Use strong linking for all Python versions extern const char* -_Py_DumpTracebackThreads(int fd, PyInterpreterState* interp, PyThreadState* current_tstate); +_Py_DumpTracebackThreads(int fd, PyInterpreterState* interp, PyThreadState* current_tstate) __attribute__((weak)); #endif const char* crashtracker_dump_traceback_threads(int fd, PyInterpreterState* interp, PyThreadState* current_tstate) { - // Call CPython's internal traceback dumper - return _Py_DumpTracebackThreads(fd, interp, current_tstate); -} + // Check if the internal symbol is available +#ifdef _WIN32 + if (_Py_DumpTracebackThreads != NULL) { + return _Py_DumpTracebackThreads(fd, interp, current_tstate); + } +#else + if (_Py_DumpTracebackThreads != NULL) { + return _Py_DumpTracebackThreads(fd, interp, current_tstate); + } +#endif + // Symbol not available (Python 3.13+ shared library) - return error for now + // TODO: Implement faulthandler fallback + return "Internal symbol not available - faulthandler fallback not implemented yet"; +} PyThreadState* crashtracker_get_current_tstate(void) diff --git a/src/native/crashtracker.rs b/src/native/crashtracker.rs index bc414cbbcd2..2ff824ee73f 100644 --- a/src/native/crashtracker.rs +++ b/src/native/crashtracker.rs @@ -349,7 +349,7 @@ unsafe fn dump_python_traceback_as_string( // Make the read end non-blocking fcntl(read_fd, F_SETFL, O_NONBLOCK); - // Same approach as CPython's faulthandler + // Same approach as CPython's faulthandler let current_tstate = crashtracker_get_current_tstate(); let error_msg = crashtracker_dump_traceback_threads(write_fd, ptr::null_mut(), current_tstate); @@ -358,7 +358,7 @@ unsafe fn dump_python_traceback_as_string( if !error_msg.is_null() { close(read_fd); - emit_stacktrace_string("\0".as_ptr() as *const c_char); + emit_stacktrace_string(error_msg as *const c_char); return; } diff --git a/tests/internal/crashtracker/test_crashtracker.py b/tests/internal/crashtracker/test_crashtracker.py index b91cae47035..88c19a530b3 100644 --- a/tests/internal/crashtracker/test_crashtracker.py +++ b/tests/internal/crashtracker/test_crashtracker.py @@ -456,6 +456,35 @@ def test_crashtracker_tags_required(): assert "process_tags".encode() not in report["body"] +@pytest.mark.skipif(not sys.platform.startswith("linux"), reason="Linux only") +@pytest.mark.subprocess() +def test_crashtracker_runtime_stacktrace_required(): + # Tests tag ingestion in the core API + import ctypes + import os + + import tests.internal.crashtracker.utils as utils + + with utils.with_test_agent() as client: + pid = os.fork() + if pid == 0: + ct = utils.CrashtrackerWrapper(base_name="runtime_stacktrace_required") + assert ct.start() + stdout_msg, stderr_msg = ct.logs() + assert not stdout_msg + assert not stderr_msg + + ctypes.string_at(0) + sys.exit(-1) + + # Check for crash ping + _ping = utils.get_crash_ping(client) + + # Check for crash report + report = utils.get_crash_report(client) + assert b"stacktrace_string" in report["body"] + + @pytest.mark.skipif(not sys.platform.startswith("linux"), reason="Linux only") def test_crashtracker_user_tags_envvar(run_python_code_in_subprocess): # Call the program From 308d89484380b18a76e73dd91689146e34b1e20e Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Wed, 19 Nov 2025 14:46:24 +0000 Subject: [PATCH 16/21] clean up unused funcs --- ddtrace/internal/core/crashtracking.py | 23 ----------------------- ddtrace/internal/native/_native.pyi | 1 - src/native/cpython_internal.c | 7 +++---- src/native/crashtracker.rs | 10 ++-------- src/native/lib.rs | 4 ---- 5 files changed, 5 insertions(+), 40 deletions(-) diff --git a/ddtrace/internal/core/crashtracking.py b/ddtrace/internal/core/crashtracking.py index efb64b31bec..50b589b65ba 100644 --- a/ddtrace/internal/core/crashtracking.py +++ b/ddtrace/internal/core/crashtracking.py @@ -26,7 +26,6 @@ from ddtrace.internal.native._native import CrashtrackerStatus from ddtrace.internal.native._native import StacktraceCollection from ddtrace.internal.native._native import crashtracker_init - from ddtrace.internal.native._native import crashtracker_is_runtime_callback_registered from ddtrace.internal.native._native import crashtracker_on_fork from ddtrace.internal.native._native import crashtracker_register_native_runtime_callback from ddtrace.internal.native._native import crashtracker_status @@ -181,25 +180,3 @@ def crashtracker_fork_handler(): print(f"Failed to start crashtracker: {e}", file=sys.stderr) return False return True - - -def register_runtime_callback() -> bool: - if not is_available: - return False - - try: - result = crashtracker_register_native_runtime_callback() - return result == CallbackResult.Ok - except Exception as e: - print(f"Failed to register runtime callback: {e}", file=sys.stderr) - return False - - -def is_runtime_callback_registered() -> bool: - if not is_available: - return False - - try: - return crashtracker_is_runtime_callback_registered() - except Exception: - return False diff --git a/ddtrace/internal/native/_native.pyi b/ddtrace/internal/native/_native.pyi index cc94cc37621..890cbdb5c05 100644 --- a/ddtrace/internal/native/_native.pyi +++ b/ddtrace/internal/native/_native.pyi @@ -108,7 +108,6 @@ def crashtracker_on_fork( def crashtracker_status() -> CrashtrackerStatus: ... def crashtracker_receiver() -> None: ... def crashtracker_register_native_runtime_callback() -> CallbackResult: ... -def crashtracker_is_runtime_callback_registered() -> bool: ... class PyTracerMetadata: """ diff --git a/src/native/cpython_internal.c b/src/native/cpython_internal.c index b6ee4959252..fafb3e0f0f2 100644 --- a/src/native/cpython_internal.c +++ b/src/native/cpython_internal.c @@ -4,8 +4,7 @@ #include /* - Optional internal CPython function. - On Python 3.13+, this symbol may not be exported from shared libraries. + On Python 3.13+, this symbol is not exported from shared libraries. Using weak linking so module loads even if symbol isn't available. */ #ifdef _WIN32 @@ -31,8 +30,8 @@ crashtracker_dump_traceback_threads(int fd, PyInterpreterState* interp, PyThread #endif // Symbol not available (Python 3.13+ shared library) - return error for now - // TODO: Implement faulthandler fallback - return "Internal symbol not available - faulthandler fallback not implemented yet"; + // TODO: Implement stack walking fallback + return "Internal symbol not available - fallback not implemented yet"; } PyThreadState* diff --git a/src/native/crashtracker.rs b/src/native/crashtracker.rs index 2ff824ee73f..43ee8c9b86e 100644 --- a/src/native/crashtracker.rs +++ b/src/native/crashtracker.rs @@ -8,8 +8,8 @@ use std::time::Duration; use libdd_common::Endpoint; use libdd_crashtracker::{ - is_runtime_callback_registered, register_runtime_stacktrace_string_callback, CallbackError, - CrashtrackerConfiguration, CrashtrackerReceiverConfig, Metadata, StacktraceCollection, + register_runtime_stacktrace_string_callback, CallbackError, CrashtrackerConfiguration, + CrashtrackerReceiverConfig, Metadata, StacktraceCollection, }; use pyo3::prelude::*; @@ -405,9 +405,3 @@ pub fn crashtracker_register_native_runtime_callback() -> CallbackResult { Err(e) => e.into(), } } - -/// Check if a runtime callback is currently registered -#[pyfunction(name = "crashtracker_is_runtime_callback_registered")] -pub fn crashtracker_is_runtime_callback_registered() -> bool { - is_runtime_callback_registered() -} diff --git a/src/native/lib.rs b/src/native/lib.rs index 634d03920c2..e7eecfe0065 100644 --- a/src/native/lib.rs +++ b/src/native/lib.rs @@ -35,10 +35,6 @@ fn _native(m: &Bound<'_, PyModule>) -> PyResult<()> { crashtracker::crashtracker_register_native_runtime_callback, m )?)?; - m.add_function(wrap_pyfunction!( - crashtracker::crashtracker_is_runtime_callback_registered, - m - )?)?; } m.add_class::()?; m.add_class::()?; From 94114d20f8bdbeb8cd435bbcdc0acabd3105de64 Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Sun, 23 Nov 2025 03:52:35 +0000 Subject: [PATCH 17/21] dont use c code, just have it in rust and fall back --- src/native/Cargo.lock | 20 +++++++- src/native/Cargo.toml | 1 + src/native/build.rs | 29 +---------- src/native/cpython_internal.c | 41 --------------- src/native/cpython_internal.h | 24 --------- src/native/crashtracker.rs | 96 +++++++++++++++++++++++++++++++---- 6 files changed, 106 insertions(+), 105 deletions(-) delete mode 100644 src/native/cpython_internal.c delete mode 100644 src/native/cpython_internal.h diff --git a/src/native/Cargo.lock b/src/native/Cargo.lock index ab00a11a708..794d1b6c957 100644 --- a/src/native/Cargo.lock +++ b/src/native/Cargo.lock @@ -510,7 +510,7 @@ checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", - "libloading", + "libloading 0.8.9", ] [[package]] @@ -1659,7 +1659,11 @@ dependencies = [ ======= "cc", "datadog-ffe", +<<<<<<< HEAD >>>>>>> 1dcd249bde (Runtime stacks now in main libdd) +======= + "libc", +>>>>>>> 02d53db357 (dont use c code, just have it in rust and fall back) "libdd-common", "libdd-crashtracker", "libdd-data-pipeline", @@ -1668,6 +1672,7 @@ dependencies = [ "libdd-log", "libdd-profiling-ffi", <<<<<<< HEAD +<<<<<<< HEAD ======= "cc", <<<<<<< HEAD @@ -1690,6 +1695,9 @@ dependencies = [ >>>>>>> 29189767b5 (For testing with test tracer in staging) ======= >>>>>>> 1dcd249bde (Runtime stacks now in main libdd) +======= + "libloading 0.9.0", +>>>>>>> 02d53db357 (dont use c code, just have it in rust and fall back) "pyo3", "pyo3-build-config", "pyo3-ffi", @@ -3091,6 +3099,16 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "libloading" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "754ca22de805bb5744484a5b151a9e1a8e837d5dc232c2d7d8c2e3492edc8b60" +dependencies = [ + "cfg-if", + "windows-link 0.2.1", +] + [[package]] name = "linux-raw-sys" version = "0.11.0" diff --git a/src/native/Cargo.toml b/src/native/Cargo.toml index 13810ade838..da4e891ef81 100644 --- a/src/native/Cargo.toml +++ b/src/native/Cargo.toml @@ -29,6 +29,7 @@ libdd-common = { git = "https://github.com/DataDog/libdatadog", rev = "v24.0.0" pyo3 = { version = "0.25", features = ["extension-module", "anyhow"] } tracing = { version = "0.1", default-features = false } pyo3-ffi = "0.25" +libc = "0.2.177" [build-dependencies] pyo3-build-config = "0.25" diff --git a/src/native/build.rs b/src/native/build.rs index dec680cc617..3713d7eb562 100644 --- a/src/native/build.rs +++ b/src/native/build.rs @@ -5,33 +5,6 @@ fn main() { if cfg!(target_os = "macos") { pyo3_build_config::add_extension_module_link_args(); } - - // Compile C sources for crashtracker runtime stack collection - let mut build = cc::Build::new(); - - let python_config = pyo3_build_config::get(); - let python_executable = python_config.executable.as_deref().unwrap_or("python"); - let python_include_output = std::process::Command::new(python_executable) - .args([ - "-c", - "import sysconfig; print(sysconfig.get_path('include'))", - ]) - .output() - .expect("Failed to get Python include directory"); - - if python_include_output.status.success() { - let python_include_dir = String::from_utf8_lossy(&python_include_output.stdout) - .trim() - .to_string(); - build.include(&python_include_dir); - } - - build.define("Py_BUILD_CORE", "1"); - build.file("cpython_internal.c").compile("cpython_internal"); - - println!("cargo:rustc-link-lib=static=cpython_internal"); - - println!("cargo:rerun-if-changed=cpython_internal.c"); - println!("cargo:rerun-if-changed=cpython_internal.h"); println!("cargo:rerun-if-changed=build.rs"); + println!("cargo:rerun-if-changed=crashtracker.rs"); } diff --git a/src/native/cpython_internal.c b/src/native/cpython_internal.c deleted file mode 100644 index fafb3e0f0f2..00000000000 --- a/src/native/cpython_internal.c +++ /dev/null @@ -1,41 +0,0 @@ -// CPython internal API wrapper -#include -#define Py_BUILD_CORE -#include - -/* - On Python 3.13+, this symbol is not exported from shared libraries. - Using weak linking so module loads even if symbol isn't available. -*/ -#ifdef _WIN32 -__declspec(selectany) -const char* (*_Py_DumpTracebackThreads)(int fd, PyInterpreterState* interp, PyThreadState* current_tstate) = NULL; -#else -extern const char* -_Py_DumpTracebackThreads(int fd, PyInterpreterState* interp, PyThreadState* current_tstate) __attribute__((weak)); -#endif - -const char* -crashtracker_dump_traceback_threads(int fd, PyInterpreterState* interp, PyThreadState* current_tstate) -{ - // Check if the internal symbol is available -#ifdef _WIN32 - if (_Py_DumpTracebackThreads != NULL) { - return _Py_DumpTracebackThreads(fd, interp, current_tstate); - } -#else - if (_Py_DumpTracebackThreads != NULL) { - return _Py_DumpTracebackThreads(fd, interp, current_tstate); - } -#endif - - // Symbol not available (Python 3.13+ shared library) - return error for now - // TODO: Implement stack walking fallback - return "Internal symbol not available - fallback not implemented yet"; -} - -PyThreadState* -crashtracker_get_current_tstate(void) -{ - return PyGILState_GetThisThreadState(); -} diff --git a/src/native/cpython_internal.h b/src/native/cpython_internal.h deleted file mode 100644 index af61c243878..00000000000 --- a/src/native/cpython_internal.h +++ /dev/null @@ -1,24 +0,0 @@ -// CPython internal API wrapper header -// This provides C function declarations for accessing CPython internal APIs - -#ifndef CPYTHON_INTERNAL_H -#define CPYTHON_INTERNAL_H - -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - // Wrapper function to call _Py_DumpTracebackThreads - // Returns error message on failure, NULL on success - const char* crashtracker_dump_traceback_threads(int fd, PyInterpreterState* interp, PyThreadState* current_tstate); - - // Wrapper to get the current thread state safely during crashes - PyThreadState* crashtracker_get_current_tstate(void); - -#ifdef __cplusplus -} -#endif - -#endif // CPYTHON_INTERNAL_H diff --git a/src/native/crashtracker.rs b/src/native/crashtracker.rs index 43ee8c9b86e..cf40406c3a2 100644 --- a/src/native/crashtracker.rs +++ b/src/native/crashtracker.rs @@ -13,15 +13,14 @@ use libdd_crashtracker::{ }; use pyo3::prelude::*; -extern "C" { - fn crashtracker_dump_traceback_threads( - fd: c_int, - interp: *mut pyo3_ffi::PyInterpreterState, - current_tstate: *mut pyo3_ffi::PyThreadState, - ) -> *const c_char; - - fn crashtracker_get_current_tstate() -> *mut pyo3_ffi::PyThreadState; +// Function pointer type for _Py_DumpTracebackThreads +type PyDumpTracebackThreadsFn = unsafe extern "C" fn( + fd: c_int, + interp: *mut pyo3_ffi::PyInterpreterState, + current_tstate: *mut pyo3_ffi::PyThreadState, +) -> *const c_char; +extern "C" { fn pipe(pipefd: *mut [c_int; 2]) -> c_int; fn read(fd: c_int, buf: *mut c_void, count: usize) -> isize; fn close(fd: c_int) -> c_int; @@ -331,9 +330,84 @@ impl From for CallbackResult { const MAX_TRACEBACK_SIZE: usize = 8 * 1024; // 8KB +// Attempt to resolve _Py_DumpTracebackThreads at runtime +// Returns None if symbol is not available +unsafe fn get_dump_traceback_fn() -> Option { + // Try to get the symbol from the current process using dlsym + #[cfg(unix)] + { + use std::ffi::CString; + + extern "C" { + fn dlsym( + handle: *mut std::ffi::c_void, + symbol: *const std::ffi::c_char, + ) -> *mut std::ffi::c_void; + } + + const RTLD_DEFAULT: *mut std::ffi::c_void = ptr::null_mut(); + + let symbol_name = match CString::new("_Py_DumpTracebackThreads") { + Ok(name) => name, + Err(_) => return None, + }; + + let symbol_ptr = dlsym(RTLD_DEFAULT, symbol_name.as_ptr()); + + if symbol_ptr.is_null() { + None + } else { + Some(std::mem::transmute(symbol_ptr)) + } + } + + #[cfg(not(unix))] + { + None + } +} + unsafe fn dump_python_traceback_as_string( emit_stacktrace_string: unsafe extern "C" fn(*const c_char), ) { + // Python version check using Py_GetVersion() + let ver_cstr = pyo3_ffi::Py_GetVersion(); + let (mut major, mut minor) = (0, 0); + + if !ver_cstr.is_null() { + if let Ok(ver_str) = std::ffi::CStr::from_ptr(ver_cstr).to_str() { + // Format: "3.14.0 (tags/...)" + let mut parts = ver_str.split('.'); + major = parts + .next() + .and_then(|m| m.parse::().ok()) + .unwrap_or(0); + minor = parts + .next() + .and_then(|m| m.parse::().ok()) + .unwrap_or(0); + } + } + + // Python ≥ 3.13 → Internal traceback APIs removed/hidden + if major > 3 || (major == 3 && minor >= 13) { + emit_stacktrace_string( + "\0".as_ptr() as *const c_char + ); + return; + } + + // Try to get the dump traceback function + let dump_fn = match get_dump_traceback_fn() { + Some(func) => func, + None => { + emit_stacktrace_string( + "\0".as_ptr() as *const c_char + ); + return; + } + }; + // Create a pipe to capture CPython internal traceback dump. _Py_DumpTracebackThreads writes to // a fd. Reading and writing to pipe is signal-safe. We stack allocate a buffer in the beginning, // and use it to read the output @@ -349,10 +423,10 @@ unsafe fn dump_python_traceback_as_string( // Make the read end non-blocking fcntl(read_fd, F_SETFL, O_NONBLOCK); - // Same approach as CPython's faulthandler - let current_tstate = crashtracker_get_current_tstate(); + // Get current thread state using PyO3's GIL state API + let current_tstate = pyo3_ffi::PyGILState_GetThisThreadState(); - let error_msg = crashtracker_dump_traceback_threads(write_fd, ptr::null_mut(), current_tstate); + let error_msg = dump_fn(write_fd, ptr::null_mut(), current_tstate); close(write_fd); From f682de106e94ac91f2b551f705fdd5409f91804b Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Sun, 23 Nov 2025 22:43:09 +0000 Subject: [PATCH 18/21] Trigger CI From 0ede87a29f66b22139905b28c95d1c2e241e0ab8 Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Mon, 24 Nov 2025 14:47:09 +0000 Subject: [PATCH 19/21] Clean up --- src/native/Cargo.lock | 19 ++++---- src/native/Cargo.toml | 2 - src/native/crashtracker.rs | 44 +++---------------- .../crashtracker/test_crashtracker.py | 6 +++ 4 files changed, 19 insertions(+), 52 deletions(-) diff --git a/src/native/Cargo.lock b/src/native/Cargo.lock index 794d1b6c957..5dd4d469a5a 100644 --- a/src/native/Cargo.lock +++ b/src/native/Cargo.lock @@ -510,7 +510,7 @@ checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", - "libloading 0.8.9", + "libloading", ] [[package]] @@ -1651,6 +1651,7 @@ dependencies = [ "anyhow", "build_common", <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD "datadog-ffe", ======= @@ -1664,6 +1665,9 @@ dependencies = [ ======= "libc", >>>>>>> 02d53db357 (dont use c code, just have it in rust and fall back) +======= + "datadog-ffe", +>>>>>>> dfe9efb97f (Clean up) "libdd-common", "libdd-crashtracker", "libdd-data-pipeline", @@ -1673,6 +1677,7 @@ dependencies = [ "libdd-profiling-ffi", <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= "cc", <<<<<<< HEAD @@ -1698,6 +1703,8 @@ dependencies = [ ======= "libloading 0.9.0", >>>>>>> 02d53db357 (dont use c code, just have it in rust and fall back) +======= +>>>>>>> dfe9efb97f (Clean up) "pyo3", "pyo3-build-config", "pyo3-ffi", @@ -3099,16 +3106,6 @@ dependencies = [ "windows-link 0.2.1", ] -[[package]] -name = "libloading" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "754ca22de805bb5744484a5b151a9e1a8e837d5dc232c2d7d8c2e3492edc8b60" -dependencies = [ - "cfg-if", - "windows-link 0.2.1", -] - [[package]] name = "linux-raw-sys" version = "0.11.0" diff --git a/src/native/Cargo.toml b/src/native/Cargo.toml index da4e891ef81..e974f29e354 100644 --- a/src/native/Cargo.toml +++ b/src/native/Cargo.toml @@ -29,11 +29,9 @@ libdd-common = { git = "https://github.com/DataDog/libdatadog", rev = "v24.0.0" pyo3 = { version = "0.25", features = ["extension-module", "anyhow"] } tracing = { version = "0.1", default-features = false } pyo3-ffi = "0.25" -libc = "0.2.177" [build-dependencies] pyo3-build-config = "0.25" -cc = "1.2.39" build_common = { git = "https://github.com/DataDog/libdatadog", rev = "v24.0.0", features = [ "cbindgen", ] } diff --git a/src/native/crashtracker.rs b/src/native/crashtracker.rs index cf40406c3a2..fd2e57ee8d3 100644 --- a/src/native/crashtracker.rs +++ b/src/native/crashtracker.rs @@ -333,11 +333,8 @@ const MAX_TRACEBACK_SIZE: usize = 8 * 1024; // 8KB // Attempt to resolve _Py_DumpTracebackThreads at runtime // Returns None if symbol is not available unsafe fn get_dump_traceback_fn() -> Option { - // Try to get the symbol from the current process using dlsym #[cfg(unix)] { - use std::ffi::CString; - extern "C" { fn dlsym( handle: *mut std::ffi::c_void, @@ -347,12 +344,10 @@ unsafe fn get_dump_traceback_fn() -> Option { const RTLD_DEFAULT: *mut std::ffi::c_void = ptr::null_mut(); - let symbol_name = match CString::new("_Py_DumpTracebackThreads") { - Ok(name) => name, - Err(_) => return None, - }; - - let symbol_ptr = dlsym(RTLD_DEFAULT, symbol_name.as_ptr()); + let symbol_ptr = dlsym( + RTLD_DEFAULT, + b"_Py_DumpTracebackThreads\0".as_ptr() as *const std::ffi::c_char, + ); if symbol_ptr.is_null() { None @@ -370,33 +365,6 @@ unsafe fn get_dump_traceback_fn() -> Option { unsafe fn dump_python_traceback_as_string( emit_stacktrace_string: unsafe extern "C" fn(*const c_char), ) { - // Python version check using Py_GetVersion() - let ver_cstr = pyo3_ffi::Py_GetVersion(); - let (mut major, mut minor) = (0, 0); - - if !ver_cstr.is_null() { - if let Ok(ver_str) = std::ffi::CStr::from_ptr(ver_cstr).to_str() { - // Format: "3.14.0 (tags/...)" - let mut parts = ver_str.split('.'); - major = parts - .next() - .and_then(|m| m.parse::().ok()) - .unwrap_or(0); - minor = parts - .next() - .and_then(|m| m.parse::().ok()) - .unwrap_or(0); - } - } - - // Python ≥ 3.13 → Internal traceback APIs removed/hidden - if major > 3 || (major == 3 && minor >= 13) { - emit_stacktrace_string( - "\0".as_ptr() as *const c_char - ); - return; - } - // Try to get the dump traceback function let dump_fn = match get_dump_traceback_fn() { Some(func) => func, @@ -420,10 +388,8 @@ unsafe fn dump_python_traceback_as_string( let read_fd = pipefd[0]; let write_fd = pipefd[1]; - // Make the read end non-blocking fcntl(read_fd, F_SETFL, O_NONBLOCK); - // Get current thread state using PyO3's GIL state API let current_tstate = pyo3_ffi::PyGILState_GetThisThreadState(); let error_msg = dump_fn(write_fd, ptr::null_mut(), current_tstate); @@ -471,7 +437,7 @@ unsafe extern "C" fn native_runtime_stack_callback( dump_python_traceback_as_string(emit_stacktrace_string); } -/// Register the native runtime stack collection callback (string-based) +/// Register the native runtime stack collection callback #[pyfunction(name = "crashtracker_register_native_runtime_callback")] pub fn crashtracker_register_native_runtime_callback() -> CallbackResult { match register_runtime_stacktrace_string_callback(native_runtime_stack_callback) { diff --git a/tests/internal/crashtracker/test_crashtracker.py b/tests/internal/crashtracker/test_crashtracker.py index 88c19a530b3..e433e1df7ed 100644 --- a/tests/internal/crashtracker/test_crashtracker.py +++ b/tests/internal/crashtracker/test_crashtracker.py @@ -462,6 +462,7 @@ def test_crashtracker_runtime_stacktrace_required(): # Tests tag ingestion in the core API import ctypes import os + import sys import tests.internal.crashtracker.utils as utils @@ -484,6 +485,11 @@ def test_crashtracker_runtime_stacktrace_required(): report = utils.get_crash_report(client) assert b"stacktrace_string" in report["body"] + version = sys.version_info[:2] + # Runtime stacktrace is available only on Python 3.11 and 3.12 + expected = b"in string_at" if (3, 11) <= version <= (3, 12) else b"" + assert expected in report["body"], report["body"] + @pytest.mark.skipif(not sys.platform.startswith("linux"), reason="Linux only") def test_crashtracker_user_tags_envvar(run_python_code_in_subprocess): From 055a5f2159a8041bb70134770186920e8aec57c7 Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Mon, 24 Nov 2025 23:00:14 +0000 Subject: [PATCH 20/21] First pass respond comments --- ddtrace/internal/core/crashtracking.py | 8 - ddtrace/internal/native/_native.pyi | 5 - ...t-runtime-stacktrace-45815b6eecdc317b.yaml | 3 - src/native/Cargo.lock | 2139 +---------------- src/native/Cargo.toml | 5 +- src/native/build.rs | 2 - src/native/crashtracker.rs | 114 +- src/native/lib.rs | 5 - .../crashtracker/test_crashtracker.py | 26 +- 9 files changed, 160 insertions(+), 2147 deletions(-) delete mode 100644 releasenotes/notes/crashtracker-emit-runtime-stacktrace-45815b6eecdc317b.yaml diff --git a/ddtrace/internal/core/crashtracking.py b/ddtrace/internal/core/crashtracking.py index 50b589b65ba..8b3a041f00d 100644 --- a/ddtrace/internal/core/crashtracking.py +++ b/ddtrace/internal/core/crashtracking.py @@ -19,7 +19,6 @@ is_available = True try: - from ddtrace.internal.native._native import CallbackResult from ddtrace.internal.native._native import CrashtrackerConfiguration from ddtrace.internal.native._native import CrashtrackerMetadata from ddtrace.internal.native._native import CrashtrackerReceiverConfig @@ -27,7 +26,6 @@ from ddtrace.internal.native._native import StacktraceCollection from ddtrace.internal.native._native import crashtracker_init from ddtrace.internal.native._native import crashtracker_on_fork - from ddtrace.internal.native._native import crashtracker_register_native_runtime_callback from ddtrace.internal.native._native import crashtracker_status except ImportError: is_available = False @@ -157,12 +155,6 @@ def start(additional_tags: Optional[Dict[str, str]] = None) -> bool: crashtracker_init(config, receiver_config, metadata) - if crashtracker_config.stacktrace_resolver is not None and crashtracker_config.stacktrace_resolver != "none": - result = crashtracker_register_native_runtime_callback() - # Shouldn't block on this, but log an error if it fails - if result != CallbackResult.Ok: - print(f"Failed to register runtime callback: {result}", file=sys.stderr) - def crashtracker_fork_handler(): # We recreate the args here mainly to pass updated runtime_id after # fork diff --git a/ddtrace/internal/native/_native.pyi b/ddtrace/internal/native/_native.pyi index 890cbdb5c05..c515aec12f7 100644 --- a/ddtrace/internal/native/_native.pyi +++ b/ddtrace/internal/native/_native.pyi @@ -95,10 +95,6 @@ class CrashtrackerStatus: Initialized: "CrashtrackerStatus" FailedToInitialize: "CrashtrackerStatus" -class CallbackResult: - Ok: "CallbackResult" - UnknownError: "CallbackResult" - def crashtracker_init( config: CrashtrackerConfiguration, receiver_config: CrashtrackerReceiverConfig, metadata: CrashtrackerMetadata ) -> None: ... @@ -107,7 +103,6 @@ def crashtracker_on_fork( ) -> None: ... def crashtracker_status() -> CrashtrackerStatus: ... def crashtracker_receiver() -> None: ... -def crashtracker_register_native_runtime_callback() -> CallbackResult: ... class PyTracerMetadata: """ diff --git a/releasenotes/notes/crashtracker-emit-runtime-stacktrace-45815b6eecdc317b.yaml b/releasenotes/notes/crashtracker-emit-runtime-stacktrace-45815b6eecdc317b.yaml deleted file mode 100644 index 99819e6977f..00000000000 --- a/releasenotes/notes/crashtracker-emit-runtime-stacktrace-45815b6eecdc317b.yaml +++ /dev/null @@ -1,3 +0,0 @@ -features: - - | - Crashtracker: Allows for the collection of runtime stacktrace when a crash occurs. diff --git a/src/native/Cargo.lock b/src/native/Cargo.lock index 5dd4d469a5a..0f62a598be9 100644 --- a/src/native/Cargo.lock +++ b/src/native/Cargo.lock @@ -73,32 +73,15 @@ dependencies = [ [[package]] name = "anstyle-query" -<<<<<<< HEAD -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" -dependencies = [ - "windows-sys 0.60.2", -======= version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ "windows-sys 0.61.2", ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) ] [[package]] name = "anstyle-wincon" -<<<<<<< HEAD -version = "3.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" -dependencies = [ - "anstyle", - "once_cell_polyfill", - "windows-sys 0.60.2", -======= version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" @@ -106,7 +89,6 @@ dependencies = [ "anstyle", "once_cell_polyfill", "windows-sys 0.61.2", ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) ] [[package]] @@ -135,15 +117,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "aws-lc-rs" -<<<<<<< HEAD -version = "1.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879b6c89592deb404ba4dc0ae6b58ffd1795c78991cbb5b8bc441c48a070440d" -======= -version = "1.15.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5932a7d9d28b0d2ea34c6b3779d35e3dd6f6345317c34e73438c4f1f29144151" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) +checksum = "6b5ce75405893cd713f9ab8e297d8e438f624dde7d706108285f7e17a25a180f" dependencies = [ "aws-lc-sys", "zeroize", @@ -151,17 +127,10 @@ dependencies = [ [[package]] name = "aws-lc-sys" -<<<<<<< HEAD -version = "0.32.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "107a4e9d9cab9963e04e84bb8dee0e25f2a987f9a8bad5ed054abd439caa8f8c" -======= -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1826f2e4cfc2cd19ee53c42fbf68e2f81ec21108e0b7ecf6a71cf062137360fc" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) +checksum = "179c3777a8b5e70e90ea426114ffc565b2c1a9f82f6c4a0c5a34aa6ef5e781b6" dependencies = [ - "bindgen", "cc", "cmake", "dunce", @@ -189,26 +158,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "bindgen" -version = "0.72.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "itertools 0.13.0", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash 2.1.1", - "shlex", - "syn", -] - [[package]] name = "bitflags" version = "2.10.0" @@ -245,91 +194,6 @@ dependencies = [ ] [[package]] -<<<<<<< HEAD -name = "build_common" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -version = "24.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v24.0.0#3445414c9ba4fefc76be46cf7e2f998986592892" -======= -======= ->>>>>>> 29189767b5 (For testing with test tracer in staging) -<<<<<<< HEAD -======= -<<<<<<< HEAD -======= ->>>>>>> c504f6a0ae (First commit) ->>>>>>> 84fe6f9ff2 (First commit) -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -version = "21.0.0" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -<<<<<<< HEAD ->>>>>>> 37544fcdb0 (First commit) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD ->>>>>>> 18ab8f7639 (Dont send runtime id) -======= -======= ->>>>>>> 589b51b5e3 (Dont send runtime id) -======= ->>>>>>> c73beccb21 (No writer context exposed) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -<<<<<<< HEAD ->>>>>>> 68b8f943e2 (No writer context exposed) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -<<<<<<< HEAD ->>>>>>> a675d5640e (Remove class and module name in runtime frame def) -======= -======= -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -<<<<<<< HEAD ->>>>>>> 29189767b5 (For testing with test tracer in staging) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) ->>>>>>> c504f6a0ae (First commit) -<<<<<<< HEAD ->>>>>>> 84fe6f9ff2 (First commit) -======= -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -<<<<<<< HEAD ->>>>>>> 589b51b5e3 (Dont send runtime id) -======= -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) ->>>>>>> 3733ebd6ab (No writer context exposed) ->>>>>>> c73beccb21 (No writer context exposed) -======= name = "block2" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -342,7 +206,6 @@ dependencies = [ name = "build_common" version = "24.0.0" source = "git+https://github.com/DataDog/libdatadog?rev=v24.0.0#3445414c9ba4fefc76be46cf7e2f998986592892" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "cbindgen", "serde", @@ -363,9 +226,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" [[package]] name = "cadence" @@ -397,33 +260,9 @@ dependencies = [ [[package]] name = "cc" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> c504f6a0ae (First commit) -version = "1.2.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9fe6cdbb24b6ade63616c0a0688e45bb56732262c158df3c0c4bea4ca47cb7" -======= -version = "1.2.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1354349954c6fc9cb0deab020f27f783cf0b604e8bb754dc4658ecf0d29c35f" ->>>>>>> c21cdc9e2 (First commit) -<<<<<<< HEAD -======= -version = "1.2.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35900b6c8d709fb1d854671ae27aeaa9eec2f8b01b364e1619a40da3e6fe2afe" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= ->>>>>>> c504f6a0ae (First commit) -======= -version = "1.2.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35900b6c8d709fb1d854671ae27aeaa9eec2f8b01b364e1619a40da3e6fe2afe" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) +version = "1.2.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd405d82c84ff7f35739f175f67d8b9fb7687a0e84ccdc78bd3568839827cf07" dependencies = [ "find-msvc-tools", "jobserver", @@ -431,51 +270,6 @@ dependencies = [ "shlex", ] -[[package]] -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= -name = "cc_utils" -version = "0.1.0" -<<<<<<< HEAD -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" -======= -======= -name = "cc_utils" -version = "0.1.0" -<<<<<<< HEAD -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c504f6a0ae (First commit) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 0926d25de8 (Dont send runtime id) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "anyhow", - "cc", -] - -[[package]] ->>>>>>> c21cdc9e2 (First commit) -<<<<<<< HEAD -======= ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfg-if" version = "1.0.4" @@ -502,55 +296,20 @@ dependencies = [ "windows-link 0.2.1", ] -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "clap" -<<<<<<< HEAD -<<<<<<< HEAD -version = "4.5.50" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2cfd7bf8a6017ddaa4e32ffe7403d547790db06bd171c1c53926faab501623" -======= -version = "4.5.51" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= -version = "4.5.51" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) +checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -<<<<<<< HEAD -<<<<<<< HEAD -version = "4.5.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4c05b9e80c5ccd3a7ef080ad7b6ba7d6fc00a985b8b157197075677c82c7a0" -======= -version = "4.5.51" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= -version = "4.5.51" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) +checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" dependencies = [ "anstream", "anstyle", @@ -675,26 +434,15 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crypto-common" -<<<<<<< HEAD -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -======= version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "generic-array", "typenum", ] [[package]] -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "darling" version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -739,935 +487,24 @@ dependencies = [ "faststr", "log", "md5", - "pyo3", - "regex", - "serde", - "serde-bool", - "serde_json", - "serde_with", - "thiserror 2.0.17", - "url", -] - -[[package]] -<<<<<<< HEAD -======= -======= ->>>>>>> d4c329b287 (For testing with test tracer in staging) -<<<<<<< HEAD -======= -======= ->>>>>>> 29189767b5 (For testing with test tracer in staging) -name = "data-pipeline" -<<<<<<< HEAD -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -version = "21.0.0" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -<<<<<<< HEAD -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "anyhow", - "arc-swap", - "bytes", - "datadog-ddsketch", - "datadog-trace-protobuf", - "datadog-trace-stats", - "datadog-trace-utils", - "ddcommon", - "ddtelemetry", - "dogstatsd-client", - "either", - "http", - "http-body-util", - "hyper", - "hyper-util", - "rmp-serde", - "serde", - "serde_json", - "sha2", - "tinybytes", - "tokio", - "tokio-util", - "tracing", - "uuid", -] - -[[package]] -name = "datadog-alloc" -<<<<<<< HEAD -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -version = "21.0.0" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -<<<<<<< HEAD -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "allocator-api2", - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "datadog-crashtracker" -<<<<<<< HEAD -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -version = "21.0.0" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -<<<<<<< HEAD -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -======= -name = "datadog-crashtracker" -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "anyhow", - "backtrace", - "blazesym", - "cc", - "chrono", - "http", - "libc", - "libdd-common", - "libdd-telemetry", - "nix", - "num-derive", - "num-traits", - "os_info", - "page_size", - "portable-atomic", - "rand", - "schemars", - "serde", - "serde_json", - "symbolic-common", - "symbolic-demangle", - "thiserror", - "tokio", - "uuid", - "windows 0.59.0", -<<<<<<< HEAD -] - -[[package]] -name = "datadog-ddsketch" -<<<<<<< HEAD -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -version = "21.0.0" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -<<<<<<< HEAD -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "prost", -] - -[[package]] -name = "datadog-library-config" -version = "0.0.2" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -<<<<<<< HEAD -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -======= ->>>>>>> c504f6a0ae (First commit) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "anyhow", - "memfd", - "rand", - "rmp", - "rmp-serde", - "serde", - "serde_yaml", -] - -[[package]] -name = "datadog-log" -<<<<<<< HEAD -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -version = "21.0.0" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -<<<<<<< HEAD -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "chrono", - "tracing", - "tracing-appender", - "tracing-subscriber", -======= ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -] - -[[package]] -name = "datadog-profiling" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> c504f6a0ae (First commit) -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -version = "21.0.0" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -<<<<<<< HEAD -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -======= -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "anyhow", - "bitmaps", - "byteorder", - "bytes", - "chrono", - "futures", - "http", - "http-body-util", - "hyper", - "hyper-multipart-rfc7578", - "indexmap", -<<<<<<< HEAD -======= - "libdd-alloc", - "libdd-common", - "libdd-profiling-protobuf", - "lz4_flex", ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) - "mime", - "prost", - "rustc-hash 1.1.0", - "serde", - "serde_json", - "target-triple", - "tokio", - "tokio-util", - "zstd", -] - -[[package]] -name = "datadog-profiling-ffi" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> c504f6a0ae (First commit) -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -version = "21.0.0" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -<<<<<<< HEAD -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -======= -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "anyhow", - "build_common", - "datadog-profiling", - "function_name", - "futures", - "http-body-util", - "hyper", - "libc", - "libdd-common", - "libdd-common-ffi", - "serde_json", - "tokio-util", -] - -[[package]] -<<<<<<< HEAD -name = "datadog-profiling-protobuf" -<<<<<<< HEAD -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -version = "21.0.0" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -<<<<<<< HEAD -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "prost", -] - -[[package]] -name = "datadog-trace-normalization" -<<<<<<< HEAD -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -version = "21.0.0" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -<<<<<<< HEAD -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "anyhow", - "datadog-trace-protobuf", -] - -[[package]] -name = "datadog-trace-protobuf" -<<<<<<< HEAD -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -version = "21.0.0" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -<<<<<<< HEAD -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "prost", - "serde", - "serde_bytes", -] - -[[package]] -name = "datadog-trace-stats" -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -dependencies = [ - "datadog-ddsketch", - "datadog-trace-protobuf", - "datadog-trace-utils", - "hashbrown 0.15.5", -] - -[[package]] -name = "datadog-trace-utils" -<<<<<<< HEAD -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -version = "21.0.0" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -<<<<<<< HEAD -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "anyhow", - "bytes", - "datadog-trace-normalization", - "datadog-trace-protobuf", - "ddcommon", - "futures", - "http-body-util", - "hyper", - "prost", - "rand", - "rmp", - "rmp-serde", - "rmpv", - "serde", - "serde_json", - "tinybytes", - "tokio", - "tracing", -] - -[[package]] -name = "ddcommon" -<<<<<<< HEAD -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -version = "21.0.0" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -<<<<<<< HEAD -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "anyhow", - "cc", - "const_format", - "futures", - "futures-core", - "futures-util", - "hex", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-util", - "libc", - "nix", - "pin-project", - "regex", - "rustls", - "rustls-native-certs", - "serde", - "static_assertions", - "thiserror", - "tokio", - "tokio-rustls", - "tower-service", - "windows-sys 0.52.0", -] - -[[package]] -name = "ddcommon-ffi" -<<<<<<< HEAD -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -version = "21.0.0" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -<<<<<<< HEAD -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "anyhow", - "build_common", - "chrono", - "crossbeam-queue", - "ddcommon", - "hyper", - "serde", -] - -[[package]] -name = "ddtelemetry" -<<<<<<< HEAD -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -version = "21.0.0" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -<<<<<<< HEAD -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "anyhow", - "base64", - "datadog-ddsketch", - "ddcommon", - "futures", - "hashbrown 0.15.5", - "http", - "http-body-util", - "hyper", - "hyper-util", - "libc", - "serde", - "serde_json", - "sys-info", - "tokio", - "tokio-util", - "tracing", - "uuid", - "winver", + "pyo3", + "regex", + "serde", + "serde-bool", + "serde_json", + "serde_with", + "thiserror 2.0.17", + "url", ] [[package]] -<<<<<<< HEAD ->>>>>>> 37544fcdb0 (First commit) -<<<<<<< HEAD ->>>>>>> 5dbc278ef2 (First commit) -======= -======= -======= ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) ->>>>>>> 29189767b5 (For testing with test tracer in staging) ->>>>>>> d4c329b287 (For testing with test tracer in staging) -======= ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "ddtrace-native" version = "0.1.0" dependencies = [ "anyhow", "build_common", -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD "datadog-ffe", -======= -<<<<<<< HEAD ->>>>>>> 5dbc278ef2 (First commit) -======= - "cc", - "datadog-ffe", -<<<<<<< HEAD ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) -======= "libc", ->>>>>>> 02d53db357 (dont use c code, just have it in rust and fall back) -======= - "datadog-ffe", ->>>>>>> dfe9efb97f (Clean up) "libdd-common", "libdd-crashtracker", "libdd-data-pipeline", @@ -1675,36 +512,6 @@ dependencies = [ "libdd-library-config", "libdd-log", "libdd-profiling-ffi", -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= - "cc", -<<<<<<< HEAD -======= - "data-pipeline", ->>>>>>> c504f6a0ae (First commit) - "datadog-crashtracker", - "datadog-profiling-ffi", -<<<<<<< HEAD - "ddcommon", ->>>>>>> 37544fcdb0 (First commit) -======= - "libc", - "libdd-common", - "libdd-common-ffi", - "libdd-data-pipeline", - "libdd-ddsketch", - "libdd-library-config", - "libdd-log", ->>>>>>> 29189767b5 (For testing with test tracer in staging) -======= ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) -======= - "libloading 0.9.0", ->>>>>>> 02d53db357 (dont use c code, just have it in rust and fall back) -======= ->>>>>>> dfe9efb97f (Clean up) "pyo3", "pyo3-build-config", "pyo3-ffi", @@ -1722,21 +529,9 @@ dependencies = [ [[package]] name = "deranged" -<<<<<<< HEAD -<<<<<<< HEAD -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41953f86f8a05768a6cda24def994fd2f424b04ec5c719cf89989779f199071" -======= version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "powerfmt", ] @@ -1772,10 +567,6 @@ dependencies = [ ] [[package]] -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= name = "dispatch2" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1786,7 +577,6 @@ dependencies = [ ] [[package]] ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "displaydoc" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1798,76 +588,6 @@ dependencies = [ ] [[package]] -<<<<<<< HEAD -======= -======= ->>>>>>> d4c329b287 (For testing with test tracer in staging) -<<<<<<< HEAD -======= -======= ->>>>>>> 29189767b5 (For testing with test tracer in staging) -name = "dogstatsd-client" -<<<<<<< HEAD -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -version = "21.0.0" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -<<<<<<< HEAD -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "anyhow", - "cadence", - "ddcommon", - "http", - "serde", - "tracing", -] - -[[package]] -<<<<<<< HEAD ->>>>>>> 37544fcdb0 (First commit) -<<<<<<< HEAD ->>>>>>> 5dbc278ef2 (First commit) -======= -======= -======= ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) ->>>>>>> 29189767b5 (For testing with test tracer in staging) ->>>>>>> d4c329b287 (For testing with test tracer in staging) -======= ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "dunce" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1937,33 +657,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> c504f6a0ae (First commit) -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" -======= -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959" ->>>>>>> c21cdc9e2 (First commit) -<<<<<<< HEAD -======= -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= ->>>>>>> c504f6a0ae (First commit) -======= -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) +checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" [[package]] name = "fnv" @@ -2098,15 +794,9 @@ dependencies = [ [[package]] name = "generic-array" -<<<<<<< HEAD -version = "0.14.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" -======= version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "typenum", "version_check", @@ -2152,12 +842,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "glob" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" - [[package]] name = "hashbrown" version = "0.15.5" @@ -2171,9 +855,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" [[package]] name = "heck" @@ -2189,12 +873,11 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "http" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" dependencies = [ "bytes", - "fnv", "itoa", ] @@ -2229,15 +912,9 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hyper" -<<<<<<< HEAD -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" -======= -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1744436df46f0bde35af3eda22aeaba453aada65d8f1c171cd8a5f59030bd69f" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" dependencies = [ "atomic-waker", "bytes", @@ -2286,15 +963,9 @@ dependencies = [ [[package]] name = "hyper-util" -<<<<<<< HEAD -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" -======= version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52e9a2a24dc5c6821e71a7030e1e14b7b632acac55c40e9d2e082c621261bb56" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "bytes", "futures-channel", @@ -2427,352 +1098,93 @@ name = "idna" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - -[[package]] -name = "indexmap" -version = "2.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" -dependencies = [ - "equivalent", - "hashbrown 0.16.0", -] - -[[package]] -name = "indoc" -version = "2.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" -dependencies = [ - "rustversion", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" - -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "jobserver" -version = "0.1.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" -dependencies = [ - "getrandom 0.3.4", - "libc", -] - -[[package]] -name = "js-sys" -<<<<<<< HEAD -<<<<<<< HEAD -version = "0.3.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" -======= -version = "0.3.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= -version = "0.3.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "libc" -version = "0.2.177" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" -<<<<<<< HEAD -<<<<<<< HEAD -======= - -[[package]] -name = "libdd-alloc" -version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" -dependencies = [ - "allocator-api2", - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "libdd-common" -version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" -dependencies = [ - "anyhow", - "cc", - "const_format", - "futures", - "futures-core", - "futures-util", - "hex", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-util", - "libc", - "nix", - "pin-project", - "regex", - "rustls", - "rustls-native-certs", - "serde", - "static_assertions", - "thiserror", - "tokio", - "tokio-rustls", - "tower-service", - "windows-sys 0.52.0", -] - -[[package]] -name = "libdd-common-ffi" -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" -dependencies = [ - "anyhow", - "build_common", - "chrono", - "crossbeam-queue", - "hyper", - "libdd-common", - "serde", -] - -[[package]] -name = "libdd-data-pipeline" -version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" -dependencies = [ - "anyhow", - "arc-swap", - "bytes", - "either", - "http", - "http-body-util", - "hyper", - "hyper-util", - "libdd-common", - "libdd-ddsketch", - "libdd-dogstatsd-client", - "libdd-telemetry", - "libdd-tinybytes", - "libdd-trace-protobuf", - "libdd-trace-stats", - "libdd-trace-utils", - "rmp-serde", - "serde", - "serde_json", - "sha2", - "tokio", - "tokio-util", - "tracing", - "uuid", -] - -[[package]] -name = "libdd-ddsketch" -version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" -dependencies = [ - "prost", -] - -[[package]] -name = "libdd-dogstatsd-client" -version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" -dependencies = [ - "anyhow", - "cadence", - "http", - "libdd-common", - "serde", - "tracing", -] - -[[package]] -name = "libdd-library-config" -version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" -dependencies = [ - "anyhow", - "memfd", - "rand", - "rmp", - "rmp-serde", - "serde", - "serde_yaml", +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", ] [[package]] -name = "libdd-log" -version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ - "chrono", - "tracing", - "tracing-appender", - "tracing-subscriber", + "icu_normalizer", + "icu_properties", ] [[package]] -name = "libdd-profiling-protobuf" -version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +name = "indexmap" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" dependencies = [ - "prost", + "equivalent", + "hashbrown 0.16.1", ] [[package]] -name = "libdd-telemetry" -version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +name = "indoc" +version = "2.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" dependencies = [ - "anyhow", - "base64", - "futures", - "hashbrown 0.15.5", - "http", - "http-body-util", - "hyper", - "hyper-util", - "libc", - "libdd-common", - "libdd-ddsketch", - "serde", - "serde_json", - "sys-info", - "tokio", - "tokio-util", - "tracing", - "uuid", - "winver", + "rustversion", ] [[package]] -name = "libdd-tinybytes" -version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" -dependencies = [ - "serde", -] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] -name = "libdd-trace-normalization" -version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" dependencies = [ - "anyhow", - "libdd-trace-protobuf", + "either", ] [[package]] -name = "libdd-trace-protobuf" -version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" -dependencies = [ - "prost", - "serde", - "serde_bytes", -] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] -name = "libdd-trace-stats" -version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ - "hashbrown 0.15.5", - "libdd-ddsketch", - "libdd-trace-protobuf", - "libdd-trace-utils", + "getrandom 0.3.4", + "libc", ] [[package]] -name = "libdd-trace-utils" -version = "1.0.0" -source = "git+https://github.com/DataDog/libdatadog?branch=main#c9a8858072b4cda335b987a4dba9147a9141165e" +name = "js-sys" +version = "0.3.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" dependencies = [ - "anyhow", - "bytes", - "futures", - "http-body-util", - "hyper", - "indexmap", - "libdd-common", - "libdd-tinybytes", - "libdd-trace-normalization", - "libdd-trace-protobuf", - "prost", - "rand", - "rmp", - "rmp-serde", - "rmpv", - "serde", - "serde_json", - "tokio", - "tracing", + "once_cell", + "wasm-bindgen", ] ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.177" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libdd-alloc" @@ -2803,11 +1215,7 @@ dependencies = [ "hyper-rustls", "hyper-util", "libc", -<<<<<<< HEAD - "nix", -======= "nix 0.29.0", ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) "pin-project", "regex", "rustls", @@ -2849,11 +1257,7 @@ dependencies = [ "libc", "libdd-common", "libdd-telemetry", -<<<<<<< HEAD - "nix", -======= "nix 0.29.0", ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) "num-derive", "num-traits", "os_info", @@ -2970,7 +1374,7 @@ dependencies = [ "lz4_flex", "mime", "prost", - "rustc-hash 1.1.0", + "rustc-hash", "serde", "serde_json", "target-triple", @@ -3096,16 +1500,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "libloading" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" -dependencies = [ - "cfg-if", - "windows-link 0.2.1", -] - [[package]] name = "linux-raw-sys" version = "0.11.0" @@ -3123,31 +1517,10 @@ name = "log" version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "serde", "value-bag", ] -<<<<<<< HEAD -======= -<<<<<<< HEAD -======= - -[[package]] -name = "lz4_flex" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a8cbbb2831780bc3b9c15a41f5b49222ef756b6730a95f3decfdd15903eb5a3" -dependencies = [ - "twox-hash", -] ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) ->>>>>>> d4c329b287 (For testing with test tracer in staging) -======= ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) [[package]] name = "lz4_flex" @@ -3222,12 +1595,6 @@ dependencies = [ "unicase", ] -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.8.9" @@ -3272,8 +1639,6 @@ dependencies = [ ] [[package]] -<<<<<<< HEAD -======= name = "nix" version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3285,17 +1650,6 @@ dependencies = [ "libc", ] -[[package]] ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - [[package]] name = "num-conv" version = "0.1.0" @@ -3323,8 +1677,6 @@ dependencies = [ ] [[package]] -<<<<<<< HEAD -======= name = "objc2" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3484,7 +1836,6 @@ dependencies = [ ] [[package]] ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "object" version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3513,16 +1864,6 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "os_info" -<<<<<<< HEAD -version = "3.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0e1ac5fde8d43c34139135df8ea9ee9465394b2d8d20f032d38998f64afffc3" -dependencies = [ - "log", - "plist", - "serde", - "windows-sys 0.52.0", -======= version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c39b5918402d564846d5aba164c09a66cc88d232179dfd3e3c619a25a268392" @@ -3535,7 +1876,6 @@ dependencies = [ "objc2-ui-kit", "serde", "windows-sys 0.61.2", ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) ] [[package]] @@ -3599,22 +1939,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] -<<<<<<< HEAD -name = "plist" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740ebea15c5d1428f910cd1a5f52cebf8d25006245ed8ade92702f4943d91e07" -dependencies = [ - "base64", - "indexmap", - "quick-xml", - "serde", - "time", -] - -[[package]] -======= ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "portable-atomic" version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3647,33 +1971,11 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "prettyplease" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" -dependencies = [ - "proc-macro2", - "syn", -] - [[package]] name = "proc-macro2" -<<<<<<< HEAD -<<<<<<< HEAD -version = "1.0.102" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e0f6df8eaa422d97d72edcd152e1451618fed47fabbdbd5a8864167b1d4aff7" -======= -version = "1.0.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "unicode-ident", ] @@ -3695,7 +1997,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" dependencies = [ "anyhow", - "itertools 0.14.0", + "itertools", "proc-macro2", "quote", "syn", @@ -3765,32 +2067,10 @@ dependencies = [ ] [[package]] -<<<<<<< HEAD -name = "quick-xml" -version = "0.38.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" -dependencies = [ - "memchr", -] - -[[package]] -name = "quote" -<<<<<<< HEAD -version = "1.0.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" -======= -version = "1.0.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= name = "quote" version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "proc-macro2", ] @@ -3918,12 +2198,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustc-hash" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" - [[package]] name = "rustix" version = "1.1.2" @@ -3939,21 +2213,9 @@ dependencies = [ [[package]] name = "rustls" -<<<<<<< HEAD -<<<<<<< HEAD -version = "0.23.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9586e9ee2b4f8fab52a0048ca7334d7024eef48e2cb9407e3497bb7cab7fa7" -======= -version = "0.23.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= version = "0.23.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "aws-lc-rs", "once_cell", @@ -3987,21 +2249,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -<<<<<<< HEAD -<<<<<<< HEAD -version = "0.103.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10b3f4191e8a80e6b43eebabfac91e5dcecebb27a71f04e820c47ec41d314bf" -======= -version = "0.103.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= version = "0.103.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "aws-lc-rs", "ring", @@ -4139,19 +2389,11 @@ dependencies = [ [[package]] name = "serde_fmt" -<<<<<<< HEAD version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e497af288b3b95d067a23a4f749f2861121ffcb2f6d8379310dcda040c345ed" dependencies = [ "serde_core", -======= -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d4ddca14104cd60529e8c7f7ba71a2c8acd8f7f5cfcdc2faf97eeb7c3010a4" -dependencies = [ - "serde", ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) ] [[package]] @@ -4380,9 +2622,9 @@ dependencies = [ [[package]] name = "symbolic-common" -version = "12.16.3" +version = "12.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d03f433c9befeea460a01d750e698aa86caf86dcfbd77d552885cd6c89d52f50" +checksum = "b3d8046c5674ab857104bc4559d505f4809b8060d57806e45d49737c97afeb60" dependencies = [ "debugid", "memmap2", @@ -4392,9 +2634,9 @@ dependencies = [ [[package]] name = "symbolic-demangle" -version = "12.16.3" +version = "12.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d359ef6192db1760a34321ec4f089245ede4342c27e59be99642f12a859de8" +checksum = "1accb6e5c4b0f682de907623912e616b44be1c9e725775155546669dbff720ec" dependencies = [ "cpp_demangle", "msvc-demangler", @@ -4404,21 +2646,9 @@ dependencies = [ [[package]] name = "syn" -<<<<<<< HEAD -<<<<<<< HEAD -version = "2.0.108" +version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917" -======= -version = "2.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f17c7e013e88258aa9543dcbe81aca68a667a9ac37cd69c9fbc07858bfe0e2f" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= -version = "2.0.110" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", @@ -4552,11 +2782,6 @@ dependencies = [ ] [[package]] -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "tinystr" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4567,71 +2792,6 @@ dependencies = [ ] [[package]] -<<<<<<< HEAD -======= -======= ->>>>>>> d4c329b287 (For testing with test tracer in staging) -<<<<<<< HEAD -======= -======= ->>>>>>> 29189767b5 (For testing with test tracer in staging) -name = "tinybytes" -<<<<<<< HEAD -version = "23.0.0" -source = "git+https://github.com/DataDog/libdatadog?rev=v23.0.0#c4a66e2075084b68174077b8306ba92e76be2240" -======= -version = "21.0.0" -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= ->>>>>>> 3733ebd6ab (No writer context exposed) -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=5fad559ba9d3a60cdc5699418fa93d38beda8bb0#5fad559ba9d3a60cdc5699418fa93d38beda8bb0" ->>>>>>> 637f39e5e (Dont send runtime id) -<<<<<<< HEAD -<<<<<<< HEAD -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=538a7f1c236f9c70ab91de6230b716807c721349#538a7f1c236f9c70ab91de6230b716807c721349" ->>>>>>> 8baf78b87 (Remove class and module name in runtime frame def) -======= -source = "git+https://github.com/DataDog/libdatadog?rev=6215e873b354cbae42ad914e85f4c7893451f2f5#6215e873b354cbae42ad914e85f4c7893451f2f5" ->>>>>>> c21cdc9e2 (First commit) ->>>>>>> c504f6a0ae (First commit) -======= ->>>>>>> 0926d25de8 (Dont send runtime id) -======= -======= -source = "git+https://github.com/DataDog/libdatadog?rev=e99acfe76f5f3e9823d093ee88979c2fdc7dfae4#e99acfe76f5f3e9823d093ee88979c2fdc7dfae4" ->>>>>>> fe974f6b2 (No writer context exposed) ->>>>>>> 3733ebd6ab (No writer context exposed) -dependencies = [ - "serde", -] - -[[package]] -<<<<<<< HEAD ->>>>>>> 37544fcdb0 (First commit) -<<<<<<< HEAD ->>>>>>> 5dbc278ef2 (First commit) -======= -======= -======= ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) ->>>>>>> 29189767b5 (For testing with test tracer in staging) ->>>>>>> d4c329b287 (For testing with test tracer in staging) -======= ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) name = "tokio" version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4821,21 +2981,9 @@ checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" -<<<<<<< HEAD -<<<<<<< HEAD -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06" -======= -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) [[package]] name = "unicode-xid" @@ -4905,15 +3053,9 @@ checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "value-bag" -<<<<<<< HEAD version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ba6f5989077681266825251a52748b8c1d8a4ad098cc37e440103d0ea717fc0" -======= -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943ce29a8a743eb10d6082545d861b24f9d1b160b7d741e0f2cdf726bec909c5" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "value-bag-serde1", "value-bag-sval2", @@ -4921,35 +3063,20 @@ dependencies = [ [[package]] name = "value-bag-serde1" -<<<<<<< HEAD version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16530907bfe2999a1773ca5900a65101e092c70f642f25cc23ca0c43573262c5" dependencies = [ "erased-serde", "serde_core", -======= -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35540706617d373b118d550d41f5dfe0b78a0c195dc13c6815e92e2638432306" -dependencies = [ - "erased-serde", - "serde", ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) "serde_fmt", ] [[package]] name = "value-bag-sval2" -<<<<<<< HEAD version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d00ae130edd690eaa877e4f40605d534790d1cf1d651e7685bd6a144521b251f" -======= -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe7e140a2658cc16f7ee7a86e413e803fc8f9b5127adc8755c19f9fefa63a52" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "sval", "sval_buffer", @@ -4992,66 +3119,22 @@ dependencies = [ [[package]] name = "wasm-bindgen" -<<<<<<< HEAD -<<<<<<< HEAD -version = "0.2.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" -======= -version = "0.2.105" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", -<<<<<<< HEAD -<<<<<<< HEAD - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", -======= ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -<<<<<<< HEAD -<<<<<<< HEAD -version = "0.2.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" -======= -version = "0.2.105" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5059,21 +3142,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -<<<<<<< HEAD -<<<<<<< HEAD -version = "0.2.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" -======= -version = "0.2.105" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "bumpalo", "proc-macro2", @@ -5084,21 +3155,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -<<<<<<< HEAD -<<<<<<< HEAD -version = "0.2.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" -======= -version = "0.2.105" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" ->>>>>>> a9f39cbc4 (For testing with test tracer in staging) -======= version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" ->>>>>>> 1dcd249bde (Runtime stacks now in main libdd) dependencies = [ "unicode-ident", ] @@ -5516,18 +3575,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.27" +version = "0.8.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +checksum = "43fa6694ed34d6e57407afbccdeecfa268c470a7d2a5b0cf49ce9fcc345afb90" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.27" +version = "0.8.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +checksum = "c640b22cd9817fae95be82f0d2f90b11f7605f6c319d16705c459b27ac2cbc26" dependencies = [ "proc-macro2", "quote", diff --git a/src/native/Cargo.toml b/src/native/Cargo.toml index e974f29e354..affa0fa5e06 100644 --- a/src/native/Cargo.toml +++ b/src/native/Cargo.toml @@ -11,11 +11,12 @@ opt-level = 's' codegen-units = 1 [features] -crashtracker = ["dep:anyhow", "dep:libdd-crashtracker"] +crashtracker = ["dep:anyhow", "dep:libdd-crashtracker", "dep:pyo3-ffi", "dep:libc"] profiling = ["dep:libdd-profiling-ffi"] [dependencies] anyhow = { version = "1.0", optional = true } +libc = { version = "0.2", optional = true } datadog-ffe = { git = "https://github.com/DataDog/libdatadog", rev = "v24.0.0", version = "1.0.0", features = ["pyo3"] } libdd-crashtracker = { git = "https://github.com/DataDog/libdatadog", rev = "v24.0.0", optional = true } libdd-ddsketch = { git = "https://github.com/DataDog/libdatadog", rev = "v24.0.0" } @@ -28,7 +29,7 @@ libdd-profiling-ffi = { git = "https://github.com/DataDog/libdatadog", rev = "v2 libdd-common = { git = "https://github.com/DataDog/libdatadog", rev = "v24.0.0" } pyo3 = { version = "0.25", features = ["extension-module", "anyhow"] } tracing = { version = "0.1", default-features = false } -pyo3-ffi = "0.25" +pyo3-ffi = { version = "0.25", optional = true } [build-dependencies] pyo3-build-config = "0.25" diff --git a/src/native/build.rs b/src/native/build.rs index 3713d7eb562..91f43089a84 100644 --- a/src/native/build.rs +++ b/src/native/build.rs @@ -5,6 +5,4 @@ fn main() { if cfg!(target_os = "macos") { pyo3_build_config::add_extension_module_link_args(); } - println!("cargo:rerun-if-changed=build.rs"); - println!("cargo:rerun-if-changed=crashtracker.rs"); } diff --git a/src/native/crashtracker.rs b/src/native/crashtracker.rs index fd2e57ee8d3..8e5db14e637 100644 --- a/src/native/crashtracker.rs +++ b/src/native/crashtracker.rs @@ -8,7 +8,7 @@ use std::time::Duration; use libdd_common::Endpoint; use libdd_crashtracker::{ - register_runtime_stacktrace_string_callback, CallbackError, CrashtrackerConfiguration, + register_runtime_stacktrace_string_callback, CrashtrackerConfiguration, CrashtrackerReceiverConfig, Metadata, StacktraceCollection, }; use pyo3::prelude::*; @@ -20,6 +20,10 @@ type PyDumpTracebackThreadsFn = unsafe extern "C" fn( current_tstate: *mut pyo3_ffi::PyThreadState, ) -> *const c_char; +// Cached function pointer to avoid dlsym during crash +static mut DUMP_TRACEBACK_FN: Option = None; +static DUMP_TRACEBACK_INIT: std::sync::Once = std::sync::Once::new(); + extern "C" { fn pipe(pipefd: *mut [c_int; 2]) -> c_int; fn read(fd: c_int, buf: *mut c_void, count: usize) -> isize; @@ -27,9 +31,6 @@ extern "C" { fn fcntl(fd: c_int, cmd: c_int, arg: c_int) -> c_int; } -const F_SETFL: c_int = 4; -const O_NONBLOCK: c_int = 0o4000; - pub trait RustWrapper { type Inner; const INNER_TYPE_NAME: &'static str; @@ -255,9 +256,18 @@ pub fn crashtracker_init<'py>( if let (Some(config), Some(receiver_config), Some(metadata)) = (config_opt, receiver_config_opt, metadata_opt) { + let runtime_stacktrace_enabled = std::env::var("DD_CRASHTRACKER_EMIT_RUNTIME_STACKS").unwrap_or_default(); + if runtime_stacktrace_enabled == "true" || runtime_stacktrace_enabled == "1" { + unsafe { + init_dump_traceback_fn(); + } + if let Err(e) = register_runtime_stacktrace_string_callback(native_runtime_stack_callback) { + eprintln!("Failed to register runtime callback: {}", e); + } + } match libdd_crashtracker::init(config, receiver_config, metadata) { - Ok(_) => CRASHTRACKER_STATUS - .store(CrashtrackerStatus::Initialized as u8, Ordering::SeqCst), + Ok(_) => + CRASHTRACKER_STATUS.store(CrashtrackerStatus::Initialized as u8, Ordering::SeqCst), Err(e) => { eprintln!("Failed to initialize crashtracker: {}", e); CRASHTRACKER_STATUS.store( @@ -309,64 +319,50 @@ pub fn crashtracker_receiver() -> anyhow::Result<()> { libdd_crashtracker::receiver_entry_point_stdin() } -/// Result type for runtime callback operations -#[pyclass( - eq, - eq_int, - name = "CallbackResult", - module = "datadog.internal._native" -)] -#[derive(Debug, PartialEq, Eq)] -pub enum CallbackResult { - Ok, - Error, -} - -impl From for CallbackResult { - fn from(_error: CallbackError) -> Self { - CallbackResult::Error - } -} - const MAX_TRACEBACK_SIZE: usize = 8 * 1024; // 8KB // Attempt to resolve _Py_DumpTracebackThreads at runtime -// Returns None if symbol is not available -unsafe fn get_dump_traceback_fn() -> Option { - #[cfg(unix)] - { - extern "C" { - fn dlsym( - handle: *mut std::ffi::c_void, - symbol: *const std::ffi::c_char, - ) -> *mut std::ffi::c_void; - } +// Try to link once during registration +unsafe fn init_dump_traceback_fn() { + DUMP_TRACEBACK_INIT.call_once(|| { + #[cfg(unix)] + { + extern "C" { + fn dlsym( + handle: *mut std::ffi::c_void, + symbol: *const std::ffi::c_char, + ) -> *mut std::ffi::c_void; + } - const RTLD_DEFAULT: *mut std::ffi::c_void = ptr::null_mut(); + const RTLD_DEFAULT: *mut std::ffi::c_void = ptr::null_mut(); - let symbol_ptr = dlsym( - RTLD_DEFAULT, - b"_Py_DumpTracebackThreads\0".as_ptr() as *const std::ffi::c_char, - ); + let symbol_ptr = dlsym( + RTLD_DEFAULT, + b"_Py_DumpTracebackThreads\0".as_ptr() as *const std::ffi::c_char, + ); - if symbol_ptr.is_null() { - None - } else { - Some(std::mem::transmute(symbol_ptr)) + if !symbol_ptr.is_null() { + DUMP_TRACEBACK_FN = Some(std::mem::transmute(symbol_ptr)); + } } - } - #[cfg(not(unix))] - { - None - } + #[cfg(not(unix))] + { + // DUMP_TRACEBACK_FN remains None on non-Unix platforms + } + }); +} + +// Get the cached function pointer; should only be called after init_dump_traceback_fn +unsafe fn get_cached_dump_traceback_fn() -> Option { + DUMP_TRACEBACK_FN } unsafe fn dump_python_traceback_as_string( emit_stacktrace_string: unsafe extern "C" fn(*const c_char), ) { - // Try to get the dump traceback function - let dump_fn = match get_dump_traceback_fn() { + // Use function linked during registration + let dump_fn = match get_cached_dump_traceback_fn() { Some(func) => func, None => { emit_stacktrace_string( @@ -388,11 +384,10 @@ unsafe fn dump_python_traceback_as_string( let read_fd = pipefd[0]; let write_fd = pipefd[1]; - fcntl(read_fd, F_SETFL, O_NONBLOCK); + fcntl(read_fd, libc::F_SETFL as c_int, libc::O_NONBLOCK as c_int); - let current_tstate = pyo3_ffi::PyGILState_GetThisThreadState(); - - let error_msg = dump_fn(write_fd, ptr::null_mut(), current_tstate); + // Use null thread state for signal-safety; CPython will dump all threads. + let error_msg = dump_fn(write_fd, ptr::null_mut(), ptr::null_mut()); close(write_fd); @@ -436,12 +431,3 @@ unsafe extern "C" fn native_runtime_stack_callback( ) { dump_python_traceback_as_string(emit_stacktrace_string); } - -/// Register the native runtime stack collection callback -#[pyfunction(name = "crashtracker_register_native_runtime_callback")] -pub fn crashtracker_register_native_runtime_callback() -> CallbackResult { - match register_runtime_stacktrace_string_callback(native_runtime_stack_callback) { - Ok(()) => CallbackResult::Ok, - Err(e) => e.into(), - } -} diff --git a/src/native/lib.rs b/src/native/lib.rs index e7eecfe0065..bb558c1b7cc 100644 --- a/src/native/lib.rs +++ b/src/native/lib.rs @@ -26,15 +26,10 @@ fn _native(m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_class::()?; m.add_class::()?; m.add_class::()?; - m.add_class::()?; m.add_function(wrap_pyfunction!(crashtracker::crashtracker_init, m)?)?; m.add_function(wrap_pyfunction!(crashtracker::crashtracker_on_fork, m)?)?; m.add_function(wrap_pyfunction!(crashtracker::crashtracker_status, m)?)?; m.add_function(wrap_pyfunction!(crashtracker::crashtracker_receiver, m)?)?; - m.add_function(wrap_pyfunction!( - crashtracker::crashtracker_register_native_runtime_callback, - m - )?)?; } m.add_class::()?; m.add_class::()?; diff --git a/tests/internal/crashtracker/test_crashtracker.py b/tests/internal/crashtracker/test_crashtracker.py index e433e1df7ed..5bf01eaff1c 100644 --- a/tests/internal/crashtracker/test_crashtracker.py +++ b/tests/internal/crashtracker/test_crashtracker.py @@ -457,26 +457,16 @@ def test_crashtracker_tags_required(): @pytest.mark.skipif(not sys.platform.startswith("linux"), reason="Linux only") -@pytest.mark.subprocess() -def test_crashtracker_runtime_stacktrace_required(): - # Tests tag ingestion in the core API - import ctypes - import os - import sys - - import tests.internal.crashtracker.utils as utils - +def test_crashtracker_runtime_stacktrace_required(run_python_code_in_subprocess): with utils.with_test_agent() as client: - pid = os.fork() - if pid == 0: - ct = utils.CrashtrackerWrapper(base_name="runtime_stacktrace_required") - assert ct.start() - stdout_msg, stderr_msg = ct.logs() - assert not stdout_msg - assert not stderr_msg + env = os.environ.copy() + env["DD_CRASHTRACKER_EMIT_RUNTIME_STACKS"] = "true" + stdout, stderr, exitcode, _ = run_python_code_in_subprocess(auto_code, env=env) - ctypes.string_at(0) - sys.exit(-1) + # Check for expected exit condition + assert not stdout + assert not stderr + assert exitcode == -11 # Check for crash ping _ping = utils.get_crash_ping(client) From a5f39bfb6d1d3b09f68437b2dd03d27f5647cee3 Mon Sep 17 00:00:00 2001 From: Gyuheon Oh Date: Tue, 25 Nov 2025 20:57:02 +0000 Subject: [PATCH 21/21] Use ddconfig for runtime stacktrace emission --- ddtrace/internal/core/crashtracking.py | 5 +++++ ddtrace/internal/native/_native.pyi | 6 +++++- ddtrace/internal/settings/crashtracker.py | 9 +++++++++ src/native/crashtracker.rs | 16 ++++++++++++++-- tests/internal/crashtracker/test_crashtracker.py | 2 +- 5 files changed, 34 insertions(+), 4 deletions(-) diff --git a/ddtrace/internal/core/crashtracking.py b/ddtrace/internal/core/crashtracking.py index 8b3a041f00d..954b11a0512 100644 --- a/ddtrace/internal/core/crashtracking.py +++ b/ddtrace/internal/core/crashtracking.py @@ -153,6 +153,11 @@ def start(additional_tags: Optional[Dict[str, str]] = None) -> bool: print("Failed to start crashtracker: failed to construct crashtracker configuration", file=sys.stderr) return False + # TODO: Add this back in post Code Freeze (need to update config registry) + # crashtracker_init( + # config, receiver_config, metadata, emit_runtime_stacks=crashtracker_config.emit_runtime_stacks + # ) + crashtracker_init(config, receiver_config, metadata) def crashtracker_fork_handler(): diff --git a/ddtrace/internal/native/_native.pyi b/ddtrace/internal/native/_native.pyi index c515aec12f7..9b3af6978fc 100644 --- a/ddtrace/internal/native/_native.pyi +++ b/ddtrace/internal/native/_native.pyi @@ -96,7 +96,11 @@ class CrashtrackerStatus: FailedToInitialize: "CrashtrackerStatus" def crashtracker_init( - config: CrashtrackerConfiguration, receiver_config: CrashtrackerReceiverConfig, metadata: CrashtrackerMetadata + config: CrashtrackerConfiguration, + receiver_config: CrashtrackerReceiverConfig, + metadata: CrashtrackerMetadata, + # TODO: Add this back in post Code Freeze (need to update config registry) + # emit_runtime_stacks: bool, ) -> None: ... def crashtracker_on_fork( config: CrashtrackerConfiguration, receiver_config: CrashtrackerReceiverConfig, metadata: CrashtrackerMetadata diff --git a/ddtrace/internal/settings/crashtracker.py b/ddtrace/internal/settings/crashtracker.py index f58c230daa4..1708eaf2927 100644 --- a/ddtrace/internal/settings/crashtracker.py +++ b/ddtrace/internal/settings/crashtracker.py @@ -121,6 +121,15 @@ class CrashtrackingConfig(DDConfig): help="Whether to wait for the crashtracking receiver", ) + # TODO: Add this back in post Code Freeze (need to update config registry) + # emit_runtime_stacks = DDConfig.v( + # bool, + # "emit_runtime_stacks", + # default=False, + # help_type="Boolean", + # help="Whether to emit runtime stacks during a crash.", + # ) + config = CrashtrackingConfig() report_configuration(config) diff --git a/src/native/crashtracker.rs b/src/native/crashtracker.rs index 8e5db14e637..cacf7856e2b 100644 --- a/src/native/crashtracker.rs +++ b/src/native/crashtracker.rs @@ -24,6 +24,8 @@ type PyDumpTracebackThreadsFn = unsafe extern "C" fn( static mut DUMP_TRACEBACK_FN: Option = None; static DUMP_TRACEBACK_INIT: std::sync::Once = std::sync::Once::new(); +// We define these raw system calls here to be used within signal handler context. +// These direct C functions are preferred over going through Rust wrappers extern "C" { fn pipe(pipefd: *mut [c_int; 2]) -> c_int; fn read(fd: c_int, buf: *mut c_void, count: usize) -> isize; @@ -245,6 +247,8 @@ pub fn crashtracker_init<'py>( mut config: PyRefMut<'py, CrashtrackerConfigurationPy>, mut receiver_config: PyRefMut<'py, CrashtrackerReceiverConfigPy>, mut metadata: PyRefMut<'py, CrashtrackerMetadataPy>, + // TODO: Add this back in post Code Freeze (need to update config registry) + // emit_runtime_stacks: bool, ) -> anyhow::Result<()> { INIT.call_once(|| { let (config_opt, receiver_config_opt, metadata_opt) = ( @@ -256,8 +260,16 @@ pub fn crashtracker_init<'py>( if let (Some(config), Some(receiver_config), Some(metadata)) = (config_opt, receiver_config_opt, metadata_opt) { - let runtime_stacktrace_enabled = std::env::var("DD_CRASHTRACKER_EMIT_RUNTIME_STACKS").unwrap_or_default(); - if runtime_stacktrace_enabled == "true" || runtime_stacktrace_enabled == "1" { + let should_emit_runtime_stacks = std::env::var("DD_CRASHTRACKING_EMIT_RUNTIME_STACKS") + .ok() + .is_some_and(|v| { + matches!( + v.to_ascii_lowercase().as_str(), + "true" | "yes" | "1" + ) + }); + + if should_emit_runtime_stacks { unsafe { init_dump_traceback_fn(); } diff --git a/tests/internal/crashtracker/test_crashtracker.py b/tests/internal/crashtracker/test_crashtracker.py index 5bf01eaff1c..7ce9a01087f 100644 --- a/tests/internal/crashtracker/test_crashtracker.py +++ b/tests/internal/crashtracker/test_crashtracker.py @@ -460,7 +460,7 @@ def test_crashtracker_tags_required(): def test_crashtracker_runtime_stacktrace_required(run_python_code_in_subprocess): with utils.with_test_agent() as client: env = os.environ.copy() - env["DD_CRASHTRACKER_EMIT_RUNTIME_STACKS"] = "true" + env["DD_CRASHTRACKING_EMIT_RUNTIME_STACKS"] = "true" stdout, stderr, exitcode, _ = run_python_code_in_subprocess(auto_code, env=env) # Check for expected exit condition