Skip to content

Clarify db.query.summary for batch queries #3289

@trask

Description

@trask

Case 1 (simple)

Given a batch query of

  • insert into table1 values (1)
  • insert into table1 values (2)

db.query.summary is the same for each of the queries in the batch (insert table1).

I think that db.query.summary in this case should be BATCH insert table1.

(matching db.operation.name behavior for batch queries)

Case 2 (harder)

Given a batch query of

  • insert into table1 values (1)
  • insert into table2 values (2)

db.query.summary is different for each of the queries in the batch (insert table1 and insert table2).

Should db.query.summary for the batch be:

  • BATCH (matching db.operation.name behavior), or
  • not reported

Pros to reporting BATCH

  • If you're already db.query.summary on other queries, it's nice to have some value for db.query.summary for batch queries since we're envisioning this being a key metric attribute for (some) dashboards
  • I'm leaning towards this, sent Clarify db.query.summary for batch queries #3287 to see what it looks like

Pros to not reporting the attribute

  • Span name in this case will be only BATCH, while if it was not reported it would fallback to operation.name which happens to be common in this case, and so span name would be the slightly more descriptive BATCH INSERT

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Need triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions