File tree Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,11 @@ internal static class SentryAIActivityListener
2121 ActivityStarted = activity =>
2222 {
2323 var agentSpan = Hub . StartSpan ( SentryAIConstants . SpanAttributes . InvokeAgentOperation , SentryAIConstants . SpanAttributes . InvokeAgentDescription ) ;
24- activity . SetFused ( SentryAIConstants . SentryActivitySpanAttributeName , agentSpan ) ;
24+ activity . SetFused ( SentryAIConstants . SentryFICCSpanAttributeName , agentSpan ) ;
2525 } ,
2626 ActivityStopped = activity =>
2727 {
28- var agentSpan = activity . GetFused < ISpan > ( SentryAIConstants . SentryActivitySpanAttributeName ) ;
28+ var agentSpan = activity . GetFused < ISpan > ( SentryAIConstants . SentryFICCSpanAttributeName ) ;
2929 // Don't pass in OK status in case there was an exception
3030 agentSpan ? . Finish ( ) ;
3131 }
Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ internal static class SentryAIConstants
1414 internal const string SentryActivitySourceName = "Sentry.AgentMonitoring" ;
1515
1616 /// <summary>
17- /// The string we use to retrieve the span from the <see cref="Activity"/> using a Fused property
17+ /// The string we use to retrieve a Sentry span from the <see cref="Activity"/> using a Fused property
1818 /// </summary>
19- internal const string SentryActivitySpanAttributeName = "SentryCurrSpan " ;
19+ internal const string SentryFICCSpanAttributeName = "SentryFICCSpan " ;
2020
2121 internal static class SpanAttributes
2222 {
Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ namespace Sentry.Extensions.AI;
44
55internal static class SentryAIUtil
66{
7- internal static ISpan ? GetActivitySpan ( )
7+ internal static ISpan ? GetFICCSpan ( )
88 {
99 var currActivity = Activity . Current ;
1010 while ( currActivity != null )
1111 {
12- if ( currActivity . GetFused < ISpan > ( SentryAIConstants . SentryActivitySpanAttributeName ) is { } span )
12+ if ( currActivity . GetFused < ISpan > ( SentryAIConstants . SentryFICCSpanAttributeName ) is { } span )
1313 {
1414 return span ;
1515 }
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ private ISpan TryGetAgentSpan(ChatOptions? options)
148148
149149 // If FunctionInvokingChatClient(FICC) wraps SentryChatClient, we should be able to get the agent span from the current activity
150150 // The activity we attached the span to may be an ancestor of the current activity, we must search the parents for the span
151- var activeSpan = SentryAIUtil . GetActivitySpan ( ) ;
151+ var activeSpan = SentryAIUtil . GetFICCSpan ( ) ;
152152
153153 // If we couldn't find the Activity, then FICC is not wrapping SentryChatClient. Return a new span from the hub
154154 return activeSpan ?? _hub . StartSpan ( SentryAIConstants . SpanAttributes . InvokeAgentOperation ,
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ internal sealed class SentryInstrumentedFunction(AIFunction innerFunction)
99 AIFunctionArguments arguments ,
1010 CancellationToken cancellationToken )
1111 {
12- var agentSpan = SentryAIUtil . GetActivitySpan ( ) ;
12+ var agentSpan = SentryAIUtil . GetFICCSpan ( ) ;
1313 var toolSpan = InitToolSpan ( agentSpan , arguments ) ;
1414 try
1515 {
You can’t perform that action at this time.
0 commit comments