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

Add Skylight instrumentation #2070

Merged
merged 1 commit into from
Feb 9, 2018

Conversation

chancancode
Copy link
Contributor

@chancancode chancancode commented Feb 7, 2018

Hello!

I work at Skylight. If you’re not already familiar with Skylight, it is a smart profiler for Rails apps. Skylight makes it easy to pinpoint performance issues in Rails applications.

We are getting ready to launch our Skylight for Open Source program. Similar to Github and Travis, it's completely free for open source apps and allows you to easily collect/share performance data with your contributors.

For your reference, here are a few examples of open source apps using Skylight so you can get a sense of what it can do:

I worked with @sauloperez to add Skylight to another open source project (see coopdevs/timeoverflow#322). He mentioned that he runs the Open Food Network (Barcelona) server and would be interested in using Skylight there as well. So I thought I should submit a pull request to see if this is something you would be interested in including.

We work on a lot of open source projects ourselves, and in our experience it can be pretty hard to get contributors to work on application performance issues. Few contributors consider working on performance problems, and the ones that might be interested may not even know where to start. By making performance information more accessible, we hope to inspire potential contributors to tackle slow parts of your app, and have a good way to see if their contributions helped.

This is one of the first "federated" (multi-deployment/installation) open source apps that we are adding to the program, so there are some open technical questions. While I can provide you with a single API token that all installations can share, the performance data will probably aggregate poorly due to differences in versions and other modifications.

So instead, I think it may be best to have a dedicated Skylight account per instance. Following the project's convention, I added a placeholder to config/application.yml since that appears to be where environment variables are usually set. That way, each installation can apply for their own API token, or just leave it unset if they are not using Skylight (in which case the Skylight agent may log a message to log/skylight.log on boot but won't otherwise prevent the app from working normally).

@sauloperez
Copy link
Contributor

Hi again @chancancode ! Thanks for your kind offfer and this PR!

If you’re not already familiar with [Skylight](https://www.skylight.io),
it is a smart profiler for Rails apps. Skylight makes it easy to
pinpoint performance issues in Rails applications.

We work on a lot of open source projects ourselves, and in our
experience it can be pretty hard to get contributors to work on
application performance issues. Few contributors consider working
on performance problems, and the ones that might be interested may
not even know where to start.

By making performance information more accessible, we hope to
inspire potential contributors to tackle slow parts of your app,
and have a good way to see if their contributions helped.

Local deployments that are interested in this can request an API
token from https://www.skylight.io/oss and set it in
`config/application.yml` (if no token is set, it will log a message to
`log/skylight.log` but won't otherwise prevent the app from working
normally).
@daniellemoorhead
Copy link
Contributor

@sauloperez will leave this in your capable hands to deal with 💪

@sauloperez sauloperez merged commit be07996 into openfoodfoundation:master Feb 9, 2018
@chancancode chancancode deleted the skylight branch February 9, 2018 15:52
sauloperez added a commit to coopdevs/openfoodnetwork that referenced this pull request Feb 14, 2018
This is a follow-up of
openfoodfoundation#2070.

When running the production API key in staging, the `log/skylight.log`
showed:

```
[SKYLIGHT] [1.5.0] You are running in the staging environment but
haven't added it to config.skylight.environments, so no data will be
sent to skylight.io.
```

According to
https://www.skylight.io/support/advanced-setup#setting-up-multiple-environments
it turns out we need to create a new app for staging and use its API
key.
sauloperez added a commit to coopdevs/openfoodnetwork that referenced this pull request Feb 14, 2018
This is a follow-up of
openfoodfoundation#2070.

When running the production API key in staging, the `log/skylight.log`
showed:

```
[SKYLIGHT] [1.5.0] You are running in the staging environment but
haven't added it to config.skylight.environments, so no data will be
sent to skylight.io.
```

According to
https://www.skylight.io/support/advanced-setup#setting-up-multiple-environments
it turns out we need to create a new app for staging and use its API
key.
HugsDaniel pushed a commit to HugsDaniel/openfoodnetwork that referenced this pull request Jun 4, 2018
This is a follow-up of
openfoodfoundation#2070.

When running the production API key in staging, the `log/skylight.log`
showed:

```
[SKYLIGHT] [1.5.0] You are running in the staging environment but
haven't added it to config.skylight.environments, so no data will be
sent to skylight.io.
```

According to
https://www.skylight.io/support/advanced-setup#setting-up-multiple-environments
it turns out we need to create a new app for staging and use its API
key.
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 this pull request may close these issues.

4 participants