File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Source/GraphQLTemplate/Source/GraphQLTemplate Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -176,10 +176,11 @@ static string GetHttpFlavour(string protocol)
176176 }
177177 } ;
178178 options . RecordException = true ;
179- } ) ;
179+ } )
180180#if Redis
181- builder . AddRedisInstrumentation ( ) ;
181+ . AddRedisInstrumentation ( )
182182#endif
183+ . AddHotChocolateInstrumentation ( ) ;
183184
184185 if ( webHostEnvironment . IsDevelopment ( ) )
185186 {
@@ -217,6 +218,9 @@ public static IServiceCollection AddCustomGraphQL(
217218 var graphQLOptions = configuration . GetRequiredSection ( nameof ( ApplicationOptions . GraphQL ) ) . Get < GraphQLOptions > ( ) ;
218219 return services
219220 . AddGraphQLServer ( )
221+ #if OpenTelemetry
222+ . AddInstrumentation ( )
223+ #endif
220224 . InitializeOnStartup ( )
221225 . AddFiltering ( )
222226 . AddSorting ( )
Original file line number Diff line number Diff line change 5858 <PackageReference Include =" HotChocolate.AspNetCore" Version =" 12.5.0" />
5959 <PackageReference Include =" HotChocolate.AspNetCore.Authorization" Version =" 12.5.0" Condition =" '$(Authorization)' == 'true'" />
6060 <PackageReference Include =" HotChocolate.Data" Version =" 12.5.0" />
61+ <PackageReference Include =" HotChocolate.Diagnostics" Version =" 12.5.0" Condition =" '$(OpenTelemetry)' == 'true'" />
6162 <PackageReference Include =" HotChocolate.PersistedQueries.InMemory" Version =" 12.5.0" Condition =" '$(PersistedQueries)' == 'true'" />
6263 <PackageReference Include =" HotChocolate.PersistedQueries.Redis" Version =" 12.5.0" Condition =" '$(PersistedQueries)' == 'true'" />
6364 <PackageReference Include =" HotChocolate.Subscriptions.Redis" Version =" 12.5.0" Condition =" '$(Subscriptions)' == 'true'" />
You can’t perform that action at this time.
0 commit comments