Skip to content

Commit

Permalink
[PROF-10241] Add extra "severity" tag to crash reports
Browse files Browse the repository at this point in the history
**What does this PR do?**

This PR adds the "severity: crash" tag to crashtracker reports, similar
to what we do in Python in
DataDog/dd-trace-py#10199 .

In the future, this won't be needed by libdatadog, but for now this
makes it easier for us to analyze reported crashes.

**Motivation:**

Improve crash reports.

**Additional Notes:**

N/A

**How to test the change?**

Change includes test coverage.
  • Loading branch information
ivoanjo committed Aug 15, 2024
1 parent 1402a32 commit c1b268d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/datadog/core/crashtracking/tag_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def self.call(settings)
'version' => settings.version,
'git.repository_url' => Environment::Git.git_repository_url,
'git.commit.sha' => Environment::Git.git_commit_sha,
'is_crash' => true
'is_crash' => 'true',
'severity' => 'crash',
}.compact

# Make sure everything is an utf-8 string, to avoid encoding issues in downstream
Expand Down
1 change: 1 addition & 0 deletions spec/datadog/core/crashtracking/tag_builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
'runtime_platform' => RUBY_PLATFORM,
'runtime_version' => RUBY_VERSION,
'is_crash' => 'true',
'severity' => 'crash',
)
end

Expand Down

0 comments on commit c1b268d

Please sign in to comment.