Dotnet 8 > Serilog > OTEL > APM

I am trying to create a demo on my local to prove that I can setup auto instrumentation of dotnet 8 web api using Serilog sink to send data to OTEL collector which in turn is forwarding Trace, Metrics and Logs data to elastic APM agent in fleet-server.

The Problem is that the APM services doesn't show a service named - DotNetWebAPI in APM Services in Kibana.

I have setup the ELK stack using this article - Getting started with the Elastic Stack and Docker Compose: Part 2 | Elastic Blog

Version of Elastic products


I have loosely followed this article for dotnet 8 api, as it did not work with SSL, so i digressed a little, but the container is up and running and i can receive response from api endpoint in postman and can see the logs for it in the Kibana Logs Streams, but can't see the DotNetWebAPI in the APM services..

I have checked in my DotNetWebAPI code in this public repo - GitHub - SunnyMittal/DotNetWebAPI

Elastic stack code is placed in this public repo -

Steps to reproduce the issue.

  1. use any password to generate .net web api certs using below command (use that password in ELK repo's .env file for variable - DOTNETWEBAPI_CERT_PASSWORD)
dotnet dev-certs https -ep $env:USERPROFILE\.aspnet\https\aspnetapp.pfx -p localDevNetCore
  1. Build the docker image say using below command from DotNetWebAPI project folder
    docker build . --progress plain -t "tb1"
  2. Standup ELK stack using below docker command from ELK folder
    docker compose up -d
  3. Browse to this url to trigger the API and then check logs in Kibana Stream

Let me know if you need any further info.
Thanks in advance for your help!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.