Code Monkey home page Code Monkey logo

Comments (2)

tsloughter avatar tsloughter commented on June 4, 2024 1

Great!

I think it should be applicable to both http_protobuf and http_json. And grpc, but there it should just be an option to pass to grpcbox.

Your configuration looks good. Hm, though actually it should be compression: gzip, that way it can add support for additional compression algorithms in the future if needed.

Code looks good too.

from opentelemetry-erlang.

kw7oe avatar kw7oe commented on June 4, 2024

Hey, I'm interested to work on this. I have take a brief look into it and have a few questions in my mind before sending in a PR:

  • Is this only applicable to http_protobuf protocol?
  • What would be the approach for user to configure it? Similar to otlp_endpoint? Something like this?
config :opentelemetry, :processors,
  otel_batch_processor: %{
    exporter: {:opentelemetry_exporter, %{
                                          gzip: true,
                                          endpoints: ["http://localhost:9090"],
                                          headers: [{"x-honeycomb-dataset", "experiments"}]}}
  }
  • What are the approach of writing a test for this?

Here's a rough implementation I have in mind on opentelemetry_exporter.erl:

export(Tab, Resource, #state{protocol=http_protobuf,
    %% ... other code
    CompressedProto = zlib:gzip(Proto),
    case httpc:request(post, {Address, [{"content-encoding", "gzip"} | Headers], "application/x-protobuf", CompressedProto}, [], []) of
    %% ... other code

Am I heading towards a right direction here? If so, for the option to configure gzip:

  • do we save it as part of the state?
  • or do we get it on runtime, before we make the HTTP request?

from opentelemetry-erlang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.