-
Notifications
You must be signed in to change notification settings - Fork 8
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
Migrate from Natchez to Otel4s #3
Conversation
Finish implementing all features of migration to otel4s, using otel4s version 0.3.0-RC1.
delete dead code and update to RC2
Use built-in exception recording from otel4s rather than manually creating and storing attributes. Add untracked file that was supposed to have been in the previous commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks... correct? admittedly I mostly did replacements of natchez stuff with otel4s, and tried to touch the actual implementation as little as possible otherwise. also, as one of the authors, I feel weird approving this, but at the same time... who else? 🤷♀️
implicit val headersTMU: TextMapUpdater[Headers] = | ||
(carrier: Headers, key: String, value: String) => carrier.put(Header.Raw(CIString(key), value)) | ||
implicit val headersTMG: TextMapGetter[Headers] = | ||
new TextMapGetter[Headers] { | ||
def get(carrier: Headers, key: String): Option[String] = | ||
carrier.get(CIString(key)).map(_.head.value) | ||
def keys(carrier: Headers): Iterable[String] = | ||
carrier.headers.view.map(_.name).distinct.map(_.toString).toSeq | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these should ideally be in http4s itself, but that may not happen for quite a bit as otel4s isn't nearly as stable as http4s yet. should be perhaps have a couple modules, like http4s-otel4s-core
and http4s-otel4s-middleware
, and these could live in a core module until they make it into http4s proper?
Co-authored-by: Marissa | April <7505383+NthPortal@users.noreply.github.com>
Hmm, there are still compile errors. |
I forgot that things got moved around a bunch before the release. lemme merge main to fix the conflicts and then fix the imports |
This is a resumption of davenverse/natchez-http4s-otel#73 in the new home for the otel4s port.