DB Span Stacktrace reporting wrong filename

Is this question related to that entry. That indeed seems to be a bug (not sure yet, I need to dig deeper).

Yes its related.
I am provding steps to repoduce

Kibana version : 8.1.2
Elasticsearch version : 8.1.2
APM Server version : 8.1.2
APM Agent language and version : dotnet agent version: 1.18.0

  1. Clone the repo - BuildingRESTfulAPIAspNetCore3/Finished sample/CourseLibrary at master · KevinDockx/BuildingRESTfulAPIAspNetCore3 · GitHub
  2. Build the application - dotnet build
  3. Configure elastic dotnet apm agent v1.18.0 for profiler auto instrumentatiion with following environment variables
set CORECLR_ENABLE_PROFILING=1
set CORECLR_PROFILER={FA65FE15-F085-4681-9B20-95E04F6C03CC}
set CORECLR_PROFILER_PATH=<agent_path>\elastic_apm_profiler.dll
set ELASTIC_APM_PROFILER_HOME=<agent_path>
set ELASTIC_APM_PROFILER_INTEGRATIONS=<agent_path>\integrations.yml
set ELASTIC_APM_SPAN_STACK_TRACE_MIN_DURATION=0ms
set ELASTIC_APM_STACK_TRACE_LIMIT=-1
set ELASTIC_APM_SERVICE_NAME=CourseLibraryApp
  1. Launch the dotnet application from directory CourseLibrary\CourseLibrary.API\bin\Debug\netcoreapp3.1 by using the command dotnet CourseLibrary.API.dll
  2. Hit one of the rest api : http://localhost:5000/api/authors
  3. Check the db span stacktrace from Kibana.
{
                "exclude_from_grouping" : false,
                "filename" : """C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.32\System.Private.CoreLib.dll""",
                "classname" : "CourseLibrary.API.Controllers.AuthorsController",
                "line" : {
                  "number" : 0
                },
                "function" : "GetAuthors",
                "module" : "CourseLibrary.API, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
              }

GetAuthors function is part of the application, but its filename is wrong.
Course Library application - GetAuthors function

Question: Agent should have resolved the filename right? since the symbol file .pdb is available.