MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / isAttributeObject

Function isAttributeObject

packages/core/src/attributes.ts:54–61  ·  view source on GitHub ↗
(maybeObj: unknown)

Source from the content-addressed store, hash-verified

52 * https://develop.sentry.dev/sdk/telemetry/scopes/#setting-attributes
53 */
54export function isAttributeObject(maybeObj: unknown): maybeObj is AttributeObject {
55 return (
56 typeof maybeObj === 'object' &&
57 maybeObj != null &&
58 !Array.isArray(maybeObj) &&
59 Object.keys(maybeObj).includes('value')
60 );
61}
62
63/**
64 * Converts an attribute value to a typed attribute value.

Callers 2

attributes.test.tsFile · 0.90

Calls 1

keysMethod · 0.65

Tested by

no test coverage detected