docs: private ApiCallAttemptMonitoringEvent generateApiCallAttemptMonitoringEvent(HandlerAfterAttemptContext context) {
          Request<?> request = context.getRequest();
          AWSRequestMetrics metrics = context.getRequest().getAWSRequestMetrics();
  
          String apiName = request.getHandlerContext(HandlerContextKey.OPERATION_NAME);
          String serviceId = request.getHandlerContext(HandlerContextKey.SERVICE_ID);
          String sessionToken = getSessionToken(request.getHeaders());
          String region = request.getHandlerContext(HandlerContextKey.SIGNING_REGION);
  
          String accessKey = null;
          if (request.getHandlerContext(HandlerContextKey.AWS_CREDENTIALS) != null) {
              accessKey = request.getHandlerContext(HandlerContextKey.AWS_CREDENTIALS).getAWSAccessKeyId();
          }
  
          String fqdn = extractFqdn(request.getEndpoint());
          TimingInfo timingInfo = metrics == null ? null : metrics.getTimingInfo();
  
          TimingInfo httpRequestTime;
          Long timestamp = null;
          Long attemptLatency = null;
  
          if (timingInfo != null && timingInfo.getLastSubMeasurement(HttpRequestTime.name()) != null) {
              httpRequestTime = timingInfo.getLastSubMeasurement(HttpRequestTime.name());
              timestamp = httpRequestTime.getStartEpochTimeMilliIfKnown();
              attemptLatency = convertToLongIfNotNull(httpRequestTime.getTimeTakenMillisIfKnown());
          }
  
          ApiCallAttemptMonitoringEvent event = new ApiCallAttemptMonitoringEvent()
              .withFqdn(fqdn)
              .withVersion(VERSION)
              .withService(serviceId)
              .withClientId(clientId)
              .withRegion(region)
              .withAccessKey(accessKey)
              .withUserAgent(trimValueIfExceedsMaxLength(USER_AGENT_KEY, getDefaultUserAgent(request)))
              .withTimestamp(timestamp)
              .withAttemptLatency(attemptLatency)
              .withSessionToken(sessionToken)
              .withApi(apiName);
  
          addConditionalFieldsToAttemptEvent(metrics, context, event);
          return event;
      }