Skip to content

Commit 55acf76

Browse files
committed
Merge branch 'main' into feature/nlog-instrumentation
2 parents e9d1a01 + 761635f commit 55acf76

File tree

9 files changed

+40
-16
lines changed

9 files changed

+40
-16
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363

6464
# Initializes the CodeQL tools for scanning.
6565
- name: Initialize CodeQL
66-
uses: github/codeql-action/init@fdbfb4d2750291e159f0156def62b853c2798ca2 # tag: v4.31.5
66+
uses: github/codeql-action/init@fe4161a26a8629af62121b670040955b330f9af2 # tag: v4.31.6
6767
with:
6868
languages: ${{ matrix.language }}
6969
build-mode: ${{ matrix.build-mode }}
@@ -93,6 +93,6 @@ jobs:
9393
run: ./build.cmd BuildTracer
9494

9595
- name: Perform CodeQL Analysis
96-
uses: github/codeql-action/analyze@fdbfb4d2750291e159f0156def62b853c2798ca2 # tag: v4.31.5
96+
uses: github/codeql-action/analyze@fe4161a26a8629af62121b670040955b330f9af2 # tag: v4.31.6
9797
with:
9898
category: "/language:${{matrix.language}}"

.github/workflows/ossf-scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ jobs:
4242
# Upload the results to GitHub's code scanning dashboard (optional).
4343
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
4444
- name: "Upload to code-scanning"
45-
uses: github/codeql-action/upload-sarif@fdbfb4d2750291e159f0156def62b853c2798ca2 # tag: v4.31.5
45+
uses: github/codeql-action/upload-sarif@fe4161a26a8629af62121b670040955b330f9af2 # tag: v4.31.6
4646
with:
4747
sarif_file: results.sarif

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ This component adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.h
1313

1414
#### Dependency updates
1515

16+
- .NET Framework only, following packages updated
17+
- `OpenTelemetry.Instrumentation.AspNet` from `1.14.0-rc.1` to `1.14.0`.
18+
1619
### Deprecated
1720

1821
### Removed

docker/centos-stream9.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/centos/centos:stream9@sha256:8f23193019c25232ea9a657fcaf0cca2570e1bdb3be54d7bd56fbb05f3eeaa02
1+
FROM quay.io/centos/centos:stream9@sha256:e7094d722b6c1e8ecdd774cacc4769baa3ce6591adecee94a66043f20ffc8baf
22

33
# Install dotnet sdk
44
RUN dnf install -y \

docs/plugins.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public class MyPlugin
117117
| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.14.0 |
118118
| OpenTelemetry.Exporter.ZipkinExporterOptions | OpenTelemetry.Exporter.Zipkin | 1.14.0 |
119119
| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.14.0 |
120-
| OpenTelemetry.Instrumentation.AspNet.AspNetTraceInstrumentationOptions | OpenTelemetry.Instrumentation.AspNet | 1.14.0-rc.1 |
120+
| OpenTelemetry.Instrumentation.AspNet.AspNetTraceInstrumentationOptions | OpenTelemetry.Instrumentation.AspNet | 1.14.0 |
121121
| OpenTelemetry.Instrumentation.AspNetCore.AspNetCoreTraceInstrumentationOptions | OpenTelemetry.Instrumentation.AspNetCore | 1.14.0 |
122122
| OpenTelemetry.Instrumentation.EntityFrameworkCore.EntityFrameworkInstrumentationOptions | OpenTelemetry.Instrumentation.EntityFrameworkCore | 1.14.0-beta.2 |
123123
| OpenTelemetry.Instrumentation.GrpcNetClient.GrpcClientTraceInstrumentationOptions | OpenTelemetry.Instrumentation.GrpcNetClient | 1.14.0-beta.1 |
@@ -135,7 +135,7 @@ public class MyPlugin
135135
| OpenTelemetry.Exporter.ConsoleExporterOptions | OpenTelemetry.Exporter.Console | 1.14.0 |
136136
| OpenTelemetry.Exporter.PrometheusExporterOptions | OpenTelemetry.Exporter.Prometheus.HttpListener | 1.14.0-beta.1 |
137137
| OpenTelemetry.Exporter.OtlpExporterOptions | OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.14.0 |
138-
| OpenTelemetry.Instrumentation.AspNet.AspNetMetricsInstrumentationOptions | OpenTelemetry.Instrumentation.AspNet | 1.14.0-rc.1 |
138+
| OpenTelemetry.Instrumentation.AspNet.AspNetMetricsInstrumentationOptions | OpenTelemetry.Instrumentation.AspNet | 1.14.0 |
139139
| OpenTelemetry.Instrumentation.Runtime.RuntimeInstrumentationOptions | OpenTelemetry.Instrumentation.Runtime | 1.14.0 |
140140

141141
### Logs

src/Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
<PackageVersion Include="OpenTelemetry.Exporter.Prometheus.HttpListener" Version="1.14.0-beta.1" />
1717
<PackageVersion Include="OpenTelemetry.Exporter.Zipkin" Version="1.14.0" />
1818
<PackageVersion Include="OpenTelemetry.Extensions.Propagators" Version="1.14.0" />
19-
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNet" Version="1.14.0-rc.1" />
20-
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule" Version="1.14.0-rc.1" />
19+
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNet" Version="1.14.0" />
20+
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule" Version="1.14.0" />
2121
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.14.0" />
2222
<PackageVersion Include="OpenTelemetry.Instrumentation.EntityFrameworkCore" Version="1.14.0-beta.2" />
2323
<PackageVersion Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.14.0-beta.1" />

src/OpenTelemetry.AutoInstrumentation.Native/netfx_assembly_redirection.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ void CorProfiler::InitNetFxAssemblyRedirectsMap()
4242
{ L"OpenTelemetry.Exporter.Prometheus.HttpListener", {1, 0, 0, 0} },
4343
{ L"OpenTelemetry.Exporter.Zipkin", {1, 0, 0, 0} },
4444
{ L"OpenTelemetry.Extensions.Propagators", {1, 0, 0, 0} },
45-
{ L"OpenTelemetry.Instrumentation.AspNet", {1, 14, 0, 758} },
46-
{ L"OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule", {1, 14, 0, 758} },
45+
{ L"OpenTelemetry.Instrumentation.AspNet", {1, 14, 0, 814} },
46+
{ L"OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule", {1, 14, 0, 814} },
4747
{ L"OpenTelemetry.Instrumentation.GrpcNetClient", {1, 14, 0, 764} },
4848
{ L"OpenTelemetry.Instrumentation.Http", {1, 14, 0, 774} },
4949
{ L"OpenTelemetry.Instrumentation.Process", {1, 14, 0, 798} },
@@ -186,8 +186,8 @@ void CorProfiler::InitNetFxAssemblyRedirectsMap()
186186
{ L"OpenTelemetry.Exporter.Prometheus.HttpListener", {1, 0, 0, 0} },
187187
{ L"OpenTelemetry.Exporter.Zipkin", {1, 0, 0, 0} },
188188
{ L"OpenTelemetry.Extensions.Propagators", {1, 0, 0, 0} },
189-
{ L"OpenTelemetry.Instrumentation.AspNet", {1, 14, 0, 758} },
190-
{ L"OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule", {1, 14, 0, 758} },
189+
{ L"OpenTelemetry.Instrumentation.AspNet", {1, 14, 0, 814} },
190+
{ L"OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule", {1, 14, 0, 814} },
191191
{ L"OpenTelemetry.Instrumentation.GrpcNetClient", {1, 14, 0, 764} },
192192
{ L"OpenTelemetry.Instrumentation.Http", {1, 14, 0, 774} },
193193
{ L"OpenTelemetry.Instrumentation.Process", {1, 14, 0, 798} },
@@ -329,8 +329,8 @@ void CorProfiler::InitNetFxAssemblyRedirectsMap()
329329
{ L"OpenTelemetry.Exporter.Prometheus.HttpListener", {1, 0, 0, 0} },
330330
{ L"OpenTelemetry.Exporter.Zipkin", {1, 0, 0, 0} },
331331
{ L"OpenTelemetry.Extensions.Propagators", {1, 0, 0, 0} },
332-
{ L"OpenTelemetry.Instrumentation.AspNet", {1, 14, 0, 758} },
333-
{ L"OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule", {1, 14, 0, 758} },
332+
{ L"OpenTelemetry.Instrumentation.AspNet", {1, 14, 0, 814} },
333+
{ L"OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule", {1, 14, 0, 814} },
334334
{ L"OpenTelemetry.Instrumentation.GrpcNetClient", {1, 14, 0, 764} },
335335
{ L"OpenTelemetry.Instrumentation.Http", {1, 14, 0, 774} },
336336
{ L"OpenTelemetry.Instrumentation.Process", {1, 14, 0, 798} },
@@ -390,8 +390,8 @@ void CorProfiler::InitNetFxAssemblyRedirectsMap()
390390
{ L"OpenTelemetry.Exporter.Prometheus.HttpListener", {1, 0, 0, 0} },
391391
{ L"OpenTelemetry.Exporter.Zipkin", {1, 0, 0, 0} },
392392
{ L"OpenTelemetry.Extensions.Propagators", {1, 0, 0, 0} },
393-
{ L"OpenTelemetry.Instrumentation.AspNet", {1, 14, 0, 758} },
394-
{ L"OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule", {1, 14, 0, 758} },
393+
{ L"OpenTelemetry.Instrumentation.AspNet", {1, 14, 0, 814} },
394+
{ L"OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule", {1, 14, 0, 814} },
395395
{ L"OpenTelemetry.Instrumentation.GrpcNetClient", {1, 14, 0, 764} },
396396
{ L"OpenTelemetry.Instrumentation.Http", {1, 14, 0, 774} },
397397
{ L"OpenTelemetry.Instrumentation.Process", {1, 14, 0, 798} },

src/OpenTelemetry.AutoInstrumentation.StartupHook/NativeMethods.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ static NativeMethods()
1616
NativeLibrary.SetDllImportResolver(typeof(NativeMethods).Assembly, ImportResolver);
1717
}
1818

19+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
1920
[DllImport("OpenTelemetry.AutoInstrumentation.Native")]
2021
public static extern bool IsProfilerAttached();
2122

src/OpenTelemetry.AutoInstrumentation/NativeMethods.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,35 +180,45 @@ private static bool TryParseSpanContext(Activity currentActivity, out ulong trac
180180
// and optional on .NET Core
181181
private static class Windows
182182
{
183+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
183184
[DllImport("OpenTelemetry.AutoInstrumentation.Native.dll")]
184185
public static extern void AddInstrumentations([MarshalAs(UnmanagedType.LPWStr)] string id, [In] NativeCallTargetDefinition[] methodArrays, int size);
185186

187+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
186188
[DllImport("OpenTelemetry.AutoInstrumentation.Native.dll")]
187189
public static extern void AddDerivedInstrumentations([MarshalAs(UnmanagedType.LPWStr)] string id, [In] NativeCallTargetDefinition[] methodArrays, int size);
188190

191+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
189192
[DllImport("OpenTelemetry.AutoInstrumentation.Native.dll")]
190193
public static extern void ConfigureContinuousProfiler(bool threadSamplingEnabled, uint threadSamplingInterval, bool allocationSamplingEnabled, uint maxMemorySamplesPerMinute, uint selectedThreadSamplingInterval);
191194

192195
#if NET
193196

197+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
194198
[DllImport("OpenTelemetry.AutoInstrumentation.Native.dll")]
195199
public static extern int ContinuousProfilerReadThreadSamples(int len, byte[] buf);
196200

201+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
197202
[DllImport("OpenTelemetry.AutoInstrumentation.Native.dll")]
198203
public static extern int ContinuousProfilerReadAllocationSamples(int len, byte[] buf);
199204

205+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
200206
[DllImport("OpenTelemetry.AutoInstrumentation.Native.dll")]
201207
public static extern int SelectiveSamplerReadThreadSamples(int len, byte[] buf);
202208

209+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
203210
[DllImport("OpenTelemetry.AutoInstrumentation.Native.dll")]
204211
public static extern void ContinuousProfilerSetNativeContext(ulong traceIdHigh, ulong traceIdLow, ulong spanId);
205212

213+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
206214
[DllImport("OpenTelemetry.AutoInstrumentation.Native.dll")]
207215
public static extern void ContinuousProfilerNotifySpanStopped(ulong traceIdHigh, ulong traceIdLow, ulong spanId);
208216

217+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
209218
[DllImport("OpenTelemetry.AutoInstrumentation.Native.dll")]
210219
public static extern void SelectiveSamplingStart(ulong traceIdHigh, ulong traceIdLow);
211220

221+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
212222
[DllImport("OpenTelemetry.AutoInstrumentation.Native.dll")]
213223
public static extern void SelectiveSamplingStop(ulong traceIdHigh, ulong traceIdLow);
214224
#endif
@@ -218,34 +228,44 @@ private static class Windows
218228
// assume .NET Core if not running on Windows
219229
private static class NonWindows
220230
{
231+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
221232
[DllImport("OpenTelemetry.AutoInstrumentation.Native")]
222233
public static extern void AddInstrumentations([MarshalAs(UnmanagedType.LPWStr)] string id, [In] NativeCallTargetDefinition[] methodArrays, int size);
223234

235+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
224236
[DllImport("OpenTelemetry.AutoInstrumentation.Native")]
225237
public static extern void AddDerivedInstrumentations([MarshalAs(UnmanagedType.LPWStr)] string id, [In] NativeCallTargetDefinition[] methodArrays, int size);
226238

239+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
227240
[DllImport("OpenTelemetry.AutoInstrumentation.Native")]
228241
public static extern void ConfigureContinuousProfiler(bool threadSamplingEnabled, uint threadSamplingInterval, bool allocationSamplingEnabled, uint maxMemorySamplesPerMinute, uint selectedThreadSamplingInterval);
229242

230243
#if NET
244+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
231245
[DllImport("OpenTelemetry.AutoInstrumentation.Native")]
232246
public static extern int ContinuousProfilerReadThreadSamples(int len, byte[] buf);
233247

248+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
234249
[DllImport("OpenTelemetry.AutoInstrumentation.Native")]
235250
public static extern int ContinuousProfilerReadAllocationSamples(int len, byte[] buf);
236251

252+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
237253
[DllImport("OpenTelemetry.AutoInstrumentation.Native")]
238254
public static extern int SelectiveSamplerReadThreadSamples(int len, byte[] buf);
239255

256+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
240257
[DllImport("OpenTelemetry.AutoInstrumentation.Native")]
241258
public static extern void ContinuousProfilerSetNativeContext(ulong traceIdHigh, ulong traceIdLow, ulong spanId);
242259

260+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
243261
[DllImport("OpenTelemetry.AutoInstrumentation.Native")]
244262
public static extern void ContinuousProfilerNotifySpanStopped(ulong traceIdHigh, ulong traceIdLow, ulong spanId);
245263

264+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
246265
[DllImport("OpenTelemetry.AutoInstrumentation.Native")]
247266
public static extern void SelectiveSamplingStart(ulong traceIdHigh, ulong traceIdLow);
248267

268+
[DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
249269
[DllImport("OpenTelemetry.AutoInstrumentation.Native")]
250270
public static extern void SelectiveSamplingStop(ulong traceIdHigh, ulong traceIdLow);
251271
#endif

0 commit comments

Comments
 (0)