dnsdist: Add feature to create Telemetry Spans from LuaAction#16961
dnsdist: Add feature to create Telemetry Spans from LuaAction#16961pieterlexis wants to merge 5 commits intoPowerDNS:masterfrom
Conversation
e2c1e34 to
b7c9c2e
Compare
|
@rgacogne I was thinking that this could be made easier. I could add the
Rule code would look like this: function (dq)
dq:setSpanAttribute("attr-in-the-rulespan", "my-value")
dq:withTraceSpan(
"my-span",
function ()
-- Do work
dq:setSpanAttribute("attr-in-my-subspan", "other-value")
end
)
Return DNSAction.None
end |
|
That looks nice indeed, where would the closer live and how does |
|
I would love to see this a bit simpler indeed. |
The closer would live outside of Lua and |
|
I've updated the PR with new, simpler method that no longer requires a closer. |
rgacogne
left a comment
There was a problem hiding this comment.
I love the simplicity of this version, great work!
4b2c5a1 to
a458381
Compare
a458381 to
e82d14e
Compare
Pull Request Test Coverage Report for Build 23153198208Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
e82d14e to
7646ccb
Compare
Short description
This PR adds a
withTraceSpanmethod toDNSQuestionandDNSResponsethat takes the name of the Span and the function that will be instrumented.It also adds a
setSpanAttributemethod that allows for adding attributes to the Span.We can bikeshed on the naming and implementation.
I've added Otto as a reviewer, as he mentioned wanting to have similar functionality in the Recursor.
This PR also fixes a small over-sight when creating a minimal Protobuf message where we did not add the TraceID to the message.
Checklist
I have: