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

Add more information logs for UI logs table #2220

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

Amogh-Bharadwaj
Copy link
Contributor

@Amogh-Bharadwaj Amogh-Bharadwaj commented Nov 5, 2024

Currently the only information logs we store in catalog is "pushed x records"
It is important for us to show users more than just that

Note that this PR pertains to the logs table in UI. It has nothing to do with alerting

This PR logs info about some key moments during replication:

  • Setting up of target tables

  • Setup of replication slot and publication

  • Replication of all partitions in QRep/Initial load

  • Schema changes

  • Resync completion

  • Source cleanup of drop flow

  • Destination cleanup of drop flow

  • Removal of tables from publication

  • Addition of tables from publication

  • Functional test

@@ -247,6 +248,7 @@ func (a *FlowableActivity) CreateNormalizedTable(
})
defer shutdown()

a.Alerter.LogFlowInfo(ctx, config.FlowName, "Setting up destination tables")
Copy link
Member

Choose a reason for hiding this comment

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

why do we have this twice?

Copy link
Contributor

Choose a reason for hiding this comment

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

think it's meant to say conn.StartupSetupNormalizedTables has created tables, beginning ingestion. Wording needs to be updated

Copy link
Member

@iamKunalGupta iamKunalGupta left a comment

Choose a reason for hiding this comment

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

overall, I think per table alerts should be removed and converted to logs as they can be noisy

@@ -265,15 +267,19 @@ func (a *FlowableActivity) CreateNormalizedTable(
numTablesSetup.Add(1)
if !existing {
logger.Info("created table " + tableIdentifier)
a.Alerter.LogFlowInfo(ctx, config.FlowName, "created table "+tableIdentifier+" in destination")
Copy link
Member

Choose a reason for hiding this comment

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

Might be too noisy for a large number of tables

@@ -509,6 +515,8 @@ func (a *FlowableActivity) GetQRepPartitions(ctx context.Context,
}
}

a.Alerter.LogFlowInfo(ctx, config.FlowJobName, fmt.Sprintf("obtained partitions for table %s", config.WatermarkTable))
Copy link
Member

Choose a reason for hiding this comment

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

Maybe just log instead of sending an alert? (too noisy)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are not alerts. This is for our logs table in UI
I think LogFlowEvent is for alerts ?

Copy link
Member

Choose a reason for hiding this comment

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

My bad, but still do we want to do it for all tables?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah because we have scarcity of user facing info during initial load - common feedback from customers cc @iskakaushik

@@ -58,7 +58,7 @@ func (a *SnapshotActivity) SetupReplication(
) (*protos.SetupReplicationOutput, error) {
ctx = context.WithValue(ctx, shared.FlowNameKey, config.FlowJobName)
logger := activity.GetLogger(ctx)

a.Alerter.LogFlowInfo(ctx, config.FlowJobName, "Setting up replication slot and publication")
a.Alerter.LogFlowEvent(ctx, config.FlowJobName, "Started Snapshot Flow Job")
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
a.Alerter.LogFlowEvent(ctx, config.FlowJobName, "Started Snapshot Flow Job")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is for alerting, we need this

@Amogh-Bharadwaj Amogh-Bharadwaj changed the title Add more information logs Add more information logs for UI logs table Dec 4, 2024
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