Skip to content

Conversation

karanveersingh5623
Copy link

@karanveersingh5623 karanveersingh5623 commented Oct 28, 2024

SigNoz/signoz#5996
/claim SigNoz/signoz#5996
Add aspnet dashboard - oltp, v1

ASP.NET Metrics Dashboard for SigNoz Integration

Description:

This PR introduces an ASP.NET metrics dashboard with integrated OpenTelemetry (OTel) instrumentation to monitor application performance and telemetry data sent to SigNoz. Key features include:

1. Telemetry Data Collection

  • Utilizes OpenTelemetry packages for ASP.NET, process, runtime, and core instrumentation to gather metrics and traces, which are then exported to SigNoz.

2. OTLP Configuration

  • Configures OTLP (OpenTelemetry Protocol) for data ingestion using gRPC and HTTP receivers on ports 4317 and 4318, allowing compatibility with various communication protocols.

3. Exporting Data to SigNoz

  • Sets up OTLP exporter to forward collected telemetry data, including process-level metrics (CPU, memory) and application-specific metrics (latency, error rates), to SigNoz, with environment-specific configurations.

4. Dashboard Panels:

  • Application Performance:
    • CPU and memory usage, request rate, and response times.
  • Request and Response Behavior:
    • Tracks request latency, error rates, and active requests.

5. Environment and Resource Attributes:

  • Identifies application environment (Staging/Production) for filtered monitoring in the SigNoz dashboard.

This integration enhances observability by automating metrics and trace collection and centralizing insights into the ASP.NET application's performance.

@makeavish
Copy link
Member

Can you please add the service.name as well?
Also any specific reason to use manual instrumentation, zero code instrumentation should also work

@karanveersingh5623
Copy link
Author

@makeavish

For the service.name, I added a new environment variable for the service name. Users can filter the metrics based on the service name. I'm not sure if this update fulfills the requirement or not.

for zero-code instrumentation it didn't work as expected. It seems like the collected data was not accurate.
Zero-code instrumentation is fast and easy to set up, but in our use case, it didn't collect the metrics that I want to build a dashboard on. So, manual instrumentation is needed.

The attached image shows the list of metrics that we can use to monitor our application. The documentation of each library contains the manual setup for the app. So basically, we need to add more code to get the metrics that we want.
https://opentelemetry.io/docs/zero-code/net/instrumentations/#metrics-instrumentations

Let me know if I am missing something

@makeavish
Copy link
Member

In most of the panels service.name filter is missing in WHERE clause

Also in below panel y-axis unit might be wrong, I think it's bytes
Screenshot 2024-11-27 at 17 39 32

CPU Usage panel query seems to be incorrect.

Unit of Processors panel seems to be wrong
Screenshot 2024-11-27 at 17 48 19

Error rate query is incorrect
Screenshot 2024-11-27 at 17 57 25

Request rate query is also incorrect
Screenshot 2024-11-27 at 17 58 23

Suggest you to read this doc before fixing: https://signoz.io/docs/metrics-management/types-and-aggregation/?utm_source=product&utm_medium=query-builder#histogram--exponential-histogram

@karanveersingh5623
Copy link
Author

@makeavish

I tried to get the CPU usage but it seemed to not have the available metrics for it. So I switched to total CPU time for different states.

image

For the Unit of Processors panel, I changed the aggregate operator to "Count". According to the docs, the Count operator will give us a number of something so it will fit well for displaying the number of processors

image

For the error rate and request rate, the metric that I use ishttp_server_request_duration_countwhich is the only available metric to track the number of requests. I also switch to the "increase" operator, which will give us the total number of events. for example, I simulated the 404 error response code by sending a request 1000 times per second and it gave back a correct number.
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants