Skip to content

Added support for sessions #39

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

Merged
merged 14 commits into from
Jan 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@
"sourceMaps": true,
"outDir": "dist"
},
{
"name": "Express",
"request": "launch",
"type": "node",
"program": "example/express/app.js",
"runtimeArgs": [
"--nolazy"
],
"sourceMaps": true,
"outDir": "dist"
},
{
"name": "Attach",
"request": "attach",
Expand All @@ -24,4 +35,4 @@
"outDir": "dist"
}
]
}
}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Exceptionless.JavaScript
[![Build status](https://img.shields.io/appveyor/ci/Exceptionless/exceptionless-javascript.svg)](https://ci.appveyor.com/project/Exceptionless/exceptionless-javascript) [![Gitter](https://img.shields.io/badge/gitter-join_chat-brightgreen.svg)](https://gitter.im/exceptionless/Discuss)
[![Build status](https://img.shields.io/appveyor/ci/Exceptionless/exceptionless-javascript.svg)](https://ci.appveyor.com/project/Exceptionless/exceptionless-javascript) [![Gitter](https://img.shields.io/badge/gitter-join_chat-brightgreen.svg)](https://gitter.im/exceptionless/Discuss)
[![NPM version](https://img.shields.io/npm/v/exceptionless.svg)](https://www.npmjs.org/package/exceptionless)
[![Bower version](https://img.shields.io/bower/v/exceptionless.svg)](http://bower.io/search/?q=exceptionless)
[![Donate](https://img.shields.io/badge/donorbox-donate-blue.svg)](https://donorbox.org/exceptionless)
[![Donate](https://img.shields.io/badge/donorbox-donate-blue.svg)](https://donorbox.org/exceptionless)

The definition of the word exceptionless is: to be without exception. Exceptionless.js provides real-time error reporting for your JavaScript applications in the browser or in Node.js. It organizes the gathered information into simple actionable data that will help your app become exceptionless!

## Show me the code! ##

```html
<script src="https://cdn.rawgit.com/exceptionless/Exceptionless.JavaScript/v1.2.0/dist/exceptionless.min.js"></script>
<script src="https://cdn.rawgit.com/exceptionless/Exceptionless.JavaScript/v1.3.0/dist/exceptionless.min.js"></script>
<script>
var client = exceptionless.ExceptionlessClient.default;
client.config.apiKey = 'API_KEY_HERE';
Expand Down Expand Up @@ -48,7 +48,7 @@ Use one of the following methods to install Exceptionless.js into your browser a
Add the following script to your page:

```html
<script src="https://cdn.rawgit.com/exceptionless/Exceptionless.JavaScript/v1.2.0/dist/exceptionless.min.js"></script>
<script src="https://cdn.rawgit.com/exceptionless/Exceptionless.JavaScript/v1.3.0/dist/exceptionless.min.js"></script>
```

- **Bower:**
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.2.{build}
version: 1.3.{build}

install:
- ps: Install-Product node 4
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "exceptionless",
"version": "1.2.0",
"version": "1.3.0",
"description": "JavaScript client for Exceptionless",
"license": "Apache-2.0",
"main": "dist/exceptionless.js",
Expand Down
22 changes: 16 additions & 6 deletions dist/exceptionless.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export interface IEvent {
value?: number;
data?: any;
reference_id?: string;
session_id?: string;
}
export interface ILastReferenceIdManager {
getLast(): string;
Expand Down Expand Up @@ -54,6 +53,7 @@ export interface ISubmissionClient {
export interface IConfigurationSettings {
apiKey?: string;
serverUrl?: string;
enableSessions?: boolean;
environmentInfoCollector?: IEnvironmentInfoCollector;
errorParser?: IErrorParser;
lastReferenceIdManager?: ILastReferenceIdManager;
Expand Down Expand Up @@ -115,6 +115,13 @@ export declare class EventPluginManager {
static run(context: EventPluginContext, callback: (context?: EventPluginContext) => void): void;
static addDefaultPlugins(config: Configuration): void;
}
export declare class HeartbeatPlugin implements IEventPlugin {
priority: number;
name: string;
private _heartbeatIntervalId;
private _lastUser;
run(context: EventPluginContext, next?: () => void): void;
}
export declare class ReferenceIdPlugin implements IEventPlugin {
priority: number;
name: string;
Expand Down Expand Up @@ -204,6 +211,7 @@ export declare class Configuration implements IConfigurationSettings {
setUserIdentity(identity: string): void;
setUserIdentity(identity: string, name: string): void;
userAgent: string;
useSessions(sendHeartbeats?: boolean): void;
useReferenceIds(): void;
useDebugLogger(): void;
static defaults: IConfigurationSettings;
Expand All @@ -216,8 +224,8 @@ export declare class EventBuilder {
constructor(event: IEvent, client: ExceptionlessClient, pluginContextData?: ContextData);
setType(type: string): EventBuilder;
setSource(source: string): EventBuilder;
setSessionId(sessionId: string): EventBuilder;
setReferenceId(referenceId: string): EventBuilder;
setEventReference(name: string, id: string): EventBuilder;
setMessage(message: string): EventBuilder;
setGeo(latitude: number, longitude: number): EventBuilder;
setUserIdentity(userInfo: IUserInfo): EventBuilder;
Expand Down Expand Up @@ -277,10 +285,12 @@ export declare class ExceptionlessClient {
submitLog(source: string, message: string, level: string, callback?: (context: EventPluginContext) => void): void;
createNotFound(resource: string): EventBuilder;
submitNotFound(resource: string, callback?: (context: EventPluginContext) => void): void;
createSessionStart(sessionId: string): EventBuilder;
submitSessionStart(sessionId: string, callback?: (context: EventPluginContext) => void): void;
createSessionEnd(sessionId: string): EventBuilder;
submitSessionEnd(sessionId: string, callback?: (context: EventPluginContext) => void): void;
createSessionStart(): EventBuilder;
submitSessionStart(callback?: (context: EventPluginContext) => void): void;
createSessionEnd(): EventBuilder;
submitSessionEnd(callback?: (context: EventPluginContext) => void): void;
createSessionHeartbeat(): EventBuilder;
submitSessionHeartbeat(callback?: (context: EventPluginContext) => void): void;
createEvent(pluginContextData?: ContextData): EventBuilder;
submitEvent(event: IEvent, pluginContextData?: ContextData, callback?: (context: EventPluginContext) => void): void;
updateUserEmailAndDescription(referenceId: string, email: string, description: string, callback?: (response: SubmissionResponse) => void): void;
Expand Down
88 changes: 72 additions & 16 deletions dist/exceptionless.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/exceptionless.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/exceptionless.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/exceptionless.min.js.map

Large diffs are not rendered by default.

Loading