newrelic / newrelic-capacitor-plugin

Mobile instrumentation plugin for the Capacitor hybrid mobile platform by Ionic
Apache License 2.0
7 stars 10 forks source link

`networkRequestEnabled` doesn't work #66

Closed kristojorg closed 6 months ago

kristojorg commented 8 months ago

Description

The New Relic Capacitor plugin does not record network requests made from within the webview layer, despite indicating it can automatically capture them in the docs.

Steps to Reproduce

  1. Install NewRelicCapacitorPlugin
  2. Call NewRelicCapacitorPlugin.start({appKey:appToken, agentConfiguration:agentConfig}) with networkRequestEnabled: true in your agentConfig
  3. Make fetch requests in your capacitor webview
  4. The fetch request will not appear in NewRelic

Expected Behavior

The fetch request will be captured and tracked to New Relic automatically.

Your Environment

Tested in browser environment, as well as iOS and Android.

ndesai-newrelic commented 8 months ago

@kristojorg we are not supporting fetch instrumentation yet, we will add it in future release.

kristojorg commented 8 months ago

@ndesai-newrelic I see. It would be great to remove options that don't work from the github docs, website and even typscript defs if possible. It's a little frustrating to spend hours trying to get something working that the docs say will work only to open an issue to find out it isn't implemented...

Thank you!

ndesai-newrelic commented 8 months ago

@kristojorg our team is working on incorporating additional features based on user feedback. Although the number of HttpClient options for Capacitor is unknown, we are planning to introduce instrumentation for fetch and xhr requests. Presently, our support extends to the Capacitor HTTP client and XMLHttpRequest.

kristojorg commented 7 months ago

Yes I totally understand that it may take time. Just would be nice to have the API and docs reflect what's actually working

kristojorg commented 7 months ago

Would y'all accept a PR to remove these nonfunctional values from the type definitions?

ndesai-newrelic commented 7 months ago

we accept PR for this repo

kristojorg commented 6 months ago

Woohoo! Glad this is being implemented : )