Skip to content

Trim query in InstrumentedSession.extractStatementType before matching first token against defined statement prefixes #1424

Description

@pertsodian

extractStatementType relies on 1st token (split by whitespace) to determine statement kind (select / insert / update / delete), and if not match we fallback to "other"

That won't work well if the statements start with whitespace, e.g. akka-persistence-cassandra journal statements (due to multiline string usage)

Can we consider trimming before calling indexOf(" ")? I'm happy to raise PR, should be small one, if we don't have any concerns

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions