otelsql icon indicating copy to clipboard operation
otelsql copied to clipboard

Support custom metrics and trace labels provided from the context

Open nhatthm opened this issue 1 year ago • 3 comments

Description

Support custom metrics and trace labels provided from the context

nhatthm avatar Mar 27 '24 18:03 nhatthm

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (b373779) to head (32ef0f0).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #291   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        23    +1     
  Lines         1038      1075   +37     
=========================================
+ Hits          1038      1075   +37     
Flag Coverage Δ
unittests-Linux-X64 100.00% <100.00%> (ø)
unittests-Windows-X64 100.00% <100.00%> (ø)
unittests-macOS-X64 100.00% <100.00%> (ø)

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 27 '24 18:03 codecov[bot]

@manishdangi98 could you please confirm if this matches your expectations?

nhatthm avatar Mar 27 '24 18:03 nhatthm

I think we can already add custom labels from context to "trace" by using "TraceQuery" option. https://github.com/nhatthm/otelsql?tab=readme-ov-file#trace-query

My idea was to add an option similar for "metrics" too, and I'm currently using this patch to solve my problem. https://github.com/nhatthm/otelsql/compare/master...rajyan:otelsql:master

I think this PR doesn't solve this issue described in https://github.com/nhatthm/otelsql/issues/222 , because we cannot set labels from the "query".

rajyan avatar May 05 '24 00:05 rajyan