Skip to content
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

Creating Custom Probe for jsonapi-rb #113

Open
thegranddesign opened this issue Jan 24, 2018 · 7 comments
Open

Creating Custom Probe for jsonapi-rb #113

thegranddesign opened this issue Jan 24, 2018 · 7 comments

Comments

@thegranddesign
Copy link

I noticed in your AMS Probe all you're really doing is making sure that instrumentation happens.

Because AMS's development has basically been stagnant for years, I've switched to jsonapi-rb which is a much better designed library and is split up into micro-libraries that each do only one thing well.

I would like to create a probe for jsonapi-rails (just wrapper for jsonapi-rb). jsonapi-rails already adds instrumentation for both its serialization and deserialization, so what would be the most expedient way for me to create a probe for these two instrumentation items?

@wycats
Copy link
Contributor

wycats commented Jan 25, 2018

@wagenet @chancancode should we make (at least some subset of) the probe API public? I think that's the best solution to this problem.

@wagenet
Copy link
Contributor

wagenet commented Jan 29, 2018

Probes only make sense for things actually included in the Skylight gem. That said, we should document the code more clearly to make it easier for people to send PRs.

@wagenet
Copy link
Contributor

wagenet commented Jan 29, 2018

@thegranddesign in the case of jsonapi-rails, it uses AS::N, so you can just make a normalizer instead. No need for a probe. Let me know if you have questions about how to do that.

@thegranddesign
Copy link
Author

@wagenet and then I would need to submit a PR to get that into the gem?

@wagenet
Copy link
Contributor

wagenet commented Jan 29, 2018

@thegranddesign ideally :)

If you didn't want to integrate it, you could always subscribe to the AS::N notifications on your own and then call Skylight.instrument from them.

@rromanchuk
Copy link

also, FYI looks like latest release broke instrumentation over at Netflix/fast_jsonapi#202 (comment)

@hmcfletch
Copy link

@rromanchuk #120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants