Skip to content

Updating guides on generating definitions #435

@nickcharlton

Description

@nickcharlton

I've been playing around with using Prometheus' remote_write in Ruby, I was finding that using Google's protobuf library was doing incorrect things, but this ended up working out great.

That said, I did find that the Compiling Definitions wiki page was leading me astray a little and I'd like to update it.

Whilst the Rake example does work fine, the example of compiling yourself directly using protoc doesn't use the correct Ruby plugin. I figured out that this works well:

$ ls definitions
prometheus.proto
$ protoc --plugin=protoc-gen-ruby-protobuf=$(which protoc-gen-ruby) --ruby-protobuf_out=lib -I definitions definitions/prometheus.pb.rb

I'd like to update the Wiki page, but before I do, could someone confirm that's broadly the right way to go about things?

Along the way I ran into #345, #341 and #382 so potentially referencing those might help others trying to do the same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions