-
Notifications
You must be signed in to change notification settings - Fork 11
Added RudderStack Telemetry Provider #1491
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
aaron-steinfeld
merged 17 commits into
hypertrace:main
from
razorpay:feature/telemetry-rudderstack
Apr 6, 2022
Merged
Changes from 13 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
0cbbcfc
feat(telemetry): added rudderstack telemetry js library
jaywalker21 ba53c48
feat: added rudderstack provider
jaywalker21 bb2e8d6
chore: added field to telemetry provider config
jaywalker21 fab872c
chore: remove unused imports
jaywalker21 48e7852
feat(telemetry): added rudderstack telemetry js library
jaywalker21 6496cb5
feat: added rudderstack provider
jaywalker21 6303d19
chore: added field to telemetry provider config
jaywalker21 fdd5afd
chore: remove unused imports
jaywalker21 bce80df
Merge branch 'feature/telemetry-rudderstack' of github.com:razorpay/h…
jaywalker21 22937fc
Merge branch 'main' into feature/telemetry-rudderstack
jaywalker21 bff35d8
Merge branch 'feature/telemetry-rudderstack' of github.com:razorpay/h…
jaywalker21 b3adaf7
chore: updated rudderstack provider to have only named imports
jaywalker21 0773613
fix: removed additional field from telemetry config interface
jaywalker21 f334dd3
Merge branch 'main' into feature/telemetry-rudderstack
jaywalker21 eeb20fd
Merge branch 'main' into feature/telemetry-rudderstack
jaywalker21 6c9966b
chore: remove import from config module as it's already present in ro…
jaywalker21 5800537
Merge branch 'main' into feature/telemetry-rudderstack
jaywalker21 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
32 changes: 32 additions & 0 deletions
32
projects/common/src/telemetry/providers/rudderstack/rudderstack-provider.ts
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import { Injectable } from '@angular/core'; | ||
| import { Dictionary } from '../../../utilities/types/types'; | ||
|
|
||
| import { apiObject, identify, load, page, track } from 'rudder-sdk-js'; | ||
| import { TelemetryProviderConfig, UserTelemetryProvider, UserTraits } from '../../telemetry'; | ||
|
|
||
| export interface RudderStackConfig extends TelemetryProviderConfig { | ||
| writeKey: string; | ||
| } | ||
|
|
||
| @Injectable({ providedIn: 'root' }) | ||
| export class RudderStackTelemetry implements UserTelemetryProvider<RudderStackConfig> { | ||
| public initialize(config: RudderStackConfig): void { | ||
| load(config.writeKey, config.orgId, { configUrl: config.orgId }); | ||
| } | ||
|
|
||
| public identify(userTraits: UserTraits): void { | ||
| identify(undefined, userTraits as apiObject); | ||
| } | ||
|
|
||
| public trackEvent(name: string, eventData: Dictionary<unknown>): void { | ||
| track(name, eventData as apiObject); | ||
| } | ||
|
|
||
| public trackPage(name: string, eventData: Dictionary<unknown>): void { | ||
| page(name, name, eventData as apiObject); | ||
| } | ||
|
|
||
| public trackError(name: string, eventData: Dictionary<unknown>): void { | ||
| this.trackEvent(name, eventData); | ||
| } | ||
| } | ||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.