Comments (7)
I've contributed some, so I do believe they are accepting
That sounds like it could be a great idea too 🙂
from aws-rum-web.
i have an open PR for uodatijg tyoes of monkey patch, and another for plugins (so that new things can be added by others in a much easier way)
from aws-rum-web.
Hi @gillisandrew thanks for the detailed issue! Yes, we are open to contributions.
1. Allow an option to disable monkey-patching of fetch and instead expose the instrumented client on the AwsRum instance.
2. Allow a fetch API compatible function to be passed as the default http client in the CWR configuration object. Currently this could technically be achieved by monkey-patching fetch before initializing CWR web client, but that is far from ideal.
It is possible to disable the FetchPlugin
and XhrPlugin
by excluding http
from the telemetries
config. For example:
const config: AwsRumConfig = {
...
telemetries: ['errors', 'performance']
};
It is also possible to add a custom plugin using the config. For example:
import { AwsRum, AwsRumConfig, FetchPlugin } from 'aws-rum-web';
const config = {
logicalServiceName: 'sample.rum.aws.amazon.com',
urlsToInclude: [/response\.json/],
recordAllRequests: true,
addXRayTraceIdHeader: true
};
const config: AwsRumConfig = {
...
eventPluginsToLoad: [new FetchPlugin(config)],
telemetries: ['errors', 'performance']
};
Would this solve the use case?
Notes:
- Events generated by the plugin must conform to the HTTP event schema or the X-Ray trace event schema. You can generate type definitions for these schemas by running
npm run build:schemas
. - The class
VirtualPageLoadTimer
also monkey patchesfetch
andXMLHttpRequest
to time route changes. I don't think this impacts you, but just in case.
3. Allow instrumentation of a fetch client in the local scope. This should allow application developers to instrument each service for their own requirements.
Could a custom plugin support this use case as well?
4. Provide a mechanism for extending the annotations and metadata in an X-Ray segment.
Yes! This is in our backlog. Specifically, @limhjgrace is looking into it if you'd like to co-ordinate.
from aws-rum-web.
@qhanam Thanks for the response! An xray plugin would actually really help address some of the immediate challenges. If it isn't something that is being released in the next couple of weeks I'll likely work on it as an external package just to unblock the current project.
I'd be sure to reference the issue and open a pull request once there is a working solution.
It is possible to disable the FetchPlugin and XhrPlugin by excluding http from the telemetries config
Yeah, I'm aware but we do hope to use the data collected by the FetchPlugin, we just need some flexibility in how things are handled on the client.
from aws-rum-web.
Gotcha. Sounds awesome, thanks @gillisandrew !
from aws-rum-web.
Hey @gillisandrew! The custom X-Ray annotations feature is definitely in our backlog and I'll most likely be able to get to it mid-June. However, this doesn't include extending the metadata. Could I know more about your use case? Do you have an idea of what the additional data would look like?
from aws-rum-web.
@limhjgrace Hey thanks for working on this. I just lumped annotations together with metadata because they both add data to the traces. Annotations would be sufficient to address the current issue we're having.
from aws-rum-web.
Related Issues (20)
- sessionSampleRate and error reporting HOT 8
- [Bug]: HOT 4
- [General Inquiry]: XMLHttpRequest error HOT 3
- [General Inquiry]: Should errors be limited by 'sessionEventLimit'? HOT 5
- [Bug]: docs example incorrect name for angular errohandler import HOT 1
- [General Inquiry]: is unauthenticated user pool secure ? HOT 1
- [Bug]: Cannot override title attribute in metadata HOT 3
- [Bug]: CWR: Failed to retrieve credentials from STS: TypeError: Cannot read properties of undefined (reading 'split') HOT 1
- [Feature Request]: create a separate AwsRum orchestrator to use with proxy HOT 1
- [Bug]: RUM stopped sending metrics after some user idle time HOT 2
- fix: optionally write HttpEvent.statusText
- [Feature Request]: optionally persist custom attributes
- [Feature Request]: collect metadata for connection type
- [Feature Request]: offline support HOT 5
- [General Inquiry]: Cloudwatch CDN NextJS HOT 1
- [General Inquiry]: missing stacktrace when recording js errors with RUM HOT 2
- [Feature Request]: Support for native mobile apps HOT 2
- [Feature Request]: error-free session_count V.S. No. of sessions experienced error
- [Feature Request]: Easier error ignore function HOT 1
- [Bug]: Use of moved dependancies HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-rum-web.