Skip to content

Commit eae0dcd

Browse files
committed
lint, remove stackState
1 parent 8457005 commit eae0dcd

2 files changed

Lines changed: 1 addition & 20 deletions

File tree

packages/agents-a365-observability-hosting/src/utils/InvokeAgentScopeUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// ------------------------------------------------------------------------------
55

66
import { TurnContext } from '@microsoft/agents-hosting';
7-
import { InvokeAgentScope, OpenTelemetryConstants } from '@microsoft/agents-a365-observability';
7+
import { InvokeAgentScope } from '@microsoft/agents-a365-observability';
88
import {
99
getCallerBaggagePairs,
1010
getExecutionTypePair,

packages/agents-a365-observability-hosting/src/utils/TurnContextUtils.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -196,22 +196,3 @@ export function getConversationIdAndItemLinkPairs(turnContext: TurnContext): Arr
196196
];
197197
return pairs.filter(([, v]) => v != null && v !== '').map(([k, v]) => [k, String(v)]);
198198
}
199-
200-
201-
202-
/**
203-
* Injects observability context (span and trace IDs) into the turn context.
204-
* @param turnContext The current TurnContext (activity context)
205-
* @param observabilityScope An object with Id and TraceId properties (OpenTelemetryScope)
206-
*/
207-
export function injectObservabilityContext(turnContext: any, observabilityScope: { Id: string; TraceId: string }): void {
208-
if (!turnContext || !observabilityScope) return;
209-
// Use a state bag on the context, create if missing
210-
type StackStateContext = { stackState: Record<string, unknown> };
211-
const ctx = turnContext as StackStateContext;
212-
if (!('stackState' in ctx) || typeof ctx.stackState !== 'object' || ctx.stackState === null) {
213-
ctx.stackState = {};
214-
}
215-
ctx.stackState[O11ySpanIdKey] = observabilityScope.Id;
216-
ctx.stackState[O11yTraceIdKey] = observabilityScope.TraceId;
217-
}

0 commit comments

Comments
 (0)