Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import java.util.concurrent.TimeoutException;

import static org.opensearch.dataprepper.logging.DataPrepperMarkers.NOISY;
import static org.opensearch.dataprepper.plugins.source.source_crawler.utils.MetricsHelper.REQEUEST_ERRORS;

/**
* Implementation of CrawlerClient for Office 365 audit logs.
Expand All @@ -56,7 +57,6 @@ public class Office365CrawlerClient implements CrawlerClient<DimensionalTimeSlic
private static final String BUFFER_WRITE_RETRY_SUCCESS = "bufferWriteRetrySuccess";
private static final String BUFFER_WRITE_RETRY_ATTEMPTS = "bufferWriteRetryAttempts";
private static final String BUFFER_WRITE_FAILURES = "bufferWriteFailures";
private static final String REQEUEST_ERRORS = "requestErrors";
private static final int BUFFER_TIMEOUT_IN_SECONDS = 10;
private static final String CONTENT_ID = "contentId";
private static final String CONTENT_URI = "contentUri";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@

import static org.opensearch.dataprepper.logging.DataPrepperMarkers.NOISY;
import static org.opensearch.dataprepper.plugins.source.microsoft_office365.utils.Constants.CONTENT_TYPES;
import static org.opensearch.dataprepper.plugins.source.microsoft_office365.utils.MetricsHelper.getErrorTypeMetricCounterMap;
import static org.opensearch.dataprepper.plugins.source.microsoft_office365.utils.MetricsHelper.publishErrorTypeMetricCounter;
import static org.opensearch.dataprepper.plugins.source.source_crawler.utils.MetricsHelper.getErrorTypeMetricCounterMap;
import static org.opensearch.dataprepper.plugins.source.source_crawler.utils.MetricsHelper.publishErrorTypeMetricCounter;

/**
* REST client for interacting with Office 365 Management API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
*/

package org.opensearch.dataprepper.plugins.source.microsoft_office365.utils;
package org.opensearch.dataprepper.plugins.source.source_crawler.utils;

import io.micrometer.core.instrument.Counter;
import org.springframework.http.HttpStatus;
Expand All @@ -26,6 +26,9 @@ public class MetricsHelper {
private static final String REQUEST_THROTTLED = "requestThrottled";
private static final String RESOURCE_NOT_FOUND = "resourceNotFound";

// other errors in crawlerClient
public static final String REQEUEST_ERRORS = "requestErrors";

/**
* Get the metric counter map for specific errorType
* FORBIDDEN/UNAUTHORIZED = requestAccessDenied
Expand Down
Loading