Remove trace context from events
See original GitHub issueWe just updated to v1.3.3. Everything went smoothly, except some of our event handlers started failing because the new trace_context values don’t stringify correctly in NodeJS
We set the HASURA_GRAPHQL_STRINGIFY_NUMERIC_TYPES for a similar reason in order to deal with BigInt values correctly
Is there any way the trace context in event payloads could respect this setting? What are some of our other options?
Right now we’ve added something like this to our event handlers, but its a bit of a hack:
if (event?.trace_context) {
Object.keys(event.trace_context).forEach((key) => {
if (typeof event.trace_context[key].toString === 'function') {
event.trace_context[key] = event.trace_context[key].toString()
}
})
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Trace Context - W3C
Trace context propagation passes along this unique identification. ... Entries larger than 128 characters long SHOULD be removed first.
Read more >Announcing New Relic Support for W3C Trace Context
The W3C Trace Context specification has reached “recommendation” status, and New Relic is supporting the standard immediately.
Read more >Disable trace event - Oracle Communities
Hi, I have enable a trace and now i want to disable this event trace. How can i do this?? The command that...
Read more >Oracle event trace types - Burleson Consulting
This affects how Oracle will process sorts: ALTER SESSION SET EVENTS '10119 trace name context forever';. * You can disable the Index FFS...
Read more >Tampering with Windows Event Tracing: Background, Offense ...
Description: This technique involves the removal of a provider entry from a configured autologger. Removing a provider registration from an autologger will ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Not a dumb question at all @tirumaraiselvan! We have an ingest endpoint set up that that puts events onto an AWS EventBridge bus, which other services (mostly lambdas) subscribe to.
This has been working really well for us, and I opened this issue after upgrading to v1.3.3 because the event payload we were receiving stopped being JSON.stringify-able, and our ingest started failing.
We don’t explicitly need the trace context, but its addition broke our ingest endpoint until we added the patch in the 1st comment. That said, it would be very cool one day to be able to use this trace context to correlate hasura action -> event -> ingest -> subscriber(s)
FYI: the field “trace_context” is not documented in https://hasura.io/docs/latest/event-triggers/payload/. Should it be?