Comments (7)
@carllerche any word on getting the "setting the config from an initializer" working? Currently setting the ENV
in a config/initializers
file doesn't work. Nor does doing a Rails.application.configure
block and setting config.skylight.authentication
in there in a config/initializers
file.
It would be pretty great if we could set this at Rails boot time.
from skylight-ruby.
Another option would be to configure the agent directly from the rails initializer. Something like:
config.skylight.authentication = Rails.application.secrets.skylight['authentication']
That probably would be better than the ERB route. Thoughts?
from skylight-ruby.
I already tried defining this in my production.rb file
config.skylight.application = Rails.application.secrets.skylight['application']
config.skylight.authentication = Rails.application.secrets.skylight['authentication']
and removed the config/skylight.yml file but it didn't work.
am I doing something wrong?
from skylight-ruby.
Oh sorry, that currently doesn't work :) I was asking if that would be a better solution for you vs. ERB in the YAML (which I am generally not a fan of).
from skylight-ruby.
Oh ok. Yeah I agree that that would be a better approach.
Do you have an estimate when this will be available?
P.S. if you're interested here's how newrelic is handling reading .yml files
from skylight-ruby.
No estimate yet, the easiest "work around" would be to use environment variables. It would be possible to set the environment variables in the Rails app before it boots if you don't want to set it externally.
Something like the following should work:
ENV["SKYLIGHT_AUTHENTICATION"] = Rails.application.secrets.skylight['authentication']
as long as it happens early on.
from skylight-ruby.
Ok thx for your comments.
from skylight-ruby.
Related Issues (20)
- Remove git dependency? HOT 3
- Allow yml files to be named yml.erb HOT 2
- 100% CPU Usage On Puma Workers at "idle" in Development. HOT 9
- Segmentation Fault HOT 1
- Middleware thread safey HOT 2
- Issue after gems upgrade HOT 4
- Delete old releases HOT 1
- Undefined method `safe_constantize' HOT 1
- Redis Deprecation warnings HOT 2
- Error after upgrading searchkick & elasticsearch gems HOT 3
- Possibly incorrect allocations reported HOT 1
- How to fix this warning HOT 2
- Verifying that probes are working HOT 1
- Puma 6 is breaking Skylight HOT 6
- Support for Psych 5 HOT 11
- Ignore specific GraphQL request
- No event sequence rendered for endpoints
- Incompatibility with GraphQL-Ruby 2.0.18+ out-of-the-box HOT 3
- Skylight and Sentry stacktrace issues HOT 10
- Join forces with stackprof HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skylight-ruby.