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

Datanode migration telemetry #20225

Merged
merged 17 commits into from
Sep 6, 2024
Merged

Datanode migration telemetry #20225

merged 17 commits into from
Sep 6, 2024

Conversation

gally47
Copy link
Contributor

@gally47 gally47 commented Aug 20, 2024

Motivation and Context

fixes #20086

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@gally47 gally47 self-assigned this Aug 20, 2024
Copy link
Contributor

@grotlue grotlue left a comment

Choose a reason for hiding this comment

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

Looks good in general, some small suggestions.
I haven't tested it yet, but as it is telemetry it should be good.

const sendTelemetry = useSendTelemetry();

const handleTabSwitch = (e) => {
sendTelemetry((e?.target?.innerText === 'Upload CA')
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice to move Upload CA into a constant and reuse it at line 63 to avoid bugs.

sendTelemetry(TELEMETRY_EVENT_TYPE.DATANODE_MIGRATION.MIGRATION_TYPE_SELECTED, {
app_pathname: 'datanode',
app_section: 'migration',
event_details: { migration_type: (step === 'SELECT_ROLLING_UPGRADE_MIGRATION') ? 'IN-PLACE' : 'REMOTE REINDEX' },
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, constant for the step would be nice.

import { TELEMETRY_EVENT_TYPE } from 'logic/telemetry/Constants';
import type { TelemetryEventType } from 'logic/telemetry/TelemetryContext';

import useMigrationState from '../../hooks/useMigrationState';
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
import useMigrationState from '../../hooks/useMigrationState';
import useMigrationState from 'components/datanode/hooks/useMigrationState';

@gally47 gally47 requested a review from grotlue September 6, 2024 09:56
Copy link
Contributor

@grotlue grotlue left a comment

Choose a reason for hiding this comment

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

Thank you for the changes, looks good!

Copy link
Contributor

@ousmaneo ousmaneo left a comment

Choose a reason for hiding this comment

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

Tested and looks good!

@gally47 gally47 merged commit d6ffc36 into master Sep 6, 2024
7 checks passed
@gally47 gally47 deleted the datanode-migration-telemetry branch September 6, 2024 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataNode Posthog Events
3 participants