Source:
<code>public ResponseEntity postEvent(@PathVariable final String eventTypeName, @RequestBody final String eventsAsString, final NativeWebRequest request, final Client client) throws AccessDeniedException, BlockedException, ServiceTemporarilyUnavailableException, InternalNakadiException, EventTypeTimeoutException, NoSuchEventTypeException { LOG.trace("Received event for event type {}", eventsAsString, eventTypeName); final HttpServletRequest httpServletRequest = request.getNativeRequest(HttpServletRequest.class); final Scope publishingScope = TracingService .activateSpan((Span) httpServletRequest.getAttribute("span"), false); <START> String sloBucket = "5K-50K"; <END> if (httpServletRequest.getContentLength() > 50000 || httpServletRequest.getContentLength() == 0) { sloBucket = ">50K"; } else if (httpServletRequest.getContentLength() < 5000) { sloBucket = "<5K"; } publishingScope.span() .setTag("event_type", eventTypeName) .setTag("slo_bucket", sloBucket) .setTag(Tags.SPAN_KIND_PRODUCER, client.getClientId()); final EventTypeMetrics eventTypeMetrics = eventTypeMetricRegistry.metricsFor(eventTypeName); if (blacklistService.isProductionBlocked(eventTypeName, client.getClientId())) { publishingScope.span().setTag("status_code", FORBIDDEN.getStatusCode()); throw new BlockedException("Application or event type is blocked"); } try { final ResponseEntity response = postEventInternal( eventTypeName, eventsAsString, request, eventTypeMetrics, client, publishingScope.span()); eventTypeMetrics.incrementResponseCount(response.getStatusCode().value()); return response; } catch (final NoSuchEventTypeException exception) { eventTypeMetrics.incrementResponseCount(NOT_FOUND.getStatusCode()); throw exception; } catch (final RuntimeException ex) { eventTypeMetrics.incrementResponseCount(INTERNAL_SERVER_ERROR.getStatusCode()); throw ex; } }</code><technical_language>Is this duplicate</technical_language>

Target:
public ResponseEntity postEvent(@PathVariable final String eventTypeName, @RequestBody final String eventsAsString, final NativeWebRequest request, final Client client) throws AccessDeniedException, BlockedException, ServiceTemporarilyUnavailableException, InternalNakadiException, EventTypeTimeoutException, NoSuchEventTypeException { LOG.trace("Received event for event type {}", eventsAsString, eventTypeName); final HttpServletRequest httpServletRequest = request.getNativeRequest(HttpServletRequest.class); final Scope publishingScope = TracingService.activateSpan(httpServletRequest, false); publishingScope.span().setOperationName("publish_events"); publishingScope.span() .setTag("event_type", eventTypeName) .setTag("slo_bucket", getSLOBucket(httpServletRequest.getContentLength())) .setTag(Tags.SPAN_KIND_PRODUCER, client.getClientId()); final EventTypeMetrics eventTypeMetrics = eventTypeMetricRegistry.metricsFor(eventTypeName); if (blacklistService.isProductionBlocked(eventTypeName, client.getClientId())) { publishingScope.span().setTag("status_code", FORBIDDEN.getStatusCode()); throw new BlockedException("Application or event type is blocked"); } try { final ResponseEntity response = postEventInternal( eventTypeName, eventsAsString, request, eventTypeMetrics, client, publishingScope.span()); eventTypeMetrics.incrementResponseCount(response.getStatusCode().value()); return response; } catch (final NoSuchEventTypeException exception) { eventTypeMetrics.incrementResponseCount(NOT_FOUND.getStatusCode()); throw exception; } catch (final RuntimeException ex) { eventTypeMetrics.incrementResponseCount(INTERNAL_SERVER_ERROR.getStatusCode()); throw ex; } }