The RUM Browser SDK captures RUM logs and events and populates their main attributes. Label Provider gives you access to every event or URL collected by the RUM SDK, allowing you to add labels using custom-defined functions and then easily filter and aggregate your data once ingested by Coralogix.
Take advantage of Label Provider to:
For instance, attach a team-APM
label to each event on your APM page. This allows your team to track and examine only the events relevant to them.
import { CoralogixRum } from '@coralogix/browser'; const featurePageUrlLabelProvider = new UrlBasedLabelProvider({ urlType: UrlType.PAGE, urlPatterns: [ { regexps: [/apm/], labels: { featureGroupId: 'apm' }, }, ], defaultLabels: { featureGroupId: 'unknown-feature-group', }, }); const regularExpErrorLabelProvider: GenericLabelProvider = { providerFunc: (url, event) => { if (event.error_context?.error_message?.includes('Invalid regular expression')) { return { regular_expression_error: 'true', }; } return {}; }, }; CoralogixRum.init({ // ... labelProviders: [ featurePageUrlLabelProvider, regularExpErrorLabelProvider ] });
Once you’ve configured your labels, use them to filter your data and enjoy feature mapping in any of our RUM products.
Need help?
Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.
Feel free to reach out to us via our in-app chat or by emailing [email protected].