Conversation
6b6999d to
4242256
Compare
|
Currently pointed at a local snapshot so CI will definitely fail, as otel4s main has |
|
@iRevive Updated all the attributes and removed semconv-experimental Would appreciate another look when you have time |
|
@alexcardell the changes look good. We still need to wait for a release of https://github.com/http4s/http4s-otel4s-middleware, right? |
|
The middleware would be useful for the example, but I don't believe it's necessary otherwise |
84ee6f9 to
96ce0a9
Compare
|
Upgraded to otel4s 0.7 but thanks to sbt 1.10 that required a few other updates Also added http4s-otel4s-middleware to the example |
| .jvmSettings(libraryDependencies ++= Seq( | ||
| "org.typelevel" %%% "otel4s-oteljava-trace-testkit" % otel4sVersion % Test | ||
| )) |
There was a problem hiding this comment.
We can use otel4s-sdk-trace-testkit to run tests across all platforms. Here is an example: alexcardell#2
|
I'd like to merge this for an upcoming release! @alexcardell do you have more time to work on it? @iRevive any changes in otel4s since this PR was opened that we should account for? Thanks both for your work on this, sorry it took me so long to circle back 🙏 |
|
@armanbilge I believe bumping otel4s version from One suggestion regarding this PR: we can switch to |
|
@armanbilge I will fix it up! |
|
@iRevive thanks for the PR to my branch, sorry I did not notice that for many moons |
|
Added JS tests for the otel4s module -- they can't be in otel4s 0.8 looks like it works fine, however I can't update to 0.9 yet until http4s/http4s-otel4s-middleware#123 is in, as it's used in the examples module |
|
One more minor improvement: alexcardell#3. |
| /** | ||
| * Temporary aliases for Lambda message-specific attributes in otel4s-semconv-experimental | ||
| */ | ||
| object LambdaMessageAttributes { |
There was a problem hiding this comment.
I think this was a shim for otel4s-semconv-experimental anyway, back when I thought this would merge before that was available, I can probably replace this
There was a problem hiding this comment.
lambda-otel4s still cannot depend on the otel4s-semconv-experimental, because semconv-experimental may receive binary breaking updates. And this will affect feral compatibility.
So far, I came up with the following strategy:
- Redefine required attributes in the library (like you did), ideally in a private package
- Use
otel4s-semconv-experimentalin tests to ensure your attributes match the specification (even the experimental one). - Once attributes get promoted to the
otel4s-semconvstable artifact - replace handcrafted attributes with the stable one
There was a problem hiding this comment.
Added some specific attribute tests, a little bit boilerplatey but did catch a small issue
| protected trait EventSpanAttributes[E] { | ||
| def contextCarrier(e: E): Map[String, String] | ||
| def spanKind: SpanKind | ||
| def attributes(e: E): List[Attribute[_]] |
There was a problem hiding this comment.
As an alternative, we can use Attributes collection there instead.
This one is complicated. If I get it right, it's only a predefined (preinstalled) otel-compatible collector. Hence, it should work with otel4s-sdk and otel4s-oteljava out of the box. Apart from the distro, there is a 'otel lambda layer': https://github.com/open-telemetry/opentelemetry-lambda. |
|
Good to go when I can bump to otel4s 0.9, but given the middleware is only used in the examples, perhaps we can just indicate where you would wrap the client with the middleware, rather than adding that dependency |
|
There are also some AWS goodies in the upcoming It depends on how urgently we need to release a new version of feral, but I'm fine with keeping examples out of the scope to unblock the release. |
I don't have an urgency, I had neglected this PR so wanted to make sure that we can land it soon :) thanks both for refreshing things! |
|
Fixed the 0.9 issues, good to go |
f3d5c74 to
42278bf
Compare
|
bumped apologies for the force push, rebasing was a pain |
|
|
||
| object TracedHandler { | ||
|
|
||
| def apply[F[_]: Monad: Tracer, Event, Result]( |
There was a problem hiding this comment.
We should eventually add an overload that takes TracerProvider, e.g.:
def apply[F[_]: Monad: TracerProvider, Event, Result](...): F[Option[Result]] =
TracerProvider[F]
.tracer("feral.lambda").withVersion(BuildInfo.version).get
.flatMap { implicit T: Tracer[F] =>
... // rest of the code
}There was a problem hiding this comment.
I am happy to swap it over if that's the preferred dependency, I think at the time I wrote this some libraries were accepting Tracer
I know we have some apps that set both up implicitly for that reason, and an overload may cause a problem unless specifically named
|
@armanbilge looks good to me, would you mind taking a look too? |
Supercedes #456
This is targeting otel4s 0.16.x
0.15.x0.14.x0.13.x0.12.x0.11.x0.10.x0.9.x0.8.x0.7.x0.6.x0.5.xLinks
https://opentelemetry.io/docs/specs/semconv/faas/aws-lambda/
https://opentelemetry.io/docs/specs/semconv/faas/faas-spans/