Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite emailservice in ruby #109

Merged
merged 6 commits into from
Jun 6, 2022
Merged

Rewrite emailservice in ruby #109

merged 6 commits into from
Jun 6, 2022

Commits on Jun 4, 2022

  1. feat: rewrite emailservice in ruby

    Rather than use GRPC, we reimplement the emailservice as a simple HTTP
    application, using Sinatra and OpenTelemetry auto-instrumentation. We
    can do this because our use of GRPC in this instance is not very
    complicated - we can just serialize the protobuf request to JSON and
    send it over HTTP instead, and it's pretty straightforward.
    
    Probably the most interesting part here is that we're rendering the
    email text right into the logfile, which might be noisy. We can revisit
    that decision if needed.
    ahayworth committed Jun 4, 2022
    Configuration menu
    Copy the full SHA
    8457143 View commit details
    Browse the repository at this point in the history
  2. feat: call emailservice via HTTP POST

    This commit causes the checkoutservice to call emailservice via HTTP
    POST. We leverage the golang net/http autoinstrumentation to create the
    spans and propagate context correctly for us.
    ahayworth committed Jun 4, 2022
    Configuration menu
    Copy the full SHA
    179eb59 View commit details
    Browse the repository at this point in the history
  3. feat: modify setup to work with otel/ruby

    Because we rewrote the emailservice as an HTTP service, we need to
    modify the `EMAIL_SERVICE_ADDR` to reflect the actual scheme (`http`).
    We could just do some more string concatenation in the app, I guess.
    
    We pin to a specific collector version - I was getting weird segfaults
    with whatever version of the collector was already on my machine, and
    they were resolved with 0.52.0. However, that also required a minor
    config change to the jaeger exporter. Yay, M1 macs!
    
    We can't specify the otlp/grpc port for the ruby libraries, it won't
    work. So for email service we pass the correct OTLP/HTTP URL in the env
    var.
    ahayworth committed Jun 4, 2022
    Configuration menu
    Copy the full SHA
    79f2f02 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ab057bc View commit details
    Browse the repository at this point in the history
  5. fixup: remove loglevel: debug from otel-col config

    Whoops, this was accidentally left in from my testing.
    ahayworth committed Jun 4, 2022
    Configuration menu
    Copy the full SHA
    bdb3ecc View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8017b1c View commit details
    Browse the repository at this point in the history