Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report Redis failed calls #909

Merged
merged 6 commits into from
Jun 7, 2024
Merged

Conversation

grcevski
Copy link
Contributor

@grcevski grcevski commented Jun 6, 2024

This PR does couple of things:

  1. Tracks now failed Go Redis calls. We were previously ignoring them since there's no data, e.g. the server doesn't respond or even connect.
  2. I noticed we didn't send db.system for OTel attributes, only Prometheus. I've added that now and I updated the tests to explicitly check.
  3. I added error.type as attribute for metrics. According to the OTel spec, I can't see status code for DB metrics, but error type shouldn't be empty if there were errors. This way clients can determine if they have failing SQL or Redis calls.
  4. I refactored the OATS tests to remove some duplication of files.

@grcevski grcevski requested review from mariomac and marctc as code owners June 6, 2024 19:07
@codecov-commenter
Copy link

codecov-commenter commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 87.71930% with 7 lines in your changes missing coverage. Please review.

Project coverage is 78.62%. Comparing base (8676f4e) to head (327565a).

Files Patch % Lines
pkg/internal/request/span_getters.go 72.22% 4 Missing and 1 partial ⚠️
pkg/internal/export/otel/metrics.go 50.00% 0 Missing and 1 partial ⚠️
pkg/internal/export/prom/prom.go 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #909      +/-   ##
==========================================
+ Coverage   78.53%   78.62%   +0.09%     
==========================================
  Files         132      132              
  Lines        9665     9688      +23     
==========================================
+ Hits         7590     7617      +27     
+ Misses       1565     1564       -1     
+ Partials      510      507       -3     
Flag Coverage Δ
integration-test 54.71% <45.61%> (-0.18%) ⬇️
k8s-integration-test 56.06% <38.59%> (-0.12%) ⬇️
oats-test 36.40% <54.38%> (+0.19%) ⬆️
unittests 43.80% <54.38%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@mariomac mariomac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@grcevski grcevski merged commit cd4f89d into grafana:main Jun 7, 2024
6 checks passed
@grcevski grcevski deleted the detect_redis_fail branch June 7, 2024 13:25
bareckidarek pushed a commit to bareckidarek/beyla that referenced this pull request Jun 14, 2024
mattdurham pushed a commit to mattdurham/beyla that referenced this pull request Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants