mirror of
https://github.com/google/nomulus.git
synced 2025-05-16 09:27:16 +02:00
Make metrics export run on backend module
This fixes a previous issue where metrics generated on the tools/backend modules weren't being successfully exported to BigQuery. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=119047757
This commit is contained in:
parent
17c4ad83c8
commit
e6d3f42e60
7 changed files with 34 additions and 15 deletions
|
@ -51,6 +51,8 @@ import javax.servlet.http.HttpServletResponse;
|
|||
/** Servlet for exporting metrics to BigQuery. */
|
||||
public class MetricsTaskServlet extends HttpServlet {
|
||||
|
||||
public static final String PATH = "/_dr/task/metrics";
|
||||
|
||||
private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||
private static final String DATASET_ID = "metrics";
|
||||
private static final String PROJECT_ID = RegistryEnvironment.get().config().getProjectId();
|
||||
|
@ -81,7 +83,7 @@ public class MetricsTaskServlet extends HttpServlet {
|
|||
ImmutableMap.Builder<String, Object> b = new ImmutableMap.Builder<>();
|
||||
|
||||
@SuppressWarnings({"cast", "unchecked"}) // Return type is always a Set<String>.
|
||||
Set<String> parameterKeys = (Set<String>) req.getParameterMap().keySet();
|
||||
Set<String> parameterKeys = req.getParameterMap().keySet();
|
||||
|
||||
for (String key : Sets.difference(parameterKeys, filter)) {
|
||||
b.put(key, req.getParameter(key));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue