Replies: 1 comment 4 replies
-
What happens is:
I don't see much sense in doing 3) in go-pg because
It is now always possible (some queries already come pre-formatted) and even with simple
You can copy-paste the instrumentation code and edit as you wish. E.g. always using UnformattingQuery seems to achieve what you want (strip all args). But you will lose to ability to see the "real" query with all args and run it. Which is more important to me.
WIll fix - thanks. |
Beta Was this translation helpful? Give feedback.
-
Hey! We are evaluating OpenTelemetry right now. Feels a bit wacky, with many moving pieces, but now it feels maturish at least.
We are interested in running all the deps with OpenTelemetry so it was really nice to discover go-pg to have such a module ready-to-use.
We are on the early stages, we kind of assume there will be some issues. The first one we have discovered is all queries are limited by 5k characters:
pg/extra/pgotel/pgotel.go
Line 77 in b3797bd
Although it is not a dealbreaker, it would be nice for us to understand the origin of such a limitation. The major issue with such truncation is the inability to observe the actual arguments passed. Is it the protocol, common sense, or anything else?
Since it is the real issue, we see multiple solutions:
len(query) > 5000
, strip down all the columns in SELECT statement, all the data in SET (UPDATE/INSERT) statement. Simply put, if we need to lose any data, let's lose only the less significant information first. We've been using such an approach with other tracing software.I feel like we will go with the first option internally, but I personally interested in resolving this issue globally.
Any thoughts?
Also, for some reason "start discussion" on the issues open page leads to the redis discussions page. Dunno what is wrong
Beta Was this translation helpful? Give feedback.
All reactions