Skip to content

[cli] Make all metrics tracking methods on the store require arguments#12422

Merged
kodiakhq[bot] merged 8 commits intomainfrom
trek/zero-2810-make-all-metrics-tracking-methods-on-the-store-require
Oct 29, 2024
Merged

[cli] Make all metrics tracking methods on the store require arguments#12422
kodiakhq[bot] merged 8 commits intomainfrom
trek/zero-2810-make-all-metrics-tracking-methods-on-the-store-require

Conversation

@trek
Copy link
Copy Markdown
Contributor

@trek trek commented Oct 29, 2024

For a given telemetry method, like:

trackCliArgumentDomain(domain?: string) {
  if (domain) {
    this.trackCliArgument({
      arg: 'domain',
      value: this.redactedValue,
    });
  }
}

The argument type domain?: string means that it can be invoked without an argument at all:

eventStore.trackCliArgumentDomain();

We never want this to happen, though. The value should always be passed to determine if we're tracking that argument/flag/option.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Oct 29, 2024

🦋 Changeset detected

Latest commit: 88936fc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
vercel Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

trek added 2 commits October 29, 2024 13:58
…-store-require' of github.com:vercel/vercel into trek/zero-2810-make-all-metrics-tracking-methods-on-the-store-require
TooTallNate
TooTallNate previously approved these changes Oct 29, 2024
trackCliFlagHelp(help: boolean | undefined) {
if (help) {
this.trackCliFlagHelp();
this.trackCliFlag('help');
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This audit did actually catch one bug!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

question (non-blocking): ‏Can we have a test that asserts this? Or is it too hard to do with vc dev for now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think this was actually me overachieving sine we planned to do --help as its own work. But, yeah, this is annoying to test. I could just remove it?

erikareads
erikareads previously approved these changes Oct 29, 2024
trackCliFlagHelp(help: boolean | undefined) {
if (help) {
this.trackCliFlagHelp();
this.trackCliFlag('help');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

question (non-blocking): ‏Can we have a test that asserts this? Or is it too hard to do with vc dev for now?

@kodiakhq
Copy link
Copy Markdown
Contributor

kodiakhq bot commented Oct 29, 2024

This PR currently has a merge conflict. Please resolve this and then re-add the ['pr: automerge'] label.

@kodiakhq kodiakhq bot removed the pr: automerge label Oct 29, 2024
@TooTallNate TooTallNate dismissed stale reviews from erikareads and themself via 88936fc October 29, 2024 22:02
@kodiakhq kodiakhq bot merged commit 54efb38 into main Oct 29, 2024
@kodiakhq kodiakhq bot deleted the trek/zero-2810-make-all-metrics-tracking-methods-on-the-store-require branch October 29, 2024 22:14
onsclom pushed a commit that referenced this pull request Oct 30, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## [email protected]

### Minor Changes

- Strongly type `TelemetryClient` subclasses against command
specification ([#12426](#12426))

- Adds `vercel integration remove` to uninstall Marketplace integrations
from the current team
([#12291](#12291))
Adds `vercel integration-resource disconnect` to disconnect Marketplace
integration resources from projects
Adds `vercel integration-resource remove` to delete Marketplace
integration resources

### Patch Changes

- [cli] Make all metrics tracking methods on the store require arguments
([#12422](#12422))

- Support allowHeader from Next.js for filtering request headers during
revalidation ([#12420](#12420))

- [cli] don't track unreachable condition
([#12419](#12419))

- Updated dependencies
\[[`5a6605bbd99c3b4c3f06fc315dd3978fe7801d00`](5a6605b)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/functions@1.5.0

### Minor Changes

- ipAddress: accept headers as input
([#12429](#12429))

## @vercel/[email protected]

### Patch Changes

- Support allowHeader from Next.js for filtering request headers during
revalidation ([#12420](#12420))

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`5a6605bbd99c3b4c3f06fc315dd3978fe7801d00`](5a6605b)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`5a6605bbd99c3b4c3f06fc315dd3978fe7801d00`](5a6605b)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Support allowHeader from Next.js for filtering request headers during
revalidation ([#12420](#12420))

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`5a6605bbd99c3b4c3f06fc315dd3978fe7801d00`](5a6605b)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/[email protected]

## @vercel-internals/[email protected]

### Patch Changes

- Updated dependencies
\[[`5a6605bbd99c3b4c3f06fc315dd3978fe7801d00`](5a6605b)]:
    -   @vercel/[email protected]

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
QuietCraftsmanship pushed a commit to QuietCraftsmanship/Vercel that referenced this pull request Jul 6, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## [email protected]

### Minor Changes

- Strongly type `TelemetryClient` subclasses against command
specification ([#12426](vercel/vercel#12426))

- Adds `vercel integration remove` to uninstall Marketplace integrations
from the current team
([#12291](vercel/vercel#12291))
Adds `vercel integration-resource disconnect` to disconnect Marketplace
integration resources from projects
Adds `vercel integration-resource remove` to delete Marketplace
integration resources

### Patch Changes

- [cli] Make all metrics tracking methods on the store require arguments
([#12422](vercel/vercel#12422))

- Support allowHeader from Next.js for filtering request headers during
revalidation ([#12420](vercel/vercel#12420))

- [cli] don't track unreachable condition
([#12419](vercel/vercel#12419))

- Updated dependencies
\[[`ea72a9f85d9fba806e382ef1a7e52b73f78132d9`](vercel/vercel@ea72a9f)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Minor Changes

- ipAddress: accept headers as input
([#12429](vercel/vercel#12429))

## @vercel/[email protected]

### Patch Changes

- Support allowHeader from Next.js for filtering request headers during
revalidation ([#12420](vercel/vercel#12420))

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`ea72a9f85d9fba806e382ef1a7e52b73f78132d9`](vercel/vercel@ea72a9f)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`ea72a9f85d9fba806e382ef1a7e52b73f78132d9`](vercel/vercel@ea72a9f)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Support allowHeader from Next.js for filtering request headers during
revalidation ([#12420](vercel/vercel#12420))

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`ea72a9f85d9fba806e382ef1a7e52b73f78132d9`](vercel/vercel@ea72a9f)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

-   Updated dependencies \[]:
    -   @vercel/[email protected]

## @vercel-internals/[email protected]

### Patch Changes

- Updated dependencies
\[[`ea72a9f85d9fba806e382ef1a7e52b73f78132d9`](vercel/vercel@ea72a9f)]:
    -   @vercel/[email protected]

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

4 participants