The version of the Elastic.Apm nuget package used : Elastic.Apm v. 1.16.1
Environment
Operating system and version: Windows 11 Pro v.22H2(Localhost) , Amazon Linux AMI 2.0.20221213 x86_64 ECS HVM GP2
.NET Framework/Core name and version : .NET 6.0, .NET 5.0, .NET Standard 2.0
Application Target Framework(s) : .NET 6.0
Describe the bug
Kibana version: 8.1.2
Elasticsearch version: 8.1.2
APM Server version: 8.1.2
APM Agent language and version: APM .NET 1.19.0
Browser version: Chrome 108.0.5359.125 (Official Build) (64-bit)
APM transaction name is misleading as follows
the transaction name of success request is formatted as “{HTTP method} {controller}/{method}”
the transaction name of failure request is formatted as “{HTTP method} {URL}”
I expect all transaction names to be formatted as “{HTTP method} {URL}”
I can fix this with a weird solution by setting the name at the beginning of request in simple middleware.
Agent.Tracer.CurrentTransaction.Name = Agent.Tracer.CurrentTransaction.Name;
public static class ApmMiddlewareExtension { public static IApplicationBuilder UseAllElasticApm( this IApplicationBuilder builder, IConfiguration configuration = null ) => Elastic.Apm.AspNetCore.ApmMiddlewareExtension .UseElasticApm(builder, configuration, new HttpDiagnosticsSubscriber(), new EfCoreDiagnosticsSubscriber(), new SqlClientDiagnosticSubscriber(), new MongoDbDiagnosticsSubscriber()); }
Then do '....'
Test the API for getting some APM logs
See error
Here is my screenshot.
Expected behavior
I expect all transaction names to be formatted as “{HTTP method} {URL}”
also, from my debugging the name value is always “{HTTP method} {URL}” since beginning.
Actual behavior
APM transaction name is misleading as follows
the transaction name of success request is formatted as “{HTTP method} {controller}/{method}”
the transaction name of failure request is formatted as “{HTTP method} {URL}”
APM Agent version
The version of the
Elastic.Apm
nuget package used : Elastic.Apm v. 1.16.1Environment
Operating system and version: Windows 11 Pro v.22H2(Localhost) , Amazon Linux AMI 2.0.20221213 x86_64 ECS HVM GP2
.NET Framework/Core name and version : .NET 6.0, .NET 5.0, .NET Standard 2.0
Application Target Framework(s) : .NET 6.0
Describe the bug
Kibana version: 8.1.2 Elasticsearch version: 8.1.2 APM Server version: 8.1.2 APM Agent language and version: APM .NET 1.19.0 Browser version: Chrome 108.0.5359.125 (Official Build) (64-bit)
APM transaction name is misleading as follows
I expect all transaction names to be formatted as “{HTTP method} {URL}”
I can fix this with a weird solution by setting the name at the beginning of request in simple middleware.
Agent.Tracer.CurrentTransaction.Name = Agent.Tracer.CurrentTransaction.Name;
To Reproduce
Steps to reproduce the behavior:
"ElasticApm": { "ServerUrls": "https://xxx.apm.us-central1.gcp.cloud.es.io:443", "SecretToken": "yyy", "TransactionSampleRate": 1.0, },
public static class ApmMiddlewareExtension { public static IApplicationBuilder UseAllElasticApm( this IApplicationBuilder builder, IConfiguration configuration = null ) => Elastic.Apm.AspNetCore.ApmMiddlewareExtension .UseElasticApm(builder, configuration, new HttpDiagnosticsSubscriber(), new EfCoreDiagnosticsSubscriber(), new SqlClientDiagnosticSubscriber(), new MongoDbDiagnosticsSubscriber()); }
Then do '....' Test the API for getting some APM logs
See error Here is my screenshot.
Expected behavior
I expect all transaction names to be formatted as “{HTTP method} {URL}” also, from my debugging the name value is always “{HTTP method} {URL}” since beginning.
Actual behavior
APM transaction name is misleading as follows