MCPcopy Create free account
hub / github.com/Effect-TS/effect / spanName

Function spanName

packages/effect/src/sql/Statement.ts:1404–1411  ·  view source on GitHub ↗
(spanAttributes: ReadonlyArray<readonly [string, unknown]>)

Source from the content-addressed store, hash-verified

1402 * @since 4.0.1
1403 */
1404export const spanName = (spanAttributes: ReadonlyArray<readonly [string, unknown]>): string => {
1405 const target = spanTarget(spanAttributes)
1406 if (target !== undefined) {
1407 return target
1408 }
1409 const system = spanAttribute(spanAttributes, "db.system.name")
1410 return isNonEmptyString(system) ? system : "sql.execute"
1411}
1412
1413// internal
1414

Callers 1

executeBatchFunction · 0.70

Calls 3

spanTargetFunction · 0.85
spanAttributeFunction · 0.85
isNonEmptyStringFunction · 0.70

Tested by

no test coverage detected