Skip to content

v2.0.21

Choose a tag to compare

@github-actions github-actions released this 08 Nov 13:51
019f895

Changed

  private Call.Factory createTracedClient(OpenTelemetry openTelemetry, @Nonnull final IAuthenticationProvider auth) {
    return OkHttpTelemetry.builder(openTelemetry).build().newCallFactory(createClient(auth));
  }

  private OkHttpClient createClient(@Nonnull final IAuthenticationProvider auth) {
    return HttpClients.createDefault(auth);
  }
  
  // then create the GraphServiceClient
    IAuthenticationProvider authenticationProvider = ...;
    GraphServiceClient
    .builder(Call.Factory.class, Request.class)
    .httpClient(createTracedClient(openTelemetry, authenticationProvider))
    .authenticationProvider(authenticationProvider)
    .buildClient();