Skip to content

[Plugin] added pyramid plugin #102

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

Merged
merged 3 commits into from
Dec 16, 2020
Merged

[Plugin] added pyramid plugin #102

merged 3 commits into from
Dec 16, 2020

Conversation

tom-pytel
Copy link
Contributor

@tom-pytel tom-pytel commented Dec 15, 2020

  • Add a test case for the new plugin
  • Add a component id in the main repo
  • Add a logo in the UI repo
  • Rebuild the requirements.txt by running tools/env/build_requirements_(linux|windows).sh

@tom-pytel
Copy link
Contributor Author

Here is a snippet:

from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.response import Response

from skywalking import agent
from skywalking.decorators import trace
from skywalking.trace.context import get_context
import skywalking.trace.context as context

agent.start()

def index(request):
    return Response('Hello World!')

def error(request):
    raise Exception('Error!')

if __name__ == '__main__':
    with Configurator() as config:
        config.add_route('index', '/')
        config.add_route('error', '/error')
        config.add_view(index, route_name='index')
        config.add_view(error, route_name='error')

        app = config.make_wsgi_app()

    server = make_server('0.0.0.0', 8000, app)

    server.serve_forever()

@kezhenxu94 kezhenxu94 added the plugin Plugin label Dec 15, 2020
@kezhenxu94 kezhenxu94 added this to the 0.5.0 milestone Dec 15, 2020
@tom-pytel
Copy link
Contributor Author

Ok, I've done the other annoying things so can you handle the test case?

@kezhenxu94
Copy link
Member

Ok, I've done the other annoying things so can you handle the test case?

Will do it tomorrow (hopefully)

Copy link
Member

@kezhenxu94 kezhenxu94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

3 participants