Skip to content

Commit

Permalink
Removes remaining usages of DD_ prefix (#359)
Browse files Browse the repository at this point in the history
* Get rid of remaining DD_ prefixes in the repo

* Add last change from DD_INTEGRATIONS to OTEL_DOTNET_AUTO_INTEGRATIONS_FILE. This should be applied after #358

* Re-order the usage of otel_profiler_constants.h now that it has been renamed from dd_profiler_constants.h

* Fix usage of DD_TRACE_LOG_PATH

Co-authored-by: Robert Pająk <[email protected]>
  • Loading branch information
zacharycmontoya and pellared authored Feb 14, 2022
1 parent b62129e commit 1c1ef96
Show file tree
Hide file tree
Showing 28 changed files with 73 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@
<ClInclude Include="com_ptr.h" />
<ClInclude Include="cor_profiler.h" />
<ClInclude Include="cor_profiler_base.h" />
<ClInclude Include="dd_profiler_constants.h" />
<ClInclude Include="environment_variables.h" />
<ClInclude Include="environment_variables_util.h" />
<ClInclude Include="il_rewriter.h" />
Expand All @@ -200,6 +199,7 @@
<ClInclude Include="miniutf.hpp" />
<ClInclude Include="miniutfdata.h" />
<ClInclude Include="module_metadata.h" />
<ClInclude Include="otel_profiler_constants.h" />
<ClInclude Include="pal.h" />
<ClInclude Include="rejit_handler.h" />
<ClInclude Include="startup_hook.h" />
Expand Down
2 changes: 1 addition & 1 deletion src/OpenTelemetry.ClrProfiler.Native/calltarget_tokens.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "calltarget_tokens.h"

#include "dd_profiler_constants.h"
#include "il_rewriter_wrapper.h"
#include "logger.h"
#include "module_metadata.h"
#include "otel_profiler_constants.h"

namespace trace
{
Expand Down
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/calltarget_tokens.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_CALLTARGET_TOKENS_H_
#define DD_CLR_PROFILER_CALLTARGET_TOKENS_H_
#ifndef OTEL_CLR_PROFILER_CALLTARGET_TOKENS_H_
#define OTEL_CLR_PROFILER_CALLTARGET_TOKENS_H_

#include <corhlpr.h>

Expand Down Expand Up @@ -103,4 +103,4 @@ class CallTargetTokens

} // namespace trace

#endif // DD_CLR_PROFILER_CALLTARGET_TOKENS_H_
#endif // OTEL_CLR_PROFILER_CALLTARGET_TOKENS_H_
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/class_factory.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_CLASS_FACTORY_H_
#define DD_CLR_PROFILER_CLASS_FACTORY_H_
#ifndef OTEL_CLR_PROFILER_CLASS_FACTORY_H_
#define OTEL_CLR_PROFILER_CLASS_FACTORY_H_

// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full
Expand All @@ -23,4 +23,4 @@ class ClassFactory : public IClassFactory
HRESULT STDMETHODCALLTYPE LockServer(BOOL fLock) override;
};

#endif // DD_CLR_PROFILER_CLASS_FACTORY_H_
#endif // OTEL_CLR_PROFILER_CLASS_FACTORY_H_
2 changes: 1 addition & 1 deletion src/OpenTelemetry.ClrProfiler.Native/clr_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

#include <cstring>

#include "dd_profiler_constants.h"
#include "environment_variables.h"
#include "logger.h"
#include "macros.h"
#include "pal.h"
#include "otel_profiler_constants.h"
#include <set>
#include <stack>

Expand Down
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/clr_helpers.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_CLR_HELPERS_H_
#define DD_CLR_PROFILER_CLR_HELPERS_H_
#ifndef OTEL_CLR_PROFILER_CLR_HELPERS_H_
#define OTEL_CLR_PROFILER_CLR_HELPERS_H_

#include <corhlpr.h>
#include <corprof.h>
Expand Down Expand Up @@ -513,4 +513,4 @@ bool FindTypeDefByName(const trace::WSTRING instrumentationTargetMethodTypeName,
const ComPtr<IMetaDataImport2>& metadata_import, mdTypeDef& typeDef);
} // namespace trace

#endif // DD_CLR_PROFILER_CLR_HELPERS_H_
#endif // OTEL_CLR_PROFILER_CLR_HELPERS_H_
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/com_ptr.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_COM_PTR_H_
#define DD_CLR_PROFILER_COM_PTR_H_
#ifndef OTEL_CLR_PROFILER_COM_PTR_H_
#define OTEL_CLR_PROFILER_COM_PTR_H_

#include <cassert>
#include <windows.h>
Expand Down Expand Up @@ -183,4 +183,4 @@ void swap(ComPtr<Interface>& left, ComPtr<Interface>& right) noexcept
left.Swap(right);
}

#endif // DD_CLR_PROFILER_COM_PTR_H_
#endif // OTEL_CLR_PROFILER_COM_PTR_H_
2 changes: 1 addition & 1 deletion src/OpenTelemetry.ClrProfiler.Native/cor_profiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <string>

#include "clr_helpers.h"
#include "dd_profiler_constants.h"
#include "dllmain.h"
#include "environment_variables.h"
#include "environment_variables_util.h"
Expand All @@ -15,6 +14,7 @@
#include "logger.h"
#include "metadata_builder.h"
#include "module_metadata.h"
#include "otel_profiler_constants.h"
#include "pal.h"
#include "resource.h"
#include "startup_hook.h"
Expand Down
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/cor_profiler.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_COR_PROFILER_H_
#define DD_CLR_PROFILER_COR_PROFILER_H_
#ifndef OTEL_CLR_PROFILER_COR_PROFILER_H_
#define OTEL_CLR_PROFILER_COR_PROFILER_H_

#include "cor.h"
#include "corprof.h"
Expand Down Expand Up @@ -148,4 +148,4 @@ extern CorProfiler* profiler; // global reference to callback object

} // namespace trace

#endif // DD_CLR_PROFILER_COR_PROFILER_H_
#endif // OTEL_CLR_PROFILER_COR_PROFILER_H_
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/cor_profiler_base.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_COR_PROFILER_BASE_H_
#define DD_CLR_PROFILER_COR_PROFILER_BASE_H_
#ifndef OTEL_CLR_PROFILER_COR_PROFILER_BASE_H_
#define OTEL_CLR_PROFILER_COR_PROFILER_BASE_H_

#include <atomic>
#include <corhlpr.h>
Expand Down Expand Up @@ -201,4 +201,4 @@ class CorProfilerBase : public ICorProfilerCallback10

} // namespace trace

#endif // DD_CLR_PROFILER_PROFILER_BASE_H_
#endif // OTEL_CLR_PROFILER_PROFILER_BASE_H_
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/dllmain.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef DD_CLR_PROFILER_DLLMAIN_H_
#define DD_CLR_PROFILER_DLLMAIN_H_
#ifndef OTEL_CLR_PROFILER_DLLMAIN_H_
#define OTEL_CLR_PROFILER_DLLMAIN_H_

#include "class_factory.h"

extern HINSTANCE DllHandle;

#endif // DD_CLR_PROFILER_DLLMAIN_H_
#endif // OTEL_CLR_PROFILER_DLLMAIN_H_
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_ENVIRONMENT_VARIABLES_UTIL_H_
#define DD_CLR_PROFILER_ENVIRONMENT_VARIABLES_UTIL_H_
#ifndef OTEL_CLR_PROFILER_ENVIRONMENT_VARIABLES_UTIL_H_
#define OTEL_CLR_PROFILER_ENVIRONMENT_VARIABLES_UTIL_H_

#include "environment_variables.h"
#include "string.h"
Expand Down Expand Up @@ -72,4 +72,4 @@ bool IsDomainNeutralInstrumentation() {

} // namespace trace

#endif // DD_CLR_PROFILER_ENVIRONMENT_VARIABLES_UTIL_H_
#endif // OTEL_CLR_PROFILER_ENVIRONMENT_VARIABLES_UTIL_H_
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/il_rewriter.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_IL_REWRITER_H_
#define DD_CLR_PROFILER_IL_REWRITER_H_
#ifndef OTEL_CLR_PROFILER_IL_REWRITER_H_
#define OTEL_CLR_PROFILER_IL_REWRITER_H_

// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full
Expand Down Expand Up @@ -142,4 +142,4 @@ class ILRewriter
unsigned GetMaxStackValue();
};

#endif // DD_CLR_PROFILER_IL_REWRITER_H_
#endif // OTEL_CLR_PROFILER_IL_REWRITER_H_
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/il_rewriter_wrapper.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_IL_REWRITER_WRAPPER_H_
#define DD_CLR_PROFILER_IL_REWRITER_WRAPPER_H_
#ifndef OTEL_CLR_PROFILER_IL_REWRITER_WRAPPER_H_
#define OTEL_CLR_PROFILER_IL_REWRITER_WRAPPER_H_

#include "il_rewriter.h"
#include "module_metadata.h"
Expand Down Expand Up @@ -46,4 +46,4 @@ class ILRewriterWrapper
ILInstr* InitObj(mdTypeRef type_ref) const;
};

#endif // DD_CLR_PROFILER_IL_REWRITER_WRAPPER_H_
#endif // OTEL_CLR_PROFILER_IL_REWRITER_WRAPPER_H_
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/integration.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_INTEGRATION_H_
#define DD_CLR_PROFILER_INTEGRATION_H_
#ifndef OTEL_CLR_PROFILER_INTEGRATION_H_
#define OTEL_CLR_PROFILER_INTEGRATION_H_

#include <corhlpr.h>
#include <iomanip>
Expand Down Expand Up @@ -341,4 +341,4 @@ namespace

} // namespace trace

#endif // DD_CLR_PROFILER_INTEGRATION_H_
#endif // OTEL_CLR_PROFILER_INTEGRATION_H_
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/integration_loader.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_INTEGRATION_LOADER_H_
#define DD_CLR_PROFILER_INTEGRATION_LOADER_H_
#ifndef OTEL_CLR_PROFILER_INTEGRATION_LOADER_H_
#define OTEL_CLR_PROFILER_INTEGRATION_LOADER_H_

#include <fstream>
#include <locale>
Expand All @@ -16,7 +16,7 @@ namespace trace
using json = nlohmann::json;

// LoadIntegrationsFromEnvironment loads integrations from any files specified
// in the DD_INTEGRATIONS environment variable
// in the OTEL_DOTNET_AUTO_INTEGRATIONS_FILE environment variable
void LoadIntegrationsFromEnvironment(std::vector<IntegrationMethod>& integrationMethods, const std::vector<WSTRING>& disabledIntegrationNames);

// LoadIntegrationsFromFile loads the integrations from a file
Expand Down
2 changes: 1 addition & 1 deletion src/OpenTelemetry.ClrProfiler.Native/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct TracerLoggerPolicy
struct logging_environment
{
// cannot reuse environment::log_path variable. On alpine, test fails
inline static const WSTRING log_path = WStr("DD_TRACE_LOG_PATH");
inline static const WSTRING log_path = WStr("OTEL_DOTNET_AUTO_LOG_PATH");
};
};

Expand Down
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/logger_impl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_LOGGER_IMPL_H_
#define DD_CLR_PROFILER_LOGGER_IMPL_H_
#ifndef OTEL_CLR_PROFILER_LOGGER_IMPL_H_
#define OTEL_CLR_PROFILER_LOGGER_IMPL_H_
#include "util.h"
#include "environment_variables.h"
#include "string.h"
Expand Down Expand Up @@ -236,4 +236,4 @@ bool LoggerImpl<TLoggerPolicy>::IsDebugEnabled() const

} // namespace shared

#endif // DD_CLR_PROFILER_LOGGER_IMPL_H_
#endif // OTEL_CLR_PROFILER_LOGGER_IMPL_H_
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/logging.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_LOGGING_H_
#define DD_CLR_PROFILER_LOGGING_H_
#ifndef OTEL_CLR_PROFILER_LOGGING_H_
#define OTEL_CLR_PROFILER_LOGGING_H_
#include "util.h"

#include <spdlog/spdlog.h>
Expand Down Expand Up @@ -62,4 +62,4 @@ void Warn(const Args... args) {

} // namespace trace

#endif // DD_CLR_PROFILER_LOGGING_H_
#endif // OTEL_CLR_PROFILER_LOGGING_H_
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/macros.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_MACROS_H_
#define DD_CLR_PROFILER_MACROS_H_
#ifndef OTEL_CLR_PROFILER_MACROS_H_
#define OTEL_CLR_PROFILER_MACROS_H_

#include <corhlpr.h>
#include <fstream>
Expand All @@ -17,4 +17,4 @@
if ((EXPR) == false) return E_FAIL; \
} while (0)

#endif // DD_CLR_PROFILER_MACROS_H_
#endif // OTEL_CLR_PROFILER_MACROS_H_
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/module_metadata.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_MODULE_METADATA_H_
#define DD_CLR_PROFILER_MODULE_METADATA_H_
#ifndef OTEL_CLR_PROFILER_MODULE_METADATA_H_
#define OTEL_CLR_PROFILER_MODULE_METADATA_H_

#include <corhlpr.h>
#include <mutex>
Expand Down Expand Up @@ -147,4 +147,4 @@ class ModuleMetadata

} // namespace trace

#endif // DD_CLR_PROFILER_MODULE_METADATA_H_
#endif // OTEL_CLR_PROFILER_MODULE_METADATA_H_
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_PROFILER_CONSTANTS_H
#define DD_PROFILER_CONSTANTS_H
#ifndef OTEL_PROFILER_CONSTANTS_H
#define OTEL_PROFILER_CONSTANTS_H

#include <string>

Expand Down Expand Up @@ -88,4 +88,4 @@ const WSTRING calltarget_modification_action = WStr("CallTargetModification");

} // namespace trace

#endif // DD_PROFILER_CONSTANTS_H
#endif // OTEL_PROFILER_CONSTANTS_H
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/pal.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_PAL_H_
#define DD_CLR_PROFILER_PAL_H_
#ifndef OTEL_CLR_PROFILER_PAL_H_
#define OTEL_CLR_PROFILER_PAL_H_

#ifdef _WIN32

Expand Down Expand Up @@ -99,4 +99,4 @@ inline int GetPID()

} // namespace trace

#endif // DD_CLR_PROFILER_PAL_H_
#endif // OTEL_CLR_PROFILER_PAL_H_
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/rejit_handler.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_REJIT_HANDLER_H_
#define DD_CLR_PROFILER_REJIT_HANDLER_H_
#ifndef OTEL_CLR_PROFILER_REJIT_HANDLER_H_
#define OTEL_CLR_PROFILER_REJIT_HANDLER_H_

#include <atomic>
#include <mutex>
Expand Down Expand Up @@ -143,4 +143,4 @@ class RejitHandler

} // namespace trace

#endif // DD_CLR_PROFILER_REJIT_HANDLER_H_
#endif // OTEL_CLR_PROFILER_REJIT_HANDLER_H_
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/stats.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_STATS_H_
#define DD_CLR_PROFILER_STATS_H_
#ifndef OTEL_CLR_PROFILER_STATS_H_
#define OTEL_CLR_PROFILER_STATS_H_

#include <chrono>

Expand Down Expand Up @@ -176,4 +176,4 @@ class Stats : public Singleton<Stats>

} // namespace trace

#endif // DD_CLR_PROFILER_STATS_H_
#endif // OTEL_CLR_PROFILER_STATS_H_
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/string.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_STRING_H_
#define DD_CLR_PROFILER_STRING_H_
#ifndef OTEL_CLR_PROFILER_STRING_H_
#define OTEL_CLR_PROFILER_STRING_H_

#include <corhlpr.h>
#include <sstream>
Expand Down Expand Up @@ -34,4 +34,4 @@ static const WSTRING EmptyWStr = WStr("");

} // namespace trace

#endif // DD_CLR_PROFILER_STRING_H_
#endif // OTEL_CLR_PROFILER_STRING_H_
6 changes: 3 additions & 3 deletions src/OpenTelemetry.ClrProfiler.Native/util.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DD_CLR_PROFILER_UTIL_H_
#define DD_CLR_PROFILER_UTIL_H_
#ifndef OTEL_CLR_PROFILER_UTIL_H_
#define OTEL_CLR_PROFILER_UTIL_H_

#include <algorithm>
#include <condition_variable>
Expand Down Expand Up @@ -131,4 +131,4 @@ class UniqueBlockingQueue : public UnCopyable

} // namespace trace

#endif // DD_CLR_PROFILER_UTIL_H_
#endif // OTEL_CLR_PROFILER_UTIL_H_
4 changes: 2 additions & 2 deletions test/OpenTelemetry.ClrProfiler.Native.Tests/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Header for standard system include files.
//

#ifndef DD_CLR_PROFILER_TESTS_PCH_H_
#define DD_CLR_PROFILER_TESTS_PCH_H_
#ifndef OTEL_CLR_PROFILER_TESTS_PCH_H_
#define OTEL_CLR_PROFILER_TESTS_PCH_H_

#define GTEST_LANG_CXX11 1

Expand Down

0 comments on commit 1c1ef96

Please sign in to comment.