An example of profiler auto instrumentation with the APM .NET agent
This is an example repository to accompany the blog post for the first public beta release of the profiler auto instrumentation for the .NET APM agent.
Copy the APM server URL and secret token from the Elastic stack deployment, and populate in the .env file.
Run
docker compose up -d
to bring the services up.
Check that the services are running
docker compose ps
Make a request to the ASP.NET Core API
curl -XPOST http://localhost:5000/messages/bulk -H 'Content-Type: application/json' -d '
[{"value":"message 1"},
{"value":"message 2"},
{"value":"message 3"},
{"value":"message 4"},
{"value":"message 5"}]
'
Check that the messages were sent to Kafka by the API, and consumed from Kafka by the console application, by checking
curl -XGET http://localhost:5000/messages
which should yield an array of the sent messages.
Navigate to the APM UI in the Kibana instance that is part of the Elastic Stack deployment.
Observe that the transactions and spans are captured for the request, kafka, and sqlite operations