Skip to content

Commit ceb8407

Browse files
committed
register a bunch of known contexts
1 parent 28c1e72 commit ceb8407

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

packages/core/src/spans/spanFirstUtils.ts

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,47 @@ const explicitAttributeToContextMapping = {
8080
'app.start_time': 'app.app_start_time',
8181
};
8282

83-
const knownContexts = ['app', 'os', 'device', 'culture', 'cloud_resource', 'runtime'];
83+
const knownContexts = [
84+
// set by `nodeContextIntegration`
85+
'app',
86+
'os',
87+
'device',
88+
'culture',
89+
'cloud_resource',
90+
'runtime',
91+
92+
// TODO: These need more thorough checking if they're all setting expected attributes
93+
94+
// set by the `instrumentPostgresJs`
95+
'postgresjsConnection',
96+
// set by `ensureIsWrapped`
97+
'missing_instrumentation',
98+
// set by `nodeProfilingIntegration`
99+
'profile',
100+
// set by angular `init`
101+
'angular',
102+
// set by AWS Lambda SDK
103+
'aws.lambda',
104+
'aws.cloudwatch.logs',
105+
// set by `instrumentBunServe`
106+
'response',
107+
// set by `trpcMiddleware`
108+
'trpc',
109+
// set by `instrumentSupabaseClient`
110+
'supabase',
111+
// set by `gcp.function.context`
112+
'gcp.function.context',
113+
// set by nextjs SDK
114+
'nextjs',
115+
// set by react SDK `captureReactException`, `init`
116+
'react',
117+
// set by react SDK `createReduxEnhancer`
118+
'state',
119+
// set by `replayIntegration`
120+
'Replays',
121+
// set by feature flags integration(s)
122+
'flags',
123+
];
84124

85125
/**
86126
* Converts a context object to a set of attributes.

0 commit comments

Comments
 (0)