Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[crashtracker] Add option to collect symbols in process #430

Merged
merged 2 commits into from
May 15, 2024

Conversation

danielsn
Copy link
Contributor

What does this PR do?

Restores the option to collect symbols in process that was removed in #401

Motivation

I removed it because I thought nobody was using it. Turns out Python was. Putting it back in.

Additional Notes

Anything else we should know when reviewing?

How to test the change?

Modified crashtracker.c to use the new enum, and got this output

{
  "counters": {
    "unwinding": 0,
    "not_profiling": 0,
    "collecting_sample": 0,
    "serializing": 0
  },
  "metadata": {
    "profiling_library_name": "crashtracking-test",
    "profiling_library_version": "12.34.56",
    "family": "crashtracking-test",
    "tags": []
  },
  "os_info": {
    "os_type": "Macos",
    "version": {
      "Semantic": [
        13,
        6,
        6
      ]
    },
    "edition": null,
    "codename": null,
    "bitness": "X64",
    "architecture": "arm64"
  },
  "siginfo": {
    "signum": 11,
    "signame": "SIGSEGV"
  },
  "stacktrace": [
    {
      "ip": "0x1050eb8b0",
      "names": [
        {
          "colno": 5,
          "filename": "/Users/daniel.schwartznarbonne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.71/src/backtrace/libunwind.rs",
          "lineno": 105,
          "name": "backtrace::backtrace::libunwind::trace::hcb64546259faca6e"
        },
        {
          "colno": 5,
          "filename": "/Users/daniel.schwartznarbonne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.71/src/backtrace/mod.rs",
          "lineno": 66,
          "name": "backtrace::backtrace::trace_unsynchronized::h449c2c234be2c879"
        },
        {
          "colno": 5,
          "filename": "/Users/daniel.schwartznarbonne/go/src/github.com/DataDog/libdatadog/crashtracker/src/collectors.rs",
          "lineno": 33,
          "name": "datadog_crashtracker::collectors::emit_backtrace_by_frames::h20a469c27d4d2bc2"
        }
      ],
      "sp": "0x16b2adaa0",
      "symbol_address": "0x1050eb8b0"
    },
    {
      "ip": "0x1050eb3bc",
      "names": [
        {
          "colno": 18,
          "filename": "/Users/daniel.schwartznarbonne/go/src/github.com/DataDog/libdatadog/crashtracker/src/crash_handler.rs",
          "lineno": 335,
          "name": "datadog_crashtracker::crash_handler::handle_posix_signal_impl::h3172de2881f81748"
        },
        {
          "colno": 13,
          "filename": "/Users/daniel.schwartznarbonne/go/src/github.com/DataDog/libdatadog/crashtracker/src/crash_handler.rs",
          "lineno": 214,
          "name": "datadog_crashtracker::crash_handler::handle_posix_sigaction::h79e38b5f86459741"
        }
      ],
      "sp": "0x16b2adb20",
      "symbol_address": "0x1050eb3bc"
    },
    {
      "ip": "0x1a8002a24",
      "names": [
        {
          "name": "__platform_memmove"
        }
      ],
      "sp": "0x16b2adbe0",
      "symbol_address": "0x1a8002a24"
    },
    {
      "ip": "0x104b53d90",
      "names": [
        {
          "name": "_main"
        }
      ],
      "sp": "0x16b2adc10",
      "symbol_address": "0x104b53d90"
    }
  ],
  "incomplete": false,
  "timestamp": "2024-05-15T16:30:02.475145Z",
  "uuid": "4b30b3b0-16c1-422d-a3a7-6471fede99a0"
}

@danielsn danielsn requested a review from a team as a code owner May 15, 2024 16:30
@danielsn danielsn force-pushed the dsn/crashtracker-in-process-symbols branch from 1ecb39e to d5f1475 Compare May 15, 2024 16:35
Copy link
Contributor

@sanchda sanchda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 52 lines in your changes are missing coverage. Please review.

Project coverage is 66.14%. Comparing base (8e73294) to head (924e40d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #430      +/-   ##
==========================================
- Coverage   66.28%   66.14%   -0.14%     
==========================================
  Files         187      187              
  Lines       23118    23166      +48     
==========================================
  Hits        15324    15324              
- Misses       7794     7842      +48     
Components Coverage Δ
crashtracker 19.34% <0.00%> (-0.97%) ⬇️
datadog-alloc 98.37% <ø> (ø)
data-pipeline 51.45% <ø> (ø)
data-pipeline-ffi 0.00% <ø> (ø)
ddcommon 81.23% <ø> (ø)
ddcommon-ffi 74.93% <ø> (ø)
ddtelemetry 53.72% <ø> (ø)
ipc 81.27% <ø> (ø)
profiling 76.83% <ø> (ø)
profiling-ffi 60.05% <ø> (ø)
serverless 0.00% <ø> (ø)
sidecar 29.37% <ø> (ø)
sidecar-ffi 0.00% <ø> (ø)
spawn-worker 54.98% <ø> (ø)
trace-mini-agent 69.12% <ø> (ø)
trace-normalization 97.79% <ø> (ø)
trace-obfuscation 95.74% <ø> (ø)
trace-protobuf 25.64% <ø> (ø)
trace-utils 68.85% <ø> (ø)

@danielsn danielsn merged commit 74c89eb into main May 15, 2024
25 checks passed
@danielsn danielsn deleted the dsn/crashtracker-in-process-symbols branch May 15, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants