Fixing instrumentation layer.
This commit is contained in:
parent
3433824439
commit
d9cd64831e
|
@ -52,13 +52,13 @@ export class DDInstrumentedDatabase implements Database {
|
||||||
}
|
}
|
||||||
|
|
||||||
getMultiple<T extends Document>(
|
getMultiple<T extends Document>(
|
||||||
ids: string[],
|
ids?: string[],
|
||||||
opts?: { allowMissing?: boolean | undefined } | undefined
|
opts?: { allowMissing?: boolean | undefined } | undefined
|
||||||
): Promise<T[]> {
|
): Promise<T[]> {
|
||||||
return tracer.trace("db.getMultiple", async span => {
|
return tracer.trace("db.getMultiple", async span => {
|
||||||
span.addTags({
|
span.addTags({
|
||||||
db_name: this.name,
|
db_name: this.name,
|
||||||
num_docs: ids.length,
|
num_docs: ids?.length || 0,
|
||||||
allow_missing: opts?.allowMissing,
|
allow_missing: opts?.allowMissing,
|
||||||
})
|
})
|
||||||
const docs = await this.db.getMultiple<T>(ids, opts)
|
const docs = await this.db.getMultiple<T>(ids, opts)
|
||||||
|
|
Loading…
Reference in New Issue