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

[PROF-11306] Fix crashtracking specs failing due to format change #14

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Feb 10, 2025

What does this PR do?

This PR fixes the crashtracking specs failing on
https://github.com/Datadog/vaccine/actions/runs/13239150949 (from DataDog/dd-trace-rb#4353 ) due to the additional_stacktraces key no longer being included in the payload.

Since I removed the assertion on the key, the updated test will work on both libdatadog < v16 as well as >= v16.

Motivation:

Unblock upgrade to libdatadog v16.

Additional Notes:

To get the "records", I needed to

  1. Clone catadog, bundle install
  2. mkdir records
  3. bundle exec bin/catadog --record records --no-forward

...and then kill -SEGV a Ruby process that had dd-trace-rb loaded.

This was enough for me:

DD_TRACE_AGENT_PORT=8128 be ruby -e "require 'datadog'; Datadog.configure { }; sleep"

How to test the change?

I've gathered the records from both libdatadog < v16 and v16 in https://gist.github.com/ivoanjo/52314e67602f2039bdcfe4ab869701b2 and used them to validate this change.

By placing them into a directory, they can be validated as such:

RECORDS_DIR=records-new/ bundle exec rspec spec/records_spec.rb

**What does this PR do?**

This PR fixes the crashtracking specs failing on
https://github.com/Datadog/vaccine/actions/runs/13239150949
(from DataDog/dd-trace-rb#4353 )
due to the `additional_stacktraces` key no longer being included in
the payload.

Since I removed the assertion on the key, the updated test will
work on both libdatadog < v16 as well as >= v16.

**Motivation:**

Unblock upgrade to libdatadog v16.

**Additional Notes:**

To get the "records", I needed to

1. Clone catadog, bundle install
2. mkdir records
3. bundle exec bin/catadog --record records --no-forward

...and then `kill -SEGV` a Ruby process that had dd-trace-rb loaded.

This was enough for me:

```bash
DD_TRACE_AGENT_PORT=8128 be ruby -e "require 'datadog'; Datadog.configure { }; sleep"
```

**How to test the change?**

I've gathered the records from both libdatadog < v16 and v16
in https://gist.github.com/ivoanjo/52314e67602f2039bdcfe4ab869701b2
and used them to validate this change.

By placing them into a directory, they can be validated as such:

```bash
RECORDS_DIR=records-new/ bundle exec rspec spec/records_spec.rb
```
@ivoanjo ivoanjo requested a review from a team as a code owner February 10, 2025 12:20
@ivoanjo ivoanjo merged commit 12b4285 into master Feb 10, 2025
37 checks passed
@ivoanjo ivoanjo deleted the ivoanjo/prof-11306-fix-crashtracking-specs branch February 10, 2025 13:35
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.

2 participants