-
Notifications
You must be signed in to change notification settings - Fork 240
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
OTLP Exporter for Logs #1525
Comments
👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the |
Hey @kaylareopelle, do you know where this project is at? Just curious when we might get to use a more generalized logging exporter. Thanks. |
Hi @travisbell thanks for checking in! Apologies about the delay here. There is an unreviewed OTLP logs exporter, along with other code to make Ruby spec-compliant for the Logs signal, available in this PR on my fork: kaylareopelle#6 The current process is to release small parts of this code to the main opentelemetry-ruby repository for review, and then revise the WIP branch as needed. I don't have a good sense of when all those code will be merged into If you'd like to test out the WIP logs implementation, you can follow the instructions in this gist: https://gist.github.com/kaylareopelle/76079747c1a7528449670b8bd1c78893 I also have a demo repository that integrates OpenTelemetry logs into a small Rails application: https://github.com/kaylareopelle/otel_ruby_logs_demo I'm updating the branches about once a week to stay in sync with the latest changes upstream. If you decide to give this experimental code a try, please let me know how it goes. You can comment here, open an issue on the demo repo, or add a comment to the gist. |
WIP, unreviewed code for this issue, along with other parts of the logs SDK, can be found in kaylareopelle#6 |
@kaylareopelle What progress has been made and what else remains to be done? We would like to use this for logging from our ruby code. |
Hi @cidemaxio! Thanks for reaching out. It's great to hear you'd like to use OTel Ruby logs. Here's the project board for the Logs signal that tracks what remains to be done. I have a draft PR for the OTLP exporter on my fork with a todo list in the description for work to do before opening the PR in the main repo. There is at least one other PR that needs to be opened for the SDK/API regarding configuration and instrument registries. After both that PR and #1696 are merged, we should be ready to release the logs SDK, API and OTLP exporter gems. |
Hi, @cidemaxio! PR is now opened for the OTLP Log Record Exporter: #1727 Please take a look if you're interested! Additional feedback from the community may help speed up the process to merge/release the gem. The other PR related to the SDK/API I mentioned in my last comment has been opened too: #1725 |
Thanks for the update @kaylareopelle! We will look at that PR. |
@kaylareopelle both PRs seem to have conflicts. Could you bring them up to date with main if you have a chance? |
Thank you, @wsmoak! The merge conflicts have been resolved 😄 |
Thanks @kaylareopelle . I was able to merge the changes from both PRs to a branch locally and try it out in a simple Rails app based on the example above. I have the collector running in a Docker container according to the quickstart [1], and I can see the logs being sent to the collector. [1] with the addition of port 4318 in the docker run command |
This is fantastic news. Thanks for testing, @wsmoak! Where did you find the docker run command? I'm wondering if there's a place we could update the documentation to include your port finding. It's a bit off-topic for this issue, but if you're interested in trialing a Ruby Logger bridge to automatically emit your Rails logs as OpenTelemetry Logs, you can pull in the branch on this PR: open-telemetry/opentelemetry-ruby-contrib#983 This is intended for the standard Ruby Logger class. If you're using semantic logger, there's a prototype here: reidmorrison/semantic_logger#292 |
The docker run command I mentioned is the one in the otel collector quickstart: https://opentelemetry.io/docs/collector/quick-start/ -> step 3 I had that running, but when I started the Rails app, it complained that it couldn't export logs. Could this error have more details about where it was trying to send them? I eventually sorted out that the Ruby SDK was speaking HTTP and nothing was listening on 4318 in the collector. (And I did see it wrapping the Rails logs already, I think I picked up the contrib gem from your otel_ruby_logs_demo Rails example.) Thanks! |
That's great feedback! I'll see what I can do about the logs exporter message. Thanks for pointing out the command. I opened open-telemetry/opentelemetry.io#5441 to see if we can get that added. So glad to hear you found the demo! 🎉 |
Hi @wsmoak, I updated the OTLP log exporter to log an OpenTelemetry error with more detail whenever it returns a FAILURE status code. Could you give it a try and let me know if that information would have helped debug the connection problem you encountered? Here's the commit that introduced the logging: abfcd54 |
Our current OTLP exporter is set up to exclusively send traces. This issue will either adapt current exporters or create a new, temporary exporter to send logs over OTLP. Support for HTTP will likely come first, followed by gRPC.
The text was updated successfully, but these errors were encountered: