-
-
Save occasl/921c9f215e79e045c50e62ac0dad2d6d to your computer and use it in GitHub Desktop.
TypeScript declaration file with the NewRelic Browser typings.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Type definitions for NewRelicBrowser v1026 | |
// Project: https://docs.newrelic.com/docs/browser/new-relic-browser/browser-agent-spa-api | |
// Definitions by: Piotr Kubisa <https://gist.github.com/piotrkubisa/4a1cc7355afcec46651a896d59ec8d50> | |
declare var newrelic: NewRelicBrowser; | |
interface NewRelicBrowser { | |
addPageAction(name: string, attributes: any): void; | |
addRelease(release_name: string, release_id: string): void; | |
addToTrace(custom_object: any): void; | |
finished(time_stamp: number): void; | |
noticeError(error: Error): void; | |
setCustomAttribute(name: string, value: string): void; | |
setErrorHandler(error: Error, callback: (err: Error) => void): any; | |
setPageViewName(name: string, host?: string): void; | |
interaction(): NewRelicBrowserIntegration; | |
setCurrentRouteName(name: string): void; | |
} | |
interface NewRelicBrowserIntegration { | |
appId: any; | |
appName: any; | |
ajaxCount: any; | |
asn: any; | |
asnLatitude: any; | |
asnLongitude: any; | |
asnOrganization: any; | |
backendTransactionName: any; | |
browserInteractionName: any; | |
category: any; | |
city: any; | |
countryCode: any; | |
deviceType: any; | |
duration: any; | |
jsDuration: any; | |
previousGroupedUrl: any; | |
previousRouteName: any; | |
previousURL: any; | |
regionCode: any; | |
session: any; | |
targetGroupedUrl: any; | |
targetRouteName: any; | |
targetUrl: any; | |
timeToConnectStart: any; | |
timeToConnectEnd: any; | |
timeToDomComplete: any; | |
timeToDomContentLoadedEventStart: any; | |
timeToDomContentLoadedEventEnd: any; | |
timeToDomInteractive: any; | |
timeToDomLoading: any; | |
timeToDomainLookupStart: any; | |
timeToDomainLookupEnd: any; | |
timeToFetchStart: any; | |
timeToLoadEventStart: any; | |
timeToLoadEventEnd: any; | |
timeToRedirectStart: any; | |
timeToRedirectEnd: any; | |
timeToRequestStart: any; | |
timeToResponseStart: any; | |
timeToResponseEnd: any; | |
timeToSecureConnectionStart: any; | |
timeToUnloadEventStart: any; | |
timeToUnloadEventEnd: any; | |
timestamp: any; | |
trigger: any; | |
userAgentName: any; | |
userAgentVersion: any; | |
userAgentOS: any; | |
createTracer(name: string, callback: () => void): NewRelicBrowserIntegration; | |
end(): NewRelicBrowserIntegration; | |
getContext(callback: (ctx: NewRelicBrowserIntegration) => void): NewRelicBrowserIntegration; | |
ignore(): NewRelicBrowserIntegration; | |
onEnd(callback: (ctx: NewRelicBrowserIntegration) => void): NewRelicBrowserIntegration; | |
save(): NewRelicBrowserIntegration; | |
setAttribute(key: string, value: any): NewRelicBrowserIntegration; | |
setName(name: string, trigger?: string): NewRelicBrowserIntegration; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment