CloudWatch metrics submitted via putProjectEvents do not show up in Evidently experiment's Result view

0

My region is Europe (Stockholm) and I am experiencing the issue described in the title.

Here is my dummy React app, which looks like this:

    import { EvidentlyClient, EvaluateFeatureCommand, PutProjectEventsCommand } from "@aws-sdk/client-evidently";
    
    const eviclient = new EvidentlyClient({ 
        region : 'eu-north-1',
        endpoint: "https://evidently.eu-north-1.amazonaws.com",
        credentials : {
            accessKeyId     : 'AKIA2NxxxxxxxxW6P3UL', 
            secretAccessKey : 'fo5hMrufII7eHZxxxxxxxxS/5ZHnXqIFXNXGHt2e'
        }
    });
    
    async function evaluate() {
        const command1 = new EvaluateFeatureCommand({ 
            project: "myprojectname", feature: "SolutionInterest",  entityId: "12.345.678.90"
        });
        const command2 = new PutProjectEventsCommand({
            project: "myprojectname", events: [
              { timestamp: new Date(), type: "aws.evidently.custom", data: { "userIP": "12.345.678.90", "value": "1" } }
            ]
        });
        let response1 =  await eviclient.send(command1);
        console.log('response1: ' + JSON.stringify(response1));
        let response2 =  await eviclient.send(command2);
        console.log('response2: ' + JSON.stringify(response2));
    }
    
    function App() {
        evaluate();
        return null;
    }

and the output on the console is the following:

[Log] response1: {"$metadata":{"httpStatusCode":200,"requestId":"f9f35837-4796-4456-925f-97be4afaa240","attempts":1,"totalRetryDelay":0},"details":"{\"experiment\":\"Test4\",\"treatment\":\"Variation2\"}","reason":"EXPERIMENT_RULE_MATCH","value":{"boolValue":true},"variation":"Variation2"}

[Log] response2: {"$metadata":{"httpStatusCode":200,"requestId":"fb29f316-85bc-4416-9dcf-920ba98fae57","attempts":1,"totalRetryDelay":0},"eventResults":[{"errorCode":null,"errorMessage":null,"eventId":"434115a0-0e18-4cae-a2fe-c53f8dca117d"}],"failedEventCount":0}

At the same time, I can see that the metrics do arrive via "CloudWatch -> Metrics -> All metrics" (with a 5 minute delay or so). But still, nothing is shown within Evidently experiment's Result view.

Btw, I am working in the console with the root user (just in case this might help).

So far I tried the following:

  • to create a project and an experiment in another region - still same issue, so it is not region specific.
  • to create an experiment with the same user identity, that is being used with client configuration - still same problem.
  • to create a metric with and without rule pattern - no difference.

So here I cannot see any errors and the code has been simplified to the bare minimum.

Does anyone have any ideas, what is the cause of the problem here? Thank you!

  • Can you make sure you are checking the cloudwatch metric in same region, where you are putting the event. You might have already checked this, so it's very less likely could be a problem but just a thought.

  • Thank you, secondabhi_aws . Yes, I was checking in the right region, so this is fine. I have also added more details with React code that I run during testing, if it helps. My current idea is that there might be something to do with the permissions, so trying to check from that angle.

  • Hi Jev, I'm facing to the very same issue. Have you eventually found the cause? Best regards, Cyril

  • Hi Cyril, No, unfortunately not. But I am still interested, how other people make it to work. Regards, Jev

jev
已提問 9 個月前檢視次數 94 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南