Skip to content

Commit

Permalink
[NO-TICKET] Minor: Fix misnamed variable in profiler
Browse files Browse the repository at this point in the history
**What does this PR do?**

The name `uncompressed_pprof` is a legacy of a time when that was
true, but actually for a few releases now libdatadog has emitted
compressed profiles.

**Motivation:**

Fix misleading name.

**Additional Notes:**

N/A

**How to test the change?**

Existing tests cover this functionality.
  • Loading branch information
ivoanjo committed Feb 21, 2024
1 parent daa00e2 commit be48aba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/datadog/profiling/exporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ def initialize(

def flush
worker_stats = @worker.stats_and_reset_not_thread_safe
start, finish, uncompressed_pprof = pprof_recorder.serialize
start, finish, compressed_pprof = pprof_recorder.serialize
@last_flush_finish_at = finish

return if uncompressed_pprof.nil? # We don't want to report empty profiles
return if compressed_pprof.nil? # We don't want to report empty profiles

if duration_below_threshold?(start, finish)
Datadog.logger.debug('Skipped exporting profiling events as profile duration is below minimum')
Expand All @@ -68,7 +68,7 @@ def flush
start: start,
finish: finish,
pprof_file_name: Datadog::Profiling::Ext::Transport::HTTP::PPROF_DEFAULT_FILENAME,
pprof_data: uncompressed_pprof.to_s,
pprof_data: compressed_pprof.to_s,
code_provenance_file_name: Datadog::Profiling::Ext::Transport::HTTP::CODE_PROVENANCE_FILENAME,
code_provenance_data: uncompressed_code_provenance,
tags_as_array: Datadog::Profiling::TagBuilder.call(settings: Datadog.configuration).to_a,
Expand Down

0 comments on commit be48aba

Please sign in to comment.