Skip to content
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

Feature: Settings to enable telemetry for extension #55

Merged
merged 20 commits into from
Jan 24, 2024

Conversation

hassan-pullflow
Copy link
Contributor

Summary of Changes

  • added telemetry settings in package.json
  • initialising telemetry in initialize.ts
  • added isTelemetryEnabled flag in CacheObject

Snap-Shots

Screenshot 2024-01-08 at 5 27 11 PM

PR-Specific-Tests

  • Check by default telemetry is sent to grafana > Disable telemetry from vscode settings > Telemetry is not being sent to grafana.

@hassan-pullflow hassan-pullflow force-pushed the feature/disable-telemetry branch from af561f3 to 026b3b1 Compare January 9, 2024 07:47
@srzainab srzainab changed the base branch from feature/quickpick-telemetry to epic/telemetry January 16, 2024 11:10
package.json Outdated Show resolved Hide resolved
type FakeBasicTracerProvider = {}
type FakeAttribute = {}

// Null Object Design pattern
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this comment here?


dispose(): void {}
start({ name, attributes }: { name: string; attributes?: TraceAttributes }) {
console.log({ name, attributes })
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we doing console log here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because i need to use the attributes and name somehow otherwise it gives unused values errors.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can do it like one of these ways:
start({ _name, _attributes }: { name: string; attributes?: TraceAttributes }) { ... }

start({ }: { name: string; attributes?: TraceAttributes }) { ... }

what do you think @srzainab?

Copy link
Collaborator

@amna-pullflow amna-pullflow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a comment regarding the unused values error, looks good otherwise


dispose(): void {}
start({ name, attributes }: { name: string; attributes?: TraceAttributes }) {
console.log({ name, attributes })
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can do it like one of these ways:
start({ _name, _attributes }: { name: string; attributes?: TraceAttributes }) { ... }

start({ }: { name: string; attributes?: TraceAttributes }) { ... }

what do you think @srzainab?

@srzainab
Copy link
Collaborator

@amna-pullflow updated the PR. will merge once the tests pass.

@srzainab srzainab merged commit bc06a40 into epic/telemetry Jan 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants