Skip to content

Commit 6b84e79

Browse files
committed
update name
1 parent 0ea74ad commit 6b84e79

File tree

17 files changed

+57
-54
lines changed

17 files changed

+57
-54
lines changed

tracer/src/Datadog.Trace.Trimming/build/Datadog.Trace.Trimming.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@
223223
<assembly fullname="System.Data.SqlClient" />
224224
<assembly fullname="System.Data.SQLite" />
225225
<assembly fullname="System.Diagnostics.Debug">
226+
<type fullname="System.Diagnostics.Debug" />
226227
<type fullname="System.Diagnostics.Debugger" />
227228
<type fullname="System.Diagnostics.DebuggerBrowsableAttribute" />
228229
<type fullname="System.Diagnostics.DebuggerBrowsableState" />
@@ -559,6 +560,8 @@
559560
<type fullname="System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute" />
560561
<type fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute" />
561562
<type fullname="System.Diagnostics.ConditionalAttribute" />
563+
<type fullname="System.Diagnostics.Debug" />
564+
<type fullname="System.Diagnostics.Debug/AssertInterpolatedStringHandler" />
562565
<type fullname="System.Diagnostics.DebuggableAttribute" />
563566
<type fullname="System.Diagnostics.DebuggableAttribute/DebuggingModes" />
564567
<type fullname="System.Diagnostics.Debugger" />

tracer/src/Datadog.Trace/AppSec/ApiSec/EndpointsCollection.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static void CollectEndpoints(IReadOnlyList<object> endpoints)
2525
{
2626
var maxEndpoints = Security.Instance.ApiSecurity.GetEndpointsCollectionMessageLimit();
2727

28-
List<AsmEndpointData> discoveredEndpoints = [];
28+
List<AppEndpointData> discoveredEndpoints = [];
2929

3030
for (var i = 0; i < endpoints.Count && discoveredEndpoints.Count < maxEndpoints; i++)
3131
{
@@ -43,7 +43,7 @@ public static void CollectEndpoints(IReadOnlyList<object> endpoints)
4343
ReportEndpoints(discoveredEndpoints);
4444
}
4545

46-
private static void CollectEndpoint(object endpoint, List<AsmEndpointData> discoveredEndpoints, int maxEndpoints)
46+
private static void CollectEndpoint(object endpoint, List<AppEndpointData> discoveredEndpoints, int maxEndpoints)
4747
{
4848
if (!endpoint.TryDuckCast<RouteEndpoint>(out var routeEndpoint))
4949
{
@@ -99,21 +99,21 @@ private static void CollectEndpoint(object endpoint, List<AsmEndpointData> disco
9999
}
100100
}
101101

102-
private static void InsertEndpoint(string httpMethod, string path, List<AsmEndpointData> discoveredEndpoints)
102+
private static void InsertEndpoint(string httpMethod, string path, List<AppEndpointData> discoveredEndpoints)
103103
{
104104
try
105105
{
106-
discoveredEndpoints.Add(new AsmEndpointData(httpMethod, path));
106+
discoveredEndpoints.Add(new AppEndpointData(httpMethod, path));
107107
}
108108
catch (Exception e)
109109
{
110110
Log.Debug(e, "Failed to add endpoint to the list");
111111
}
112112
}
113113

114-
private static void ReportEndpoints(List<AsmEndpointData> discoveredEndpoints)
114+
private static void ReportEndpoints(List<AppEndpointData> discoveredEndpoints)
115115
{
116-
Tracer.Instance.TracerManager.Telemetry.RecordAsmEndpoints(discoveredEndpoints);
116+
Tracer.Instance.TracerManager.Telemetry.RecordAppEndpoints(discoveredEndpoints);
117117
}
118118
}
119119

tracer/src/Datadog.Trace/Telemetry/Collectors/AsmEndpointsTelemetryCollector.cs renamed to tracer/src/Datadog.Trace/Telemetry/Collectors/AppEndpointsTelemetryCollector.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="AsmEndpointsTelemetryCollector.cs" company="Datadog">
1+
// <copyright file="AppEndpointsTelemetryCollector.cs" company="Datadog">
22
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
33
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
44
// </copyright>
@@ -9,15 +9,15 @@
99

1010
namespace Datadog.Trace.Telemetry.Collectors;
1111

12-
internal class AsmEndpointsTelemetryCollector
12+
internal class AppEndpointsTelemetryCollector
1313
{
14-
private ICollection<AsmEndpointData>? _endpoints;
14+
private ICollection<AppEndpointData>? _endpoints;
1515

1616
/// <summary>
1717
/// Records the endpoints to be collected.
1818
/// </summary>
1919
/// <param name="endpoints">The list of endpoints collected.</param>
20-
public void RecordEndpoints(ICollection<AsmEndpointData> endpoints)
20+
public void RecordEndpoints(ICollection<AppEndpointData> endpoints)
2121
{
2222
_endpoints = endpoints;
2323
}
@@ -26,7 +26,7 @@ public void RecordEndpoints(ICollection<AsmEndpointData> endpoints)
2626
/// Returns the collected endpoints and clears the internal state.
2727
/// </summary>
2828
/// <returns>The collected endpoints.</returns>
29-
public ICollection<AsmEndpointData>? GetData()
29+
public ICollection<AppEndpointData>? GetData()
3030
{
3131
var endpoints = _endpoints;
3232
_endpoints = null;

tracer/src/Datadog.Trace/Telemetry/DTOs/AsmEndpointData.cs renamed to tracer/src/Datadog.Trace/Telemetry/DTOs/AppEndpointData.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="AsmEndpointData.cs" company="Datadog">
1+
// <copyright file="AppEndpointData.cs" company="Datadog">
22
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
33
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
44
// </copyright>
@@ -9,7 +9,7 @@
99

1010
namespace Datadog.Trace.Telemetry;
1111

12-
internal class AsmEndpointData
12+
internal class AppEndpointData
1313
{
1414
private static readonly string[] ValidMethods = [
1515
"GET",
@@ -24,7 +24,7 @@ internal class AsmEndpointData
2424
"*"
2525
];
2626

27-
public AsmEndpointData(string method, string path)
27+
public AppEndpointData(string method, string path)
2828
{
2929
if (!ValidMethods.Contains(method))
3030
{

tracer/src/Datadog.Trace/Telemetry/DTOs/AsmEndpointsPayload.cs renamed to tracer/src/Datadog.Trace/Telemetry/DTOs/AppEndpointsPayload.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="AsmEndpointsPayload.cs" company="Datadog">
1+
// <copyright file="AppEndpointsPayload.cs" company="Datadog">
22
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
33
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
44
// </copyright>
@@ -9,7 +9,7 @@
99

1010
namespace Datadog.Trace.Telemetry;
1111

12-
internal class AsmEndpointsPayload(ICollection<AsmEndpointData> endpoints, bool isFirst) : IPayload
12+
internal class AppEndpointsPayload(ICollection<AppEndpointData> endpoints, bool isFirst) : IPayload
1313
{
1414
/// <summary>
1515
/// Gets or sets a value indicating whether the payload is the first one sent
@@ -20,5 +20,5 @@ internal class AsmEndpointsPayload(ICollection<AsmEndpointData> endpoints, bool
2020
/// <summary>
2121
/// Gets or sets the endpoints collected of the application.
2222
/// </summary>
23-
public ICollection<AsmEndpointData> Endpoints { get; set; } = endpoints;
23+
public ICollection<AppEndpointData> Endpoints { get; set; } = endpoints;
2424
}

tracer/src/Datadog.Trace/Telemetry/ITelemetryController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ internal interface ITelemetryController
7575
/// <summary>
7676
/// Called to record endpoints of the current application for API Security,
7777
/// </summary>
78-
void RecordAsmEndpoints(ICollection<AsmEndpointData> asmEndpoints);
78+
void RecordAppEndpoints(ICollection<AppEndpointData> appEndpoints);
7979
}
8080
}

tracer/src/Datadog.Trace/Telemetry/NullTelemetryController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void RecordGitMetadata(GitMetadata gitMetadata)
5858
{
5959
}
6060

61-
public void RecordAsmEndpoints(ICollection<AsmEndpointData> asmEndpoints)
61+
public void RecordAppEndpoints(ICollection<AppEndpointData> appEndpoints)
6262
{
6363
}
6464
}

tracer/src/Datadog.Trace/Telemetry/TelemetryController.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ internal class TelemetryController : ITelemetryController
3636
private readonly IConfigurationTelemetry _configuration;
3737
private readonly IDependencyTelemetryCollector _dependencies;
3838
private readonly IntegrationTelemetryCollector _integrations = new();
39-
private readonly AsmEndpointsTelemetryCollector _asmEndpoints = new();
39+
private readonly AppEndpointsTelemetryCollector _appEndpoints = new();
4040
private readonly ProductsTelemetryCollector _products = new();
4141
private readonly IMetricsTelemetryCollector _metrics;
4242
private readonly RedactedErrorLogCollector? _redactedErrorLogs;
@@ -109,9 +109,9 @@ public void RecordGitMetadata(GitMetadata gitMetadata)
109109
_configuration.Record(ConfigurationKeys.GitCommitSha, gitMetadata.CommitSha, recordValue: true, ConfigurationOrigins.Calculated);
110110
}
111111

112-
public void RecordAsmEndpoints(ICollection<AsmEndpointData> asmEndpoints)
112+
public void RecordAppEndpoints(ICollection<AppEndpointData> appEndpoints)
113113
{
114-
_asmEndpoints.RecordEndpoints(asmEndpoints);
114+
_appEndpoints.RecordEndpoints(appEndpoints);
115115
}
116116

117117
public void Start()
@@ -195,7 +195,7 @@ public async Task DumpTelemetry(string filePath)
195195
configuration: null, // we don't store this indefinitely, so no way of dumping full config
196196
_dependencies.GetFullData(),
197197
_integrations.GetFullData(),
198-
_asmEndpoints.GetData(),
198+
_appEndpoints.GetData(),
199199
metrics: null,
200200
_products.GetFullData(),
201201
sendAppStarted: false);
@@ -333,7 +333,7 @@ private async Task PushTelemetry(bool includeLogs, bool sendAppClosing)
333333
_configuration.GetData(),
334334
_dependencies.GetData(),
335335
_integrations.GetData(),
336-
_asmEndpoints.GetData(),
336+
_appEndpoints.GetData(),
337337
in metrics,
338338
_products.GetData());
339339

tracer/src/Datadog.Trace/Telemetry/TelemetryDataAggregator.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ public TelemetryInput Combine(
3131
ICollection<ConfigurationKeyValue>? configuration,
3232
ICollection<DependencyTelemetryData>? dependencies,
3333
ICollection<IntegrationTelemetryData>? integrations,
34-
ICollection<AsmEndpointData>? asmEndpoints,
34+
ICollection<AppEndpointData>? appEndpoints,
3535
in MetricResults? metrics,
3636
ProductsData? products)
3737
{
3838
return new TelemetryInput(
3939
CombineWith(configuration),
4040
CombineWith(dependencies),
4141
CombineWith(integrations),
42-
CombineWith(asmEndpoints),
42+
CombineWith(appEndpoints),
4343
metrics,
4444
CombineWith(products),
4545
sendAppStarted: !_appStartedSent);
@@ -67,7 +67,7 @@ public void SaveDataIfRequired(bool success, in TelemetryInput input)
6767
input.Configuration,
6868
input.Dependencies,
6969
input.Integrations,
70-
input.AsmEndpoints,
70+
input.AppEndpoints,
7171
metrics: null,
7272
products: input.Products,
7373
input.SendAppStarted);
@@ -162,9 +162,9 @@ public void SaveDataIfRequired(bool success, in TelemetryInput input)
162162
};
163163
}
164164

165-
private ICollection<AsmEndpointData>? CombineWith(ICollection<AsmEndpointData>? newValues)
165+
private ICollection<AppEndpointData>? CombineWith(ICollection<AppEndpointData>? newValues)
166166
{
167167
// The Endpoints are set only once, so we don't need to merge them
168-
return _previous?.AsmEndpoints ?? newValues;
168+
return _previous?.AppEndpoints ?? newValues;
169169
}
170170
}

tracer/src/Datadog.Trace/Telemetry/TelemetryDataBuilder.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@ public TelemetryData BuildTelemetryData(
111111
new DistributionsPayload(distributions)));
112112
}
113113

114-
if (input.AsmEndpoints is { } asmEndpoints)
114+
if (input.AppEndpoints is { } appEndpoints)
115115
{
116-
Log.Debug("ASM endpoints collected, sending asm-endpoints");
116+
Log.Debug("Application endpoints collected, sending app-endpoints");
117117
data ??= new();
118118
data.Add(new(
119-
TelemetryRequestTypes.AsmEndpoints,
120-
new AsmEndpointsPayload(asmEndpoints, true)));
119+
TelemetryRequestTypes.AppEndpoints,
120+
new AppEndpointsPayload(appEndpoints, true)));
121121
}
122122

123123
if (sendAppClosing)

0 commit comments

Comments
 (0)