Skip to content

sql: put session events in eventlog#8949

Merged
RaduBerinde merged 1 commit intocockroachdb:developfrom
RaduBerinde:sql-session-events
Aug 31, 2016
Merged

sql: put session events in eventlog#8949
RaduBerinde merged 1 commit intocockroachdb:developfrom
RaduBerinde:sql-session-events

Conversation

@RaduBerinde
Copy link
Copy Markdown
Member

@RaduBerinde RaduBerinde commented Aug 30, 2016

SQL has a per-session "debug/request" trace which can be very long-lived.
Replacing it with an EventLog (which shows up under "debug/events").


This change is Reviewable

@andreimatei
Copy link
Copy Markdown
Contributor

:lgtm:


Review status: 0 of 3 files reviewed at latest revision, 2 unresolved discussions, all commit checks successful.


sql/session.go, line 100 [r1] (raw file):

  // Set up an EventLog for session events.
  ctx = log.WithEventLog(ctx, "sql."+args.User, remoteStr)

nit: "sql.root" didn't look obvious to me that it contained a user name. How about "sql [user]"


sql/session.go, line 181 [r1] (raw file):

  // TODO(andrei): this is the same as Session.Trace. Consider removing this and
  // passing the Session along everywhere the trace is needed.
  tr trace.Trace

good riddance


Comments from Reviewable

SQL has a per-session "debug/request" trace which can be very long-lived.
Replacing it with an EventLog (which shows up under "debug/events").
@RaduBerinde
Copy link
Copy Markdown
Member Author

Review status: 0 of 3 files reviewed at latest revision, 2 unresolved discussions, some commit checks pending.


sql/session.go, line 100 [r1] (raw file):

Previously, andreimatei (Andrei Matei) wrote…

nit: "sql.root" didn't look obvious to me that it contained a user name. How about "sql [user]"

Done.

Comments from Reviewable

@RaduBerinde RaduBerinde merged commit 506f2e0 into cockroachdb:develop Aug 31, 2016
@RaduBerinde RaduBerinde deleted the sql-session-events branch August 31, 2016 22:43
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.

2 participants