From b7d503b0a436553d296a6c1e6dd50f17991c5ba1 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Fri, 25 Feb 2022 14:33:48 +0000 Subject: [PATCH] Rename `code_provenance.json` reported by profiler to `code-provenance.json` The profiling team decided to rename this file for consistency. The code provenance feature (#1813) is not yet exposed to customers, and the only release made with the old file name is 1.0.0.beta1 so this does not cause any regression. --- lib/datadog/profiling/ext.rb | 4 ++-- .../profiling/transport/http/adapters/net_integration_spec.rb | 2 +- spec/datadog/profiling/transport/http/api/endpoint_spec.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/datadog/profiling/ext.rb b/lib/datadog/profiling/ext.rb index 722eff545ef..7d9dd9f03e7 100644 --- a/lib/datadog/profiling/ext.rb +++ b/lib/datadog/profiling/ext.rb @@ -47,8 +47,8 @@ module HTTP FORM_FIELD_PPROF_DATA = 'data[rubyprofile.pprof]'.freeze PPROF_DEFAULT_FILENAME = 'rubyprofile.pprof.gz'.freeze - FORM_FIELD_CODE_PROVENANCE_DATA = 'data[code_provenance.json]'.freeze - CODE_PROVENANCE_FILENAME = 'code_provenance.json.gz'.freeze + FORM_FIELD_CODE_PROVENANCE_DATA = 'data[code-provenance.json]'.freeze + CODE_PROVENANCE_FILENAME = 'code-provenance.json.gz'.freeze end end end diff --git a/spec/datadog/profiling/transport/http/adapters/net_integration_spec.rb b/spec/datadog/profiling/transport/http/adapters/net_integration_spec.rb index abbfbf29c2a..23bc3047502 100644 --- a/spec/datadog/profiling/transport/http/adapters/net_integration_spec.rb +++ b/spec/datadog/profiling/transport/http/adapters/net_integration_spec.rb @@ -140,7 +140,7 @@ code_provenance_data = JSON.parse( Datadog::Core::Utils::Compression.gunzip( - body.fetch('data[code_provenance.json]') + body.fetch('data[code-provenance.json]') ) ) diff --git a/spec/datadog/profiling/transport/http/api/endpoint_spec.rb b/spec/datadog/profiling/transport/http/api/endpoint_spec.rb index 782c3690672..7cf23f9c494 100644 --- a/spec/datadog/profiling/transport/http/api/endpoint_spec.rb +++ b/spec/datadog/profiling/transport/http/api/endpoint_spec.rb @@ -91,7 +91,7 @@ call expect(env.form) - .to include('data[code_provenance.json]' => kind_of(Datadog::Core::Vendor::Multipart::Post::UploadIO)) + .to include('data[code-provenance.json]' => kind_of(Datadog::Core::Vendor::Multipart::Post::UploadIO)) end end end