Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Support Apache OpenWhisk lambda functions #33

@rabbah

Description

@rabbah

With a few small localized changes, this library will work with Apache OpenWhisk - an open source platform for serverless functions powering public clouds (IBM Cloud Functions, Adobe I/O, Nimbella) and many others offerings on-prem.

There are two main differences between OpenWhisk and AWS:

  1. the "main" handler signature is main(event)in OpenWhisk vs main(event, context) in Lambda. The context is provided in environment variables in the former.

  2. the method utilts.get_fields is specific to AWS.

    def get_fields(context):

To keep changes minimal, I created a method to convert an OpenWhisk environment to an AWS-like context object (so get_fields remains agnostic to this change). I've confirmed the change is sufficient to allow OpenWhisk functions running on Nimbella to use the Lambda dashboards on SignalFx.

I can submit this patch as a pull request if desirable (do you have a contribution guide?), along with some documentation to show an OpenWhisk example as in this repo https://github.com/rabbah/sfx.

Here's the OpenWhisk lambda using the SignalFx decorator.

https://github.com/rabbah/sfx/blob/11c4264661a2d6c80f51e7f41ff0938174ac1e83/packages/default/hello.py#L1-L8

Activity

slernersplunk

slernersplunk commented on Jan 13, 2020

@slernersplunk

FYI for Splunk SignalFx GitHub approvers... - I (SignalFx Splunk Senior Sales Engineer) am working with Rodric and Nimbella on this and am creating OpenWhisk and Nimbella demos...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @rabbah@slernersplunk

        Issue actions

          Support Apache OpenWhisk lambda functions · Issue #33 · signalfx/lambda-python