Skip to content

Commit ed51418

Browse files
committed
Added setUserDescription and setManualStackingKey to the EventBuilder api
1 parent d678bc2 commit ed51418

8 files changed

+60
-5
lines changed

dist/exceptionless.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ export declare class EventBuilder {
233233
setUserIdentity(userInfo: IUserInfo): EventBuilder;
234234
setUserIdentity(identity: string): EventBuilder;
235235
setUserIdentity(identity: string, name: string): EventBuilder;
236+
setUserDescription(emailAddress: string, description: string): EventBuilder;
237+
setManualStackingKey(manualStackingKey: string): EventBuilder;
236238
setValue(value: number): EventBuilder;
237239
addTags(...tags: string[]): EventBuilder;
238240
setProperty(name: string, value: any, maxDepth?: number, excludedPropertyNames?: string[]): EventBuilder;

dist/exceptionless.js

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.node.js

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.node.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/EventBuilder.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export class EventBuilder {
4747
* Allows you to reference a parent event by its ReferenceId property. This allows you to have parent and child relationships.
4848
* @param name Reference name
4949
* @param id The reference id that points to a specific event
50+
* @returns {EventBuilder}
5051
*/
5152
public setEventReference(name: string, id: string): EventBuilder {
5253
if (!name) {
@@ -95,6 +96,34 @@ export class EventBuilder {
9596
return this;
9697
}
9798

99+
/**
100+
* Sets the user's description of the event.
101+
*
102+
* @param emailAddress The email address
103+
* @param description The user's description of the event.
104+
* @returns {EventBuilder}
105+
*/
106+
public setUserDescription(emailAddress: string, description: string): EventBuilder {
107+
if (emailAddress && description) {
108+
this.setProperty('@user_description', { email_address: emailAddress, description: description });
109+
}
110+
111+
return this;
112+
}
113+
114+
/**
115+
* Changes default stacking behavior by setting the stacking key.
116+
* @param manualStackingKey The manual stacking key.
117+
* @returns {EventBuilder}
118+
*/
119+
public setManualStackingKey(manualStackingKey: string): EventBuilder {
120+
if (manualStackingKey) {
121+
this.setProperty('@manual_stacking_key', manualStackingKey);
122+
}
123+
124+
return this;
125+
}
126+
98127
public setValue(value: number): EventBuilder {
99128
if (!!value) {
100129
this.target.value = value;

0 commit comments

Comments
 (0)