You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const requestId =InvokeStore.getRequestId(); // Returns '-' if outside context
107
+
const requestId =invokeStore.getRequestId(); // Returns '-' if outside context
100
108
```
101
109
102
-
### InvokeStore.getTenantId()
110
+
### invokeStore.getTenantId()
103
111
104
112
Convenience method to get the tenant ID.
105
113
106
114
```typescript
107
-
const requestId =InvokeStore.getTenantId();
115
+
const requestId =invokeStore.getTenantId();
108
116
```
109
117
110
-
### InvokeStore.getXRayTraceId()
118
+
### invokeStore.getXRayTraceId()
111
119
112
120
Convenience method to get the current [X-Ray trace ID](https://docs.aws.amazon.com/xray/latest/devguide/xray-concepts.html#xray-concepts-traces). This ID is used for distributed tracing across AWS services.
113
121
114
122
```typescript
115
-
const traceId =InvokeStore.getXRayTraceId(); // Returns undefined if not set or outside context
123
+
const traceId =invokeStore.getXRayTraceId(); // Returns undefined if not set or outside context
116
124
```
117
125
118
-
### InvokeStore.hasContext()
126
+
### invokeStore.hasContext()
119
127
120
128
Checks if code is currently running within an invoke context.
121
129
122
130
```typescript
123
-
if (InvokeStore.hasContext()) {
131
+
if (invokeStore.hasContext()) {
124
132
// We're inside an invoke context
125
133
}
126
134
```
127
135
128
-
### InvokeStore.run(context, fn)
136
+
### invokeStore.run(context, fn)
129
137
130
138
> **Note**: This method is primarily used by the Lambda Runtime Interface Client (RIC) to initialize the context for each invocation. Lambda function developers typically don't need to call this method directly.
0 commit comments