Skip to content

Commit 4b9336f

Browse files
committed
More test fixes
1 parent d453889 commit 4b9336f

15 files changed

Lines changed: 473 additions & 421 deletions

File tree

tracer/src/Datadog.Trace/Configuration/ExporterSettings.cs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ public sealed partial class ExporterSettings
2929
{
3030
private static readonly IDatadogLogger Log = DatadogLogging.GetLoggerFor(typeof(ExporterSettings));
3131

32+
/// <summary>
33+
/// Backing field for AzureFunctionsGeneratedTracesPipeName.
34+
/// </summary>
35+
private static string? _azureFunctionsGeneratedTracesPipeName;
36+
37+
/// <summary>
38+
/// Backing field for AzureFunctionsGeneratedMetricsPipeName.
39+
/// </summary>
40+
private static string? _azureFunctionsGeneratedMetricsPipeName;
41+
3242
/// <summary>
3343
/// Allows overriding of file system access for tests.
3444
/// </summary>
@@ -101,14 +111,14 @@ internal ExporterSettings(Raw rawSettings, Func<string, bool> fileExists, IConfi
101111
if (string.IsNullOrEmpty(tracesPipeName))
102112
{
103113
tracesPipeName = GenerateUniquePipeName("dd_trace");
104-
AzureFunctionsGeneratedTracesPipeName = tracesPipeName;
114+
_azureFunctionsGeneratedTracesPipeName = tracesPipeName;
105115
Log.Information("Azure Functions environment detected with no explicit trace pipe name. Generated unique pipe name: {TracesPipeName}", tracesPipeName);
106116
}
107117

108118
if (string.IsNullOrEmpty(metricsPipeName))
109119
{
110120
metricsPipeName = GenerateUniquePipeName("dd_dogstatsd");
111-
AzureFunctionsGeneratedMetricsPipeName = metricsPipeName;
121+
_azureFunctionsGeneratedMetricsPipeName = metricsPipeName;
112122
Log.Information("Azure Functions environment detected with no explicit metrics pipe name. Generated unique pipe name: {MetricsPipeName}", metricsPipeName);
113123
}
114124
}
@@ -149,14 +159,14 @@ internal ExporterSettings(Raw rawSettings, Func<string, bool> fileExists, IConfi
149159
/// This is set when running in Azure Functions without explicit pipe name configuration.
150160
/// Used by ServerlessCompat instrumentation to coordinate pipe names with compat layer.
151161
/// </summary>
152-
internal static string? AzureFunctionsGeneratedTracesPipeName { get; private set; }
162+
internal static string? AzureFunctionsGeneratedTracesPipeName => _azureFunctionsGeneratedTracesPipeName;
153163

154164
/// <summary>
155165
/// Gets the generated metrics pipe name for Azure Functions coordination.
156166
/// This is set when running in Azure Functions without explicit pipe name configuration.
157167
/// Used by ServerlessCompat instrumentation to coordinate pipe names with compat layer.
158168
/// </summary>
159-
internal static string? AzureFunctionsGeneratedMetricsPipeName { get; private set; }
169+
internal static string? AzureFunctionsGeneratedMetricsPipeName => _azureFunctionsGeneratedMetricsPipeName;
160170

161171
/// <summary>
162172
/// Gets the Uri where the Tracer can connect to the Agent.

tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/TelemetryMetricGenerator/CiVisibilityMetricsTelemetryCollector_CountShared.g.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
namespace Datadog.Trace.Telemetry;
1212
internal sealed partial class CiVisibilityMetricsTelemetryCollector
1313
{
14-
private const int CountSharedLength = 336;
14+
private const int CountSharedLength = 340;
1515

1616
/// <summary>
1717
/// Creates the buffer for the <see cref="Datadog.Trace.Telemetry.Metrics.CountShared" /> values.
@@ -356,6 +356,10 @@ private static AggregatedMetric[] GetCountSharedBuffer()
356356
new(new[] { "integration_name:hangfire", "error_type:invoker" }),
357357
new(new[] { "integration_name:hangfire", "error_type:execution" }),
358358
new(new[] { "integration_name:hangfire", "error_type:missing_member" }),
359+
new(new[] { "integration_name:serverlesscompat", "error_type:duck_typing" }),
360+
new(new[] { "integration_name:serverlesscompat", "error_type:invoker" }),
361+
new(new[] { "integration_name:serverlesscompat", "error_type:execution" }),
362+
new(new[] { "integration_name:serverlesscompat", "error_type:missing_member" }),
359363
};
360364

361365
/// <summary>
@@ -364,7 +368,7 @@ private static AggregatedMetric[] GetCountSharedBuffer()
364368
/// It is equal to the cardinality of the tag combinations (or 1 if there are no tags)
365369
/// </summary>
366370
private static int[] CountSharedEntryCounts { get; }
367-
= new int[]{ 336, };
371+
= new int[]{ 340, };
368372

369373
public void RecordCountSharedIntegrationsError(Datadog.Trace.Telemetry.Metrics.MetricTags.IntegrationName tag1, Datadog.Trace.Telemetry.Metrics.MetricTags.InstrumentationError tag2, int increment = 1)
370374
{

0 commit comments

Comments
 (0)