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

chore: add concrete tag to log when write failed #707

Merged
merged 1 commit into from
Mar 8, 2023

Conversation

jiacai2050
Copy link
Contributor

@jiacai2050 jiacai2050 commented Mar 8, 2023

Which issue does this PR close?

Closes #

Rationale for this change

When write to CeresDB via Prometheus remote write, I got following error

2023-03-08 06:32:48.818 ERRO [server/src/http.rs:520] handle error: Rejection(GRPCWriteError { source: ErrNoCause { code: 400, msg: "tag index 7 is not found in tag_names:[\"env\", \"instance\", \"job\", \"le\", \"space\", \"tenant\", \"type\"], table:cse_rpc_duration_seconds_bucket" } })
2023-03-08 06:32:48.818 ERRO [server/src/http.rs:520] handle error: Rejection(GRPCWriteError { source: ErrNoCause { code: 400, msg: "tag index 7 is not found in tag_names:[\"env\", \"instance\", \"job\", \"le\", \"space\", \"tenant\", \"type\"], table:cse_rpc_duration_seconds_bucket" } })

Tag index is hard to debug which tag cause problem.

What changes are included in this PR?

  • Log concrete tag when write failed

Are there any user-facing changes?

No

How does this change test

CI

@codecov-commenter
Copy link

Codecov Report

Merging #707 (0620292) into main (95ea870) will increase coverage by 0.81%.
The diff coverage is 62.68%.

❗ Current head 0620292 differs from pull request most recent head a7ba8be. Consider uploading reports for the commit a7ba8be to get more accurate results

@@            Coverage Diff             @@
##             main     #707      +/-   ##
==========================================
+ Coverage   67.53%   68.35%   +0.81%     
==========================================
  Files         281      286       +5     
  Lines       44296    44762     +466     
==========================================
+ Hits        29916    30596     +680     
+ Misses      14380    14166     -214     
Impacted Files Coverage Δ
analytic_engine/src/instance/close.rs 0.00% <ø> (ø)
analytic_engine/src/instance/open.rs 80.42% <ø> (+0.18%) ⬆️
analytic_engine/src/manifest/mod.rs 0.00% <ø> (ø)
analytic_engine/src/table/mod.rs 84.12% <ø> (+3.91%) ⬆️
server/src/grpc/meta_event_service/mod.rs 0.00% <0.00%> (ø)
...ver/src/grpc/meta_event_service/shard_operation.rs 0.00% <0.00%> (ø)
server/src/grpc/mod.rs 0.00% <0.00%> (ø)
server/src/grpc/storage_service/prom_query.rs 54.28% <0.00%> (-0.29%) ⬇️
server/src/grpc/storage_service/write.rs 38.99% <0.00%> (ø)
server/src/server.rs 0.00% <0.00%> (ø)
... and 43 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@chunshao90 chunshao90 left a comment

Choose a reason for hiding this comment

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

LGTM

@chunshao90 chunshao90 added this pull request to the merge queue Mar 8, 2023
Merged via the queue into apache:main with commit 11f10c2 Mar 8, 2023
@jiacai2050 jiacai2050 deleted the chore-write-log branch March 8, 2023 08:45
chunshao90 pushed a commit to chunshao90/ceresdb that referenced this pull request May 15, 2023
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.

None yet

3 participants