sd2k / rocket_newrelic

A Rocket fairing providing New Relic instrumentation
0 stars 1 forks source link

rocket 0.5 support #4

Open nicodemus26 opened 3 years ago

nicodemus26 commented 3 years ago

Rocket 0.5 is nearly released, and supports stable rust. Unfortunately for rocket_newrelic, it has a lot of breaking API changes, in particular with server and request state lifetimes, and the use of now-stable async.

It would be very helpful to have a new version of rocket_newrelic that works with rocket's unreleased mainline (and the upcoming 0.5 release).

sd2k commented 3 years ago

Agreed, I'll try to get something out shortly. I'm without a Linux environment at the minute so can't compile the newrelic crate, but it shouldn't be long!

nicodemus26 commented 3 years ago

This minimal docker file will build the newrelic crate runtime dependencies:

# Build newrelic sdk
FROM golang:1.16-buster AS newrelic-daemon-build
RUN apt-get update \
  && apt-get install -y \
    libpcre3-dev
RUN git clone --branch v1.3.0 --depth 1 https://github.com/newrelic/c-sdk.git newrelic-c-sdk
# Broken with go 1.16 docker image release https://github.com/golang/go/issues/30868
ENV GO111MODULE=off
RUN cd newrelic-c-sdk && make
sd2k commented 3 years ago

The latest master is now compatible with Rocket 0.5.0-rc.1. Let me know if you have any issues, or if you need a crates.io release :slightly_smiling_face: