Code Monkey home page Code Monkey logo

Comments (4)

DarcyRaynerDD avatar DarcyRaynerDD commented on August 30, 2024

Hi @hawkaa, I've just released v2.10.0 of the plugin, which includes the new 'exclude' feature. Could you try that again as a workaround until we have more support for the new 'image' option.

from serverless-plugin-datadog.

hawkaa avatar hawkaa commented on August 30, 2024

Seems to work, but I am getting another error with v2.10.0 that seems unrelated to this fix:

ServerlessError: An error occurred: ConvertDashdockerLambdaFunction - Value of property Variables must be an object with String (or simple type) properties.
      at /Users/hakon/code/ifc2obj/node_modules/serverless/lib/plugins/aws/lib/monitorStack.js:99:23
      at processImmediate (node:internal/timers:462:21)
  From previous event:
      at /Users/hakon/code/ifc2obj/node_modules/serverless/lib/plugins/aws/lib/monitorStack.js:27:12

I will investigate and open a new issue if it's not on my end.

from serverless-plugin-datadog.

hawkaa avatar hawkaa commented on August 30, 2024

@DarcyRaynerDD It is an issue with the exclude functionality. It writes a list to the environment variables which Cloudformation does not handle.

This happens both for the dockerized lambda and the original lambda. Here's an example for the ordinary lambda:

    "ConvertLambdaFunction": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": "code-upload",
          "S3Key": "serverless/ifc2obj/prod/1608191675674-2020-12-17T07:54:35.674Z/ifc2obj.zip"
        },
        "Handler": "datadog_lambda.handler.handler",
        "Runtime": "python3.7",
        "FunctionName": "ifc2obj-prod-convert",
        "MemorySize": 10240,
        "Timeout": 300,
        "Tags": [
          {
            "Key": "dd_sls_plugin",
            "Value": "v2.10.0"
          },
          {
            "Key": "service",
            "Value": "ifc2obj"
          },
          {
            "Key": "env",
            "Value": "prod"
          }
        ],
        "Environment": {
          "Variables": {
            "NODE_ENV": "production",
            "S3_BUCKET": "import-manager-storage",
            "SENTRY_DNS": "https://[email protected]/2959128",
            "DD_SITE": "datadoghq.com",
            "DD_LOG_LEVEL": "info",
            "DD_FLUSH_TO_LOG": true,
            "DD_TRACE_ENABLED": true,
            "DD_LOGS_INJECTION": true,
            "DD_EXCLUDED_FUNCTIONS": [
              "convert-docker"
            ],
            "DD_MERGE_XRAY_TRACES": false,
            "PATH": "$PATH:/opt/ifcopenshell/bin",
            "DD_LAMBDA_HANDLER": "handler.handler"
          }
        },
        "Role": {
          "Fn::GetAtt": [
            "IamRoleLambdaExecution",
            "Arn"
          ]
        },
        "Layers": [
          {
            "Ref": "IfcopenshellLambdaLayer"
          },
          "arn:aws:lambda:eu-west-1:464622532012:layer:Datadog-Python37:26"
        ]
      },
      "DependsOn": [
        "ConvertLogGroup"
      ]
    },

from serverless-plugin-datadog.

tianchu avatar tianchu commented on August 30, 2024

@hawkaa thanks for your contribution! I'm going to close this issue as your PR has already been released.

We are planning on some general improvements to the plugin for functions deployed using a container image.

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.