Skip to content

Commit

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

This PR adds the following tags to crashtracker reports:
* language
* severity
* profiler_version

Severity is similar to what we do in Python in
DataDog/dd-trace-py#10199 .

The other two tags seem redundant, but right now if we don't pass
them as tags to libdatadog they don't get picked up correctly.

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 64dfc9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 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,10 @@ 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',
'language' => 'ruby',
'profiler_version' => Core::Environment::Identity.gem_datadog_version,
}.compact

# Make sure everything is an utf-8 string, to avoid encoding issues in downstream
Expand Down
3 changes: 3 additions & 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,9 @@
'runtime_platform' => RUBY_PLATFORM,
'runtime_version' => RUBY_VERSION,
'is_crash' => 'true',
'severity' => 'crash',
'language' => 'ruby',
'profiler_version' => Datadog::Core::Environment::Identity.gem_datadog_version,
)
end

Expand Down

0 comments on commit 64dfc9e

Please sign in to comment.