Code Monkey home page Code Monkey logo

Comments (6)

tianchu avatar tianchu commented on August 30, 2024 1

OK, once I added the these lines to your sample project I can reproduce the issue.

provider:
  name: aws
  runtime: nodejs14.x
  stage: development
  region: eu-central-1
  # needed to add the following two lines
  logs:
    restApi: true

Now it starts to make sense, because without these two lines, subscribeToApiGatewayLogs will not do anything.

@jcstorms1 perhaps you could take another deeper look now that we know how to reproduce it? I also noticed two interesting things:

  • subscribeToApiGatewayLogs doesn't do anything when using extension instead of the forwarder, which is unexpected. My guess is that you added the logic to subscribe to api gateway log groups to the same place we subscribe the forwarder to lambda log groups?
  • After deleting the ExecutionLogGroup resource in CloudFormation, the actual log group doesn't seem to be deleted in CloudWatch.

from serverless-plugin-datadog.

jcstorms1 avatar jcstorms1 commented on August 30, 2024

Hey Vladimir thanks for reaching out and opening this up. Unfortunately, I've been unable to reproduce this behavior using the test setup you provided. I attempted with Serverless framework version 1.83.2 and 2.51, but I was not able to trigger the error you shared above.

I checked the code, but I did not find anything that would trigger an error like this when enabling and disabling the extension. However, I did some additional searching and found similar references to the error coming from Serverless. Based on what I found, I think the issue might be that Cloudformation mishandled the existing log group during the deploy somehow. I'd be interested to know if you have tried deleting the log group and running through the steps again to see if it still occurs?

from serverless-plugin-datadog.

tianchu avatar tianchu commented on August 30, 2024

@VladimirRubin Do you still experience this issue? The error seems to be caused by

function createExecutionLogGroup(aws: Aws) {
, however, CFN is not expected to recreate a resource that is already defined in the stack and created before.

from serverless-plugin-datadog.

VladimirRubin avatar VladimirRubin commented on August 30, 2024

@VladimirRubin Do you still experience this issue? The error seems to be caused by

function createExecutionLogGroup(aws: Aws) {

, however, CFN is not expected to recreate a resource that is already defined in the stack and created before.

Yes, unfortunately, the problem is still reproducible on the example repo I attached to the ticket.

from serverless-plugin-datadog.

tianchu avatar tianchu commented on August 30, 2024

Thanks for getting back to us @VladimirRubin, we will try to reproduce this again using your testing project, there might be something different in our set up and yours.

from serverless-plugin-datadog.

jcstorms1 avatar jcstorms1 commented on August 30, 2024

Hey @VladimirRubin I wanted to let you know we just released v3.0.1 of the plugin and I believe it should resolve the issues you were having here. The issue was related to Execution log groups not being removed by CloudFormation when stacks are deleted. When redeploying via the plugin we were trying to add the Execution log group but it was already created.

We've now moved this option into its own parameter, subscribToExecutionLogs, and it is disabled by default. Moving forward, if you need to subscribe to these log groups and want to delete them at a later point, it will require manual deletion since deleting the stack will not remove them. Please let us know if continue to see any issues after trying the above changes.

from serverless-plugin-datadog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.