grafana / grafana/pyroscope-ruby
Panic initializing the logger from ruby gem
- Dominant language
- Rust
- Stars
- 1
- Forks
- 4
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 3
Description
**Describe the bug you encountered:**
Trying to configure Pyroscope from Ruby, and I got a panic on the initialize_logger call.
```
thread '' panicked at 'called `Result::unwrap()` on an `Err` value: SetLoggerError(())', /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pretty_env_logger-0.4.0/src/lib.rs:74:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
```
**What did you expect to happen instead?**
It should have initialized.
**How did you install `pyroscope-rs`?**
```ruby
gem "pyroscope"
```
Then configured it with (just showing the code that ran before the crash):
```ruby
require "bundler/setup"
require "pyroscope"
Pyroscope.configure do |config|
config.application_name = "something"
end
```
Note that no other gems were loaded, aside from bundler itself, because I was wanting to profile startup times. I also tried loading it after all the other gems loaded, and got the same result.
---
**pyroscope-rs version and environment**
Ruby 3.1.2
macOS Ventura 13.6.5, Intel Core i9
pyroscope gem 0.5.10 (pyroscope-0.5.10-x86_64-darwin.gem)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.