[ 
https://issues.apache.org/jira/browse/FLINK-6013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15994524#comment-15994524
 ] 

ASF GitHub Bot commented on FLINK-6013:
---------------------------------------

Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3736#discussion_r114501062
  
    --- Diff: 
flink-metrics/flink-metrics-datadog/src/test/java/org/apache/flink/metrics/datadog/DatadogHttpClientTest.java
 ---
    @@ -0,0 +1,194 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.flink.metrics.datadog;
    +
    +import com.fasterxml.jackson.core.JsonProcessingException;
    +import org.apache.flink.metrics.Counter;
    +import org.apache.flink.metrics.Gauge;
    +import org.apache.flink.metrics.Meter;
    +import org.junit.Before;
    +import org.junit.Test;
    +import org.junit.experimental.runners.Enclosed;
    +import org.junit.runner.RunWith;
    +import org.powermock.api.mockito.PowerMockito;
    +import org.powermock.core.classloader.annotations.PrepareForTest;
    +import org.powermock.modules.junit4.PowerMockRunner;
    +
    +import java.util.Arrays;
    +import java.util.List;
    +
    +import static org.junit.Assert.assertEquals;
    +
    +@RunWith(Enclosed.class)
    +public class DatadogHttpClientTest {
    +   public static class TestApiKey {
    +           @Test(expected = IllegalArgumentException.class)
    +           public void testValidateApiKey() {
    +                   new DatadogHttpClient("fake_key");
    --- End diff --
    
    This always sends a request to the Datadog servers correct? I'm a bit 
skeptical since this means if the servers are down we end up with a failing 
test. In general though, throwing out requests at them even though we know they 
will fail anyway doesn't seem ehhh.... nice?
    
    Just checking that it fails when supplying null or an empty string is 
enough.


> Add Datadog HTTP metrics reporter
> ---------------------------------
>
>                 Key: FLINK-6013
>                 URL: https://issues.apache.org/jira/browse/FLINK-6013
>             Project: Flink
>          Issue Type: Improvement
>          Components: Metrics
>    Affects Versions: 1.3.0
>            Reporter: Bowen Li
>            Assignee: Bowen Li
>            Priority: Critical
>             Fix For: 1.3.0
>
>
> We at OfferUp use Datadog a lot for metrics and dashboards, and I believe a 
> lot other companies also do.
> Flink right now only has a StatsD metrics reporter, and users have to set up 
> Datadog Agent in order to receive metrics from StatsD and transport them to 
> Datadog. We don't like this approach.
> We prefer to have a Datadog metrics reporter directly contacting Datadog http 
> endpoint.
> I'll take this ticket myself.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to