Skip to content

Commit b6898c5

Browse files
authored
Native code license headers (open-telemetry#2225)
1 parent f8f9914 commit b6898c5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+213
-8
lines changed

build/AssemblyRedirectionSourceGenerator.cs

+8-1
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,20 @@ public static void Generate(string assembliesFolderPath, string generatedFilePat
3131

3232
var sourceContents = GenerateSourceContents(assemblies);
3333

34-
File.WriteAllText(generatedFilePath, sourceContents, Encoding.UTF8);
34+
File.WriteAllText(generatedFilePath, sourceContents);
3535
Log.Information("Assembly redirection source generated {0}", generatedFilePath);
3636
}
3737

3838
static string GenerateSourceContents(SortedDictionary<string, AssemblyNameDefinition> assemblies)
3939
{
4040
var sb = new StringBuilder(assemblies.Count * 256);
41+
sb.AppendLine("""
42+
/*
43+
* Copyright The OpenTelemetry Authors
44+
* SPDX-License-Identifier: Apache-2.0
45+
*/
46+
""");
47+
sb.AppendLine();
4148
sb.AppendLine($"// Auto-generated file, do not change it - generated by the {nameof(AssemblyRedirectionSourceGenerator)} type");
4249
sb.Append(@"
4350
#include ""cor_profiler.h""

src/OpenTelemetry.AutoInstrumentation.Native/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
3+
14
cmake_minimum_required (VERSION 3.8..3.19)
25
cmake_policy(SET CMP0015 NEW)
36

src/OpenTelemetry.AutoInstrumentation.Native/bytecode_instrumentations.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
// Auto-generated file, do not change it - generated by the IntegrationsJsonGenerator
27
#ifndef BYTECODE_INSTRUMENTATIONS_H
38
#define BYTECODE_INSTRUMENTATIONS_H

src/OpenTelemetry.AutoInstrumentation.Native/calltarget_tokens.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
#include "calltarget_tokens.h"
25

36
#include "cor_profiler.h"

src/OpenTelemetry.AutoInstrumentation.Native/calltarget_tokens.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_CALLTARGET_TOKENS_H_
27
#define OTEL_CLR_PROFILER_CALLTARGET_TOKENS_H_
38

src/OpenTelemetry.AutoInstrumentation.Native/clr_helpers.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
#include "clr_helpers.h"
25

36
#include <cstring>

src/OpenTelemetry.AutoInstrumentation.Native/clr_helpers.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_CLR_HELPERS_H_
27
#define OTEL_CLR_PROFILER_CLR_HELPERS_H_
38

src/OpenTelemetry.AutoInstrumentation.Native/com_ptr.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
#ifndef OTEL_CLR_PROFILER_COM_PTR_H_
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#ifndef OTEL_CLR_PROFILER_COM_PTR_H_
27
#define OTEL_CLR_PROFILER_COM_PTR_H_
38

49
#include <cassert>

src/OpenTelemetry.AutoInstrumentation.Native/cor_profiler.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
#include "cor_profiler.h"
25

36
#include "corhlpr.h"

src/OpenTelemetry.AutoInstrumentation.Native/cor_profiler.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_COR_PROFILER_H_
27
#define OTEL_CLR_PROFILER_COR_PROFILER_H_
38

src/OpenTelemetry.AutoInstrumentation.Native/cor_profiler_base.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
#include "cor_profiler_base.h"
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#include "cor_profiler_base.h"
25
#include "logger.h"
36

47
namespace trace

src/OpenTelemetry.AutoInstrumentation.Native/cor_profiler_base.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
#ifndef OTEL_CLR_PROFILER_COR_PROFILER_BASE_H_
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#ifndef OTEL_CLR_PROFILER_COR_PROFILER_BASE_H_
27
#define OTEL_CLR_PROFILER_COR_PROFILER_BASE_H_
38

49
#include <atomic>

src/OpenTelemetry.AutoInstrumentation.Native/dllmain.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_DLLMAIN_H_
27
#define OTEL_CLR_PROFILER_DLLMAIN_H_
38

src/OpenTelemetry.AutoInstrumentation.Native/environment_variables.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_ENVIRONMENT_VARIABLES_H_
27
#define OTEL_CLR_PROFILER_ENVIRONMENT_VARIABLES_H_
38

src/OpenTelemetry.AutoInstrumentation.Native/environment_variables_parser.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_ENVIRONMENT_VARIABLES_PARSER_H_
27
#define OTEL_CLR_PROFILER_ENVIRONMENT_VARIABLES_PARSER_H_
38

src/OpenTelemetry.AutoInstrumentation.Native/environment_variables_util.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_ENVIRONMENT_VARIABLES_UTIL_H_
27
#define OTEL_CLR_PROFILER_ENVIRONMENT_VARIABLES_UTIL_H_
38

src/OpenTelemetry.AutoInstrumentation.Native/il_rewriter_wrapper.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
#include "il_rewriter_wrapper.h"
25

36
ILRewriter* ILRewriterWrapper::GetILRewriter() const

src/OpenTelemetry.AutoInstrumentation.Native/il_rewriter_wrapper.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_IL_REWRITER_WRAPPER_H_
27
#define OTEL_CLR_PROFILER_IL_REWRITER_WRAPPER_H_
38

src/OpenTelemetry.AutoInstrumentation.Native/integration.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
13

24
#include "integration.h"
35

src/OpenTelemetry.AutoInstrumentation.Native/integration.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_INTEGRATION_H_
27
#define OTEL_CLR_PROFILER_INTEGRATION_H_
38

src/OpenTelemetry.AutoInstrumentation.Native/integration_loader.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
#include "integration_loader.h"
25

36
#include <exception>

src/OpenTelemetry.AutoInstrumentation.Native/integration_loader.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_INTEGRATION_LOADER_H_
27
#define OTEL_CLR_PROFILER_INTEGRATION_LOADER_H_
38

src/OpenTelemetry.AutoInstrumentation.Native/interop.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
//---------------------------------------------------------------------------------------
25
// Exports that managed code from OpenTelemetry.AutoInstrumentation.dll will
36
// P/Invoke into

src/OpenTelemetry.AutoInstrumentation.Native/logger.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#pragma once
27

38
#include "environment_variables.h"

src/OpenTelemetry.AutoInstrumentation.Native/logger_impl.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_LOGGER_IMPL_H_
27
#define OTEL_CLR_PROFILER_LOGGER_IMPL_H_
38
#include "util.h"

src/OpenTelemetry.AutoInstrumentation.Native/logging.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
#include "logging.h"
25

36
#include "pal.h"

src/OpenTelemetry.AutoInstrumentation.Native/logging.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_LOGGING_H_
27
#define OTEL_CLR_PROFILER_LOGGING_H_
38
#include "util.h"

src/OpenTelemetry.AutoInstrumentation.Native/macros.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_MACROS_H_
27
#define OTEL_CLR_PROFILER_MACROS_H_
38

src/OpenTelemetry.AutoInstrumentation.Native/metadata_builder.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
#include <fstream>
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#include <fstream>
25
#include <string>
36

47
#include "clr_helpers.h"

src/OpenTelemetry.AutoInstrumentation.Native/metadata_builder.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
#pragma once
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#pragma once
27

38
#include <corhlpr.h>
49

src/OpenTelemetry.AutoInstrumentation.Native/miniutfdata.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
static const uint32_t xref[] = {
27
0, 59, 60, 61, 62, 65, 66, 67, 68, 69, 70, 71, 72, 73,
38
74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88,

src/OpenTelemetry.AutoInstrumentation.Native/module_metadata.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
#ifndef OTEL_CLR_PROFILER_MODULE_METADATA_H_
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#ifndef OTEL_CLR_PROFILER_MODULE_METADATA_H_
27
#define OTEL_CLR_PROFILER_MODULE_METADATA_H_
38

49
#include <corhlpr.h>

src/OpenTelemetry.AutoInstrumentation.Native/netfx_assembly_redirection.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
// Auto-generated file, do not change it - generated by the AssemblyRedirectionSourceGenerator type
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
// Auto-generated file, do not change it - generated by the AssemblyRedirectionSourceGenerator type
27

38
#include "cor_profiler.h"
49

src/OpenTelemetry.AutoInstrumentation.Native/otel_profiler_constants.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_PROFILER_CONSTANTS_H
27
#define OTEL_PROFILER_CONSTANTS_H
38

src/OpenTelemetry.AutoInstrumentation.Native/pal.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_PAL_H_
27
#define OTEL_CLR_PROFILER_PAL_H_
38

src/OpenTelemetry.AutoInstrumentation.Native/rejit_handler.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
#include "rejit_handler.h"
25

36
#include "logger.h"

src/OpenTelemetry.AutoInstrumentation.Native/rejit_handler.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_REJIT_HANDLER_H_
27
#define OTEL_CLR_PROFILER_REJIT_HANDLER_H_
38

src/OpenTelemetry.AutoInstrumentation.Native/resource.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
//{{NO_DEPENDENCIES}}
27
// Microsoft Visual C++ generated include file.
38
// Used by Resource.rc

src/OpenTelemetry.AutoInstrumentation.Native/startup_hook.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_STARTUP_HOOK_H_
27
#define OTEL_CLR_PROFILER_STARTUP_HOOK_H_
38

src/OpenTelemetry.AutoInstrumentation.Native/stats.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_STATS_H_
27
#define OTEL_CLR_PROFILER_STATS_H_
38

src/OpenTelemetry.AutoInstrumentation.Native/string.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
#include "string.h"
25
#ifdef _WIN32
36
#include <Windows.h>

src/OpenTelemetry.AutoInstrumentation.Native/string.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_STRING_H_
27
#define OTEL_CLR_PROFILER_STRING_H_
38

src/OpenTelemetry.AutoInstrumentation.Native/util.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
#include "util.h" // Keep first to avoid PCH warning.
25

36
#include <cwctype>

src/OpenTelemetry.AutoInstrumentation.Native/util.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
#ifndef OTEL_CLR_PROFILER_UTIL_H_
27
#define OTEL_CLR_PROFILER_UTIL_H_
38

0 commit comments

Comments
 (0)