Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Datadog] PHP Startup: Unable to load dynamic library 'ddappsec.so' #456

Open
annuh opened this issue May 31, 2023 · 0 comments · May be fixed by #457
Open

[Datadog] PHP Startup: Unable to load dynamic library 'ddappsec.so' #456

annuh opened this issue May 31, 2023 · 0 comments · May be fixed by #457

Comments

@annuh
Copy link
Contributor

annuh commented May 31, 2023

I'm running into an issue when enabling the datadog extension. When I add this extension to my Lambda's layers, the Lambda function produces the following warning:

Warning: PHP Startup: Unable to load dynamic library 'ddappsec.so' (tried: /opt/bref/extensions/ddappsec.so (/opt/bref/extensions/ddappsec.so: cannot open shared object file: No such file or directory), /opt/bref/extensions/ddappsec.so.so (/opt/bref/extensions/ddappsec.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

My full serverless.yml looks like this

service: php-test

provider:
    name: aws
    #architecture: arm64
    region: eu-central-1
    environment:
        # Datadog specific settings
        DD_SITE: datadoghq.com
        DD_API_KEY: __SECRET__
        DD_TRACE_ENABLED: true
        DD_SERVICE: php-test

plugins:
    - ./vendor/bref/bref
    - ./vendor/bref/extra-php-extensions

functions:
    test:
        handler: App\Infrastructure\Bref\EventHandler
        description: 'Test function'
        runtime: php-82
        timeout: 60
        layers:
            - ${bref-extra:gd-php-82}
            - ${bref-extra:datadog-php-82}
            - arn:aws:lambda:eu-central-1:464622532012:layer:Datadog-Extension:43 # changing the layers order, didn't help

package:
    patterns:
        # Excluded files and folders for deployment
        - '!assets/**'
        - '!node_modules/**'
        - '!public/build/**'
        - '!tests/**'
        - '!var/**'
        # If you want to include files and folders that are part of excluded folders, add them at the end
        - 'var/cache/prod/**'
        - 'public/build/entrypoints.json'
        - 'public/build/manifest.json'

I see the function's logs in Datadog (probably because of the Datadog-Extension layer?, no both layers are needed), but there is no trace information.

Do you have any idea what's the issue here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant