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

refactor(interactive): Add more detail tracer for query handler #3782

Merged
merged 6 commits into from May 13, 2024

Conversation

zhanglei1949
Copy link
Collaborator

@zhanglei1949 zhanglei1949 commented May 10, 2024

Add subspans for adhoc_query tracer, and add tracer for stored_procedure_query.

Add metrics for adhoc and procedure queries

  • Total query count
  • Successful query count
  • Query latency histogram.

@zhanglei1949 zhanglei1949 changed the title refactor(interactive): Add more detail tracer refactor(interactive): Add more detail tracer for query handler May 11, 2024
opentelemetry::nostd::unique_ptr<opentelemetry::metrics::Counter<uint64_t>>
total_counter_;
opentelemetry::nostd::unique_ptr<opentelemetry::metrics::Counter<uint64_t>>
success_counter_;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use a total_counter and append label to denote success. This would reduce the amount of data to export.

success_counter_->Add(1);
outer_span->End();
auto end_ts = gs::GetCurrentTimeStamp();
std::map<std::string, std::string> labels = {{"key", "value"}};
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's this dummy labels for?

@zhanglei1949 zhanglei1949 merged commit 65eb976 into alibaba:main May 13, 2024
35 of 36 checks passed
@zhanglei1949 zhanglei1949 deleted the tracer branch May 13, 2024 07:18
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