-
Notifications
You must be signed in to change notification settings - Fork 555
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
Add the Stripe object name to instrumentation event payloads #1168
Conversation
Having the object name in event payloads can be really helpful when sending Stripe-related information to an APM tool (rather than, say, the request path).
6fdba04
to
047ac78
Compare
@richardm-stripe sorry to ping you directly here, but you seem to be the most recently active contributor! When you or someone else from Stripe has some time, it'd be great to get some feedback on if this change is acceptable. |
Sorry for the delayed response. We have the entire request/response body available on the end event is it possible for you to extract the object type from there? |
No worries, @pakrym-stripe! It is possible, but relying on parsing the JSON request to retrieve the type struck me as too... implicit. When building the APM integration, having the explicit name of the object required much less downstream functionality to correctly parse out the object name. |
@agrobbin the reason I'm asking is we are planning some changes that will make OBJECT_NAME impossible to know before making the request. This would mean that OBJECT_NAME won't be available both on the request and the response event. In addition the current definition for OBJECT_NAME is a bit vague. Do you want to know which class made the request or which object type was returned? It's completely possible for a method one resource type to return a different resource type. |
Ah that's good to know! It might make sense for the class name to be the "thing" here, then. The idea would be that there is a key in the instrumentation event payload that represents the concept you're interacting with in Stripe. If that's |
I wonder if this is something that |
@pakrym-stripe I opened #1178, which hopefully includes enough context for the feature request! |
@agrobbin I'll close this PR for housekeeping purposes until we have an overall design for distributed tracing ready. |
This is my first contribution to the stripe-ruby gem, so please let me know if there's anything I've missed, or if I've not followed a particular contribution guideline!
I was looking at adding Stripe instrumentation to our APM (in this case, DataDog), and something that would be really helpful is having access to the object name (i.e.
customer
) in the instrumentation payload.